Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tested against AWS Cognito? #81

Closed
jchannon opened this issue Aug 10, 2018 · 7 comments
Closed

Tested against AWS Cognito? #81

jchannon opened this issue Aug 10, 2018 · 7 comments
Labels

Comments

@jchannon
Copy link
Contributor

jchannon commented Aug 10, 2018

I have a local asp.net core application with an api endpoint. I have a AWS Cognito user pool setup. I can go through an index.html page and some Javascript to log into Cognito and get a token back. I can then make a request to asp.net core app with the token and after the token validation get to my api endpoint.

Using the sample netcore app for this library I tried hooking it all up but get back an error when it reads the discovery document.

Endpoint is on a different host than authority: https://REDACTED.auth.eu-west-2.amazoncognito.com/oauth2/authorize

Looking at the raw json in the discoveryResponse that is correct.

Is there something that can be done to make this work?

{
	"authorization_endpoint": "https://REDACTED.auth.eu-west-2.amazoncognito.com/oauth2/authorize",
	"id_token_signing_alg_values_supported": ["RS256"],
	"issuer": "https://cognito-idp.eu-west-2.amazonaws.com/REDACTED",
	"jwks_uri": "https://cognito-idp.eu-west-2.amazonaws.com/REDACTED/.well-known/jwks.json",
	"response_types_supported": ["code", "token", "token id_token"],
	"scopes_supported": ["openid", "email", "phone", "profile"],
	"subject_types_supported": ["public"],
	"token_endpoint": "https://REDACTED.auth.eu-west-2.amazoncognito.com/oauth2/token",
	"token_endpoint_auth_methods_supported": ["client_secret_basic", "client_secret_post"],
	"userinfo_endpoint": "https://REDACTED.auth.eu-west-2.amazoncognito.com/oauth2/userInfo"
}
@brockallen
Copy link
Member

Is there something that can be done to make this work?

They could implement the spec properly, or you can disable that protocol violation with this flag:

https://github.com/IdentityModel/IdentityModel2/blob/dev/src/IdentityModel/Client/DiscoveryPolicy.cs#L42

@jchannon
Copy link
Contributor Author

jchannon commented Aug 10, 2018 via email

@brockallen
Copy link
Member

brockallen commented Aug 10, 2018

You should open an issue with them. You can refer them to the exact item in the spec: https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfigurationValidation and let them know their implementation hurts interoperability. :)

@brockallen
Copy link
Member

Oh sorry -- now I understand why your other flag fixed the issue. It's the endpoints, not the issuer. Ok, that's somewhat different. Sorry for my confusion.

@jchannon
Copy link
Contributor Author

jchannon commented Aug 10, 2018 via email

@jchannon
Copy link
Contributor Author

jchannon commented Aug 10, 2018 via email

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 22, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

No branches or pull requests

2 participants