Cannot authenticate tokens using Identity Providers
See original GitHub issueI have 2 identity zones idzone1 and idzone2. I have added an identity provider in idzone2 with urls pointing to idzone1 . The authentication still fails. How are tokens forwarded to the relevant identity providers for authentication? This is the code for adding the identity provider to idZone2:
uaaClient.identityProviders().create(CreateIdentityProviderRequest.builder()
.configuration(OAuth2Configuration.builder()
.authUrl("https://idZone1.uaa.system.sample.io/oauth/authorize")
.tokenKeyUrl("https://idZone1.uaa.system.sample.io/oauth/token_key")
.tokenUrl("https://idZone1.uaa.system.sample.io/oauth/token")
.checkTokenUrl("https://idZone1.uaa.system.sample.io/oauth/check_token")
.relyingPartyId("clientId")
.relyingPartySecret("clientSecret")
.showLinkText(false)
.skipSslVerification(cfProperties.getSkipSslVerification())
.build())
.originKey("idZone1-id-provider")
.name("idZone1-id-provider")
.type(Type.OAUTH2)
.build())
.doOnError(r -> {logger.info("error message: " + r.getMessage());});
The following is a GET on identity-providers in idZone2:
[
{
"type": "oauth2.0",
"config": "{\"emailDomain\":null,\"additionalConfiguration\":null,\"providerDescription\":null,\"externalGroupsWhitelist\":[],\"attributeMappings\":{},\"addShadowUserOnLogin\":true,\"storeCustomAttributes\":false,\"authUrl\":\"https://idZone1.uaa.system.sample.io/oauth/authorize\",\"tokenUrl\":\"https://idZone1.uaa.system.sample.io/oauth/token\",\"tokenKeyUrl\":\"https://idZone1.uaa.system.sample.io/oauth/token_key\",\"tokenKey\":null,\"linkText\":null,\"showLinkText\":false,\"skipSslValidation\":false,\"relyingPartyId\":\"clientId\",\"relyingPartySecret\":\"clientSecret\",\"scopes\":null,\"issuer\":null,\"responseType\":\"code\",\"checkTokenUrl\":\"https://idZone1.uaa.system.sample.io/oauth/check_token\"}",
"id": "a66c546a-3ef1-4cca-b9d4-4602d0ba608e",
"originKey": "idZone1-id-provider",
"name": "idZone1-id-provider",
"version": 0,
"created": 1505326644000,
"last_modified": 1505326644000,
"active": true,
"identityZoneId": "948f9ab3-b7a0-4c8a-9527-c728cfb6eead"
},
{
"type": "uaa",
"config": "{\"emailDomain\":null,\"additionalConfiguration\":null,\"providerDescription\":null,\"passwordPolicy\":{\"minLength\":10,\"maxLength\":255,\"requireUpperCaseCharacter\":0,\"requireLowerCaseCharacter\":0,\"requireDigit\":0,\"requireSpecialCharacter\":0,\"expirePasswordInMonths\":0,\"passwordNewerThan\":null},\"lockoutPolicy\":null,\"disableInternalUserManagement\":false}",
"id": "6bd2c8f9-c401-4e55-a93b-055ce4c9714a",
"originKey": "uaa",
"name": "uaa",
"version": 1,
"created": 1505326643000,
"last_modified": 1505326643000,
"active": true,
"identityZoneId": "948f9ab3-b7a0-4c8a-9527-c728cfb6eead"
}
]
Issue Analytics
- State:
- Created 6 years ago
- Comments:6 (2 by maintainers)
Top Results From Across the Web
Identity Provider Access Tokens - Auth0
Understand third-party access tokens issued by identity providers after user authentication and how to use them to call the third-party APIs.
Read more >The portal is having issues getting an authentication token ...
When I login to the Azure Portal I keep getting a popup with the following text: The portal is having issues getting an...
Read more >Unable to retrieve (upstream) Identity Provider's original token
I'm trying to retrieve the upstream Identity Provider's issued OIDC Token with the KC Token given to my user.
Read more >Using tokens with user pools - Amazon Cognito
Authenticate users and grant access to resources with tokens. Tokens have claims, which are pieces of information about the user. The ID token...
Read more >There was an error when authenticating against the external ...
... the external identity provider: Could not verify token signature. ... I login to IdP, there is redirect from IdP -> UAA with...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I am currently asking myself how to setup the identity provider for this scenario correctly (in my special case for “oauth2.0”). Where can I find a specific documentation on this?
Tokens are not portable across zones, but you should be able to get a new token in zone2 for the user from zone1 using a client in zone2 if your idp configuration has been set up correctly.
Try this: