thanks TheLumberjack,
Is the identity mapping process failing?
Can see a 'login succeeded' message:
INFO attempting to authenticate to controller with specified target token type: ACCESS
Token: 88522d95-f87e-4841-8689-d72f72c60b1f
INFO login succeeded
External authentication using tunnelers:
# ./ziti-edge-tunnel ext-jwt-login -i '/home/zyb/run/oidc/sszg-linux-kc2.json' -p keycloak
{
"Success":true,
"Data":{
"identifier":"/home/zyb/run/oidc/sszg-linux-kc2.json",
"url":"http://192.168.63.119:18080/realms/ztnet/protocol/openid-connect/auth?client_id=ztnet-client&scope=openid%20email%20profile&response_type=code&redirect_uri=http%3A%2F%2Flocalhost%3A20314%2Fauth%2Fcallback&code_challenge=VpKtp_g_H4k1zZQdMOeWF_ZreoYFYrEC8vmZQzcv1oA&code_challenge_method=S256&state=W9xsLD3xTAmzBqA-AEURTNh-f6vISdb0M2DWBooP&audience=ztnet-client"
},
"Code":0
}
Certification passed:
The controller started looping errors:
[3057.481] ERROR ziti/controller/model.(*AuthModuleExtJwt).process: {authMethod=[ext-jwt]} encountered 0 candidate JWTs, verification cannot occur
[3057.483] ERROR ziti/controller/model.(*AuthModuleExtJwt).process: {authMethod=[ext-jwt]} encountered 0 candidate JWTs, verification cannot occur
Tunneler loop request aoisession:
(71771)[ 16.904] DEBUG ziti-sdk:ziti_ctrl.c:505 ctrl_body_cb() ctrl[https://ctrl.ziti.com:1280] completed POST[/authenticate] in 0.073 s
(71771)[ 16.904] DEBUG ziti-sdk:ziti_ctrl.c:394 ctrl_login_cb() ctrl[https://ctrl.ziti.com:1280] authenticated successfully session[cmjgr434y2acbr2j6jwz5d4wn]
(71771)[ 16.904] DEBUG ziti-sdk:legacy_auth.c:170 login_cb() logged in successfully => api_session[cmjgr434y2acbr2j6jwz5d4wn]
(71771)[ 16.904] DEBUG ziti-sdk:ziti.c:390 ziti_set_fully_authenticated() ztx[1] setting auth_state[0] to 3(71771)[ 16.904] DEBUG ziti-sdk:ziti_ctrl.c:505 ctrl_body_cb() ctrl[https://ctrl.ziti.com:1280] completed POST[/authenticate] in 0.073 s
(71771)[ 16.904] DEBUG ziti-sdk:ziti_ctrl.c:394 ctrl_login_cb() ctrl[https://ctrl.ziti.com:1280] authenticated successfully session[cmjgr434y2acbr2j6jwz5d4wn]
(71771)[ 16.904] DEBUG ziti-sdk:legacy_auth.c:170 login_cb() logged in successfully => api_session[cmjgr434y2acbr2j6jwz5d4wn]
(71771)[ 16.904] DEBUG ziti-sdk:ziti.c:390 ziti_set_fully_authenticated() ztx[1] setting auth_state[0] to 3
(71771)[ 16.720] DEBUG ziti-sdk:ziti_ctrl.c:505 ctrl_body_cb() ctrl[https://ctrl.ziti.com:1280] completed GET[/current-identity] in 0.014 s
(71771)[ 16.720] ERROR ziti-sdk:ziti_ctrl.c:527 ctrl_body_cb() ctrl[https://ctrl.ziti.com:1280] API request[/current-identity] failed code[UNAUTHORIZED] message[The request could not be completed. The session is not authorized or the credentials are invalid]
(71771)[ 16.720] ERROR ziti-sdk:ziti.c:1568 update_identity_data() ztx[1] failed to get identity_data: The request could not be completed. The session is not authorized or the credentials are invalid[UNAUTHORIZED]
(71771)[ 16.720] WARN ziti-sdk:ziti.c:1570 update_identity_data() ztx[1] api session is no longer valid. Trying to re-auth
(71771)[ 16.720] WARN ziti-sdk:ziti.c:224 ziti_set_unauthenticated() ztx[1] auth error: The request could not be completed. The session is not authorized or the credentials are invalid
(71771)[ 16.720] DEBUG ziti-sdk:ziti.c:227 ziti_set_unauthenticated() ztx[1] setting auth_state[0] to 0
(71771)[ 16.720] DEBUG ziti-sdk:ziti_ctrl.c:380 ziti_ctrl_clear_auth() ctrl[https://ctrl.ziti.com:1280] clearing api session token for ziti_controller
(71771)[ 16.720] WARN tunnel-cbs:ziti_tunnel_ctrl.c:1018 on_ziti_event() ziti_ctx controller connections failed: failed to authenticate
(71771)[ 16.720] INFO ziti-edge-tunnel:ziti-edge-tunnel.c:460 on_event() ztx[/home/zyb/run/oidc/sszg-linux-kc1.json] context event : status is failed to authenticate
(71771)[ 16.720] ERROR ziti-edge-tunnel:ziti-edge-tunnel.c:514 on_event() ztx[/home/zyb/run/oidc/sszg-linux-kc1.json] failed to connect to controller due to failed to authenticate
(71771)[ 16.720] DEBUG ziti-edge-tunnel:ipc_event.c:119 send_events_message() Events Message => {"Op":"identity","Action":"added","Fingerprint":"/home/zyb/run/oidc/sszg-linux-kc1","Id":{"Name":"/home/zyb/run/oidc/sszg-linux-kc1","Identifier":"/home/zyb/run/oidc/sszg-linux-kc1.json","FingerPrint":"/home/zyb/run/oidc/sszg-linux-kc1","Active":true,"Loaded":true,"IdFileStatus":false,"NeedsExtAuth":false,"MfaEnabled":false,"MfaNeeded":false,"Metrics":{"Up":0,"Down":0},"MfaMinTimeout":0,"MfaMaxTimeout":0,"MfaMinTimeoutRem":0,"MfaMaxTimeoutRem":0,"MinTimeoutRemInSvcEvent":0,"MaxTimeoutRemInSvcEvent":0,"Deleted":false,"Notified":false}}
(71771)[ 16.720] DEBUG ziti-edge-tunnel:ipc_event.c:119 send_events_message() Events Message => {"Op":"controller","Action":"disconnected","Identifier":"/home/zyb/run/oidc/sszg-linux-kc1.json","Fingerprint":"/home/zyb/run/oidc/sszg-linux-kc1"}
(71771)[ 16.720] DEBUG ziti-sdk:ziti.c:452 ziti_force_api_session_refresh() ztx[1] forcing session refresh
(71771)[ 16.720] DEBUG ziti-sdk:legacy_auth.c:238 auth_timer_cb() refreshing session[(nil)]
(71771)[ 16.720] VERBOSE ziti-sdk:ziti_ctrl.c:145 start_request() ctrl[https://ctrl.ziti.com:1280] starting POST[/authenticate]
(71771)[ 16.720] TRACE ziti-sdk:ziti.c:1778 ztx_prep_deadlines() ztx[1] processing deadlines in 19985
(71771)[ 16.721] TRACE ziti-sdk:ziti.c:1778 ztx_prep_deadlines() ztx[1] processing deadlines in 19984
(71771)[ 16.722] VERBOSE ziti-sdk:ziti_ctrl.c:200 ctrl_resp_cb() ctrl[https://ctrl.ziti.com:1280] received headers GET[/current-identity/edge-routers?limit=25&offset=0]
(71771)[ 16.722] VERBOSE ziti-sdk:ziti_ctrl.c:431 ctrl_body_cb() ctrl[https://ctrl.ziti.com:1280] HTTP RESPONSE: {"error":{"code":"UNAUTHORIZED","message":"The request could not be completed. The session is not authorized or the credentials are invalid","requestId":"LcWcmRsu9"},"meta":{"apiEnrollmentVersion":"0.0.1","apiVersion":"0.0.1"}}
(71771)[ 16.722] DEBUG ziti-sdk:ziti_ctrl.c:500 ctrl_body_cb() ctrl[https://ctrl.ziti.com:1280] completed paging request GET[/current-identity/edge-routers] in 0.016 s
(71771)[ 16.722] ERROR ziti-sdk:ziti_ctrl.c:527 ctrl_body_cb() ctrl[https://ctrl.ziti.com:1280] API request[/current-identity/edge-routers?limit=25&offset=0] failed code[UNAUTHORIZED] message[The request could not be completed. The session is not authorized or the credentials are invalid]
(71771)[ 16.722] ERROR ziti-sdk:ziti.c:1492 edge_routers_cb() ztx[1] failed to get current edge routers: code[401] UNAUTHORIZED/The request could not be completed. The session is not authorized or the credentials are invalid
(71771)[ 16.722] TRACE ziti-sdk:ziti.c:1778 ztx_prep_deadlines() ztx[1] processing deadlines in 19983
(71771)[ 16.722] TRACE ziti-sdk:ziti.c:1778 ztx_prep_deadlines() ztx[1] processing deadlines in 19983
(71771)[ 16.725] VERBOSE ziti-sdk:ziti_ctrl.c:200 ctrl_resp_cb() ctrl[https://ctrl.ziti.com:1280] received headers GET[/controllers?limit=25&offset=0]
(71771)[ 16.725] VERBOSE ziti-sdk:ziti_ctrl.c:431 ctrl_body_cb() ctrl[https://ctrl.ziti.com:1280] HTTP RESPONSE: {"error":{"code":"UNAUTHORIZED","message":"The request could not be completed. The session is not authorized or the credentials are invalid","requestId":"wcWcmsRD9"},"meta":{"apiEnrollmentVersion":"0.0.1","apiVersion":"0.0.1"}}
(71771)[ 16.725] DEBUG ziti-sdk:ziti_ctrl.c:500 ctrl_body_cb() ctrl[https://ctrl.ziti.com:1280] completed paging request GET[/controllers] in 0.020 s
(71771)[ 16.725] ERROR ziti-sdk:ziti_ctrl.c:527 ctrl_body_cb() ctrl[https://ctrl.ziti.com:1280] API request[/controllers?limit=25&offset=0] failed code[UNAUTHORIZED] message[The request could not be completed. The session is not authorized or the credentials are invalid]
(71771)[ 16.725] WARN ziti-sdk:ziti_ctrl.c:288 internal_ctrl_list_cb() ctrl[https://ctrl.ziti.com:1280] failed to get list of HA controllers: The request could not be completed. The session is not authorized or the credentials are invalid
(71771)[ 16.725] TRACE ziti-sdk:ziti.c:1778 ztx_prep_deadlines() ztx[1] processing deadlines in 19980
(71771)[ 16.726] TRACE ziti-sdk:ziti.c:1778 ztx_prep_deadlines() ztx[1] processing deadlines in 19979
(71771)[ 16.727] VERBOSE ziti-sdk:ziti_ctrl.c:200 ctrl_resp_cb() ctrl[https://ctrl.ziti.com:1280] received headers GET[/current-api-session/service-updates]
(71771)[ 16.727] VERBOSE ziti-sdk:ziti_ctrl.c:431 ctrl_body_cb() ctrl[https://ctrl.ziti.com:1280] HTTP RESPONSE: {"error":{"code":"UNAUTHORIZED","message":"The request could not be completed. The session is not authorized or the credentials are invalid","requestId":"kEQciRsu9"},"meta":{"apiEnrollmentVersion":"0.0.1","apiVersion":"0.0.1"}}
(71771)[ 16.727] DEBUG ziti-sdk:ziti_ctrl.c:505 ctrl_body_cb() ctrl[https://ctrl.ziti.com:1280] completed GET[/current-api-session/service-updates] in 0.021 s
(71771)[ 16.727] ERROR ziti-sdk:ziti_ctrl.c:527 ctrl_body_cb() ctrl[https://ctrl.ziti.com:1280] API request[/current-api-session/service-updates] failed code[UNAUTHORIZED] message[The request could not be completed. The session is not authorized or the credentials are invalid]
(71771)[ 16.727] WARN ziti-sdk:ziti.c:1440 check_service_update() ztx[1] failed to poll service updates: code[401] err[-14/The request could not be completed. The session is not authorized or the credentials are invalid]
Could you please help me check if this is a ZAC configuration issue?
{
"name": "keycloak",
"audience": "ztnet-client",
"issuer": "http://176.16.63.11:18080/realms/ztnet",
"clientId": "ztnet-client",
"claimsProperty": "email",
"enabled": true,
"useExternalId": true,
"kid": "",
"externalAuthUrl": "http://176.16.63.11:18080/realms/ztnet",
"scopes": [
"email",
"profile"
],
"tags": {
"TARGET TOKEN TYPE": "Access"
},
"jwksEndpoint": "http://176.16.63.11:18080/realms/ztnet/protocol/openid-connect/certs",
"id": "71BxjQMRcm4DbZiIFzlISh"
}{
"name": "keycloak",
"audience": "ztnet-client",
"issuer": "http://176.16.63.11:18080/realms/ztnet",
"clientId": "ztnet-client",
"claimsProperty": "email",
"enabled": true,
"useExternalId": true,
"kid": "",
"externalAuthUrl": "http://176.16.63.11:18080/realms/ztnet",
"scopes": [
"email",
"profile"
],
"tags": {
"TARGET TOKEN TYPE": "Access"
},
"jwksEndpoint": "http://176.16.63.11:18080/realms/ztnet/protocol/openid-connect/certs",
"id": "71BxjQMRcm4DbZiIFzlISh"
}
Use "externalId": "bing@gmail.com" to match the corresponding user in Keycloak.
I can't find the problem, please help me.