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

Error thrown when Domain of well.known and well.known Issuer value don't match #154

Closed
JohnOffenhartz opened this issue Jul 27, 2017 · 2 comments

Comments

@JohnOffenhartz
Copy link

We're running into an error because our Provider hosts multiple well.known endpoints, but they all share the same issuer.

Ex. https://cogolabs.onelogin.com/oidc/.well-known/openid-configuration
Has an issuer of "https://openid-connect.onelogin.com/oidc"

This if p.Issuer != issuer specific check in

go-oidc/oidc.go

Line 114 in a4973d9

if p.Issuer != issuer {
is throwing an error because of the mismatch.

We believe this is a bug because there's nothing in the OIDC spec that requires that these be on the same domain. The only requirement is that The issuer returned by discovery MUST exactly match the value of iss in the ID Token.

@ericchiang
Copy link
Collaborator

@JohnOffenhartz the spec section you're looking for is https://openid.net/specs/openid-connect-discovery-1_0.html#ProviderConfig

OpenID Providers supporting Discovery MUST make a JSON document available at the path formed by concatenating the string /.well-known/openid-configuration to the Issuer.

We've seen this check regularly catch problems when users are referring to an provider through a DNS name alternative to the provider value. e.g. #121

What do the onelogin docs say in this case? Are they actually recommending using a value different then the issuer? What's the iss field for ID tokens issued for this provider?

@ericchiang
Copy link
Collaborator

Closing because it's no obvious there's a bug on our end. Please comment if you have more info and we can re-open.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants