First, the TIB log:
DEBU[0111] [AUTH HANDLERS] → Looking up profile ID:7
DEBU[0111] [AD AUTH] Connect: starting…
DEBU[0111] [AD AUTH] → To: localhost:389
DEBU[0111] [AD AUTH] Connect: finished…
DEBU[0111] DN: cn=test,ou=people,dc=appliedinnovation-cn,dc=com
INFO[0111] [AD AUTH] User bind successful: test
INFO[0111] [AD AUTH] Search: starting…
INFO[0111] [AD AUTH] LDAPFilter is blank, skipping
INFO[0111] [AD AUTH] User Data:{map[] ADProvider test@ADProvider test 0001-01-01 00:00:00 +0000 UTC}
DEBU[0111] [AD AUTH] Constraints for AD must be set in DN
INFO[0111] [TYK ID HANDLER] Creating nonce
INFO[0111] [TYK ID HANDLER] Creating identity for: {map[] ADProvider test@ADProvider test 0001-01-01 00:00:00 +0000 UTC}
2017/11/23 18:19:10 http: panic serving 117.22.255.130:61498: interface conversion: interface {} is nil, not map[string]interface {}
goroutine 67 [running]:
net/http.(*conn).serve.func1(0xc420133900)
/usr/local/go/src/net/http/server.go:1697 +0xd0
panic(0x786c60, 0xc420110c40)
/usr/local/go/src/runtime/panic.go:491 +0x283
github.com/TykTechnologies/tyk-identity-broker/tap/identity-handlers.(*TykIdentityHandler).CreateIdentity(0xc42012f080, 0x7e6ac0, 0xc42016e780, 0x1, 0xf, 0xc420129e20, 0x1f)
/Users/buger/Documents/work/go/src/github.com/TykTechnologies/tyk-identity-broker/tap/identity-handlers/tyk_handler.go:136 +0x5b8
github.com/TykTechnologies/tyk-identity-broker/tap/identity-handlers.(*TykIdentityHandler).CompleteIdentityActionForPortal(0xc42012f080, 0x9b9180, 0xc4201641c0, 0xc420190d00, 0x7e6ac0, 0xc42016e780, 0xc42019a828, 0x1, 0xc420129b40, 0x18, …)
/Users/buger/Documents/work/go/src/github.com/TykTechnologies/tyk-identity-broker/tap/identity-handlers/tyk_handler.go:172 +0x12f
github.com/TykTechnologies/tyk-identity-broker/tap/identity-handlers.(*TykIdentityHandler).CompleteIdentityAction(0xc42012f080, 0x9b9180, 0xc4201641c0, 0xc420190d00, 0x7e6ac0, 0xc42016e780, 0xc42019a828, 0x1, 0xc420129b40, 0x18, …)
/Users/buger/Documents/work/go/src/github.com/TykTechnologies/tyk-identity-broker/tap/identity-handlers/tyk_handler.go:391 +0x2cd
github.com/TykTechnologies/tyk-identity-broker/providers.(*ADProvider).Handle(0xc420167b00, 0x9b9180, 0xc4201641c0, 0xc420190d00)
/Users/buger/Documents/work/go/src/github.com/TykTechnologies/tyk-identity-broker/providers/active_directory.go:264 +0xdca
main.HandleAuth(0x9b9180, 0xc4201641c0, 0xc420190d00)
/Users/buger/Documents/work/go/src/github.com/TykTechnologies/tyk-identity-broker/http_handlers.go:138 +0x89
net/http.HandlerFunc.ServeHTTP(0x80fb20, 0x9b9180, 0xc4201641c0, 0xc420190d00)
/usr/local/go/src/net/http/server.go:1918 +0x44
github.com/gorilla/mux.(*Router).ServeHTTP(0xc420118a50, 0x9b9180, 0xc4201641c0, 0xc420190d00)
/Users/buger/Documents/work/go/src/github.com/gorilla/mux/mux.go:114 +0xdc
net/http.serverHandler.ServeHTTP(0xc42011e8f0, 0x9b9180, 0xc4201641c0, 0xc420190b00)
/usr/local/go/src/net/http/server.go:2619 +0xb4
net/http.(*conn).serve(0xc420133900, 0x9b9840, 0xc4201109c0)
/usr/local/go/src/net/http/server.go:1801 +0x71d
created by net/http.(*Server).Serve
/usr/local/go/src/net/http/server.go:2720 +0x288
The profile.json:
{
“ActionType”: “GenerateOrLoginDeveloperProfile”,
“ID”: “7”,
“IdentityHandlerConfig”: {
“DashboardCredential”: “822f2b1c75dc4a4a522944caa757976a”
},
“OrgID”: “53ac07777cbb8c2d53000002”,
“ProviderConfig”: {
“FailureRedirect”: “http://openapi.appliedinnovation-cn.com:3000/portal/login/”,
“LDAPAttributes”: [],
“LDAPPort”: “389”,
“LDAPServer”: “localhost”,
“LDAPUserDN”: “cn=USERNAME,ou=people,dc=appliedinnovation-cn,dc=com”
},
“ProviderConstraints”: {
“Domain”: “ADProvider”,
“Group”: “”
},
“ProviderName”: “ADProvider”,
“ReturnURL”: “http://openapi.appliedinnovation-cn.com:3000/portal/sso/”,
“Type”: “passthrough”
}
The tib.conf:
{
“Secret”: “test-secret”,
“HttpServerOptions”: {
“UseSSL”: false,
“CertFile”: “./certs/server.pem”,
“KeyFile”: “./certs/server.key”
},
“BackEnd”: {
“Name”: “in_memory”,
“ProfileBackendSettings”: {},
“IdentityBackendSettings”: {
“Hosts” : {
“localhost”: “6379”
},
“Password”: “”,
“Database”: 0,
“EnableCluster”: false,
“MaxIdle”: 1000,
“MaxActive”: 2000
}
},
“TykAPISettings”: {
“GatewayConfig”: {
“Endpoint”: “http://localhost”,
“Port”: “8080”,
“AdminSecret”: “352d20ee67be67f6340b4c0605b044b7”
},
“DashboardConfig”: {
“Endpoint”: “http://localhost”,
“Port”: “3000”,
“AdminSecret”: “352d20ee67be67f6340b4c0605b044b7”
}
}
}
The LDAP data:
dn: cn=test,ou=people,dc=appliedinnovation-cn,dc=com
cn: test
Now, the user bind success, but there’s a panic error, I have no idea about this error, anything I can do for it?
PS: The TIB version is v0.2.1.