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

Add ssoIssuer to fix Response issuer checking #885

Merged
merged 2 commits into from
Apr 6, 2017

Conversation

Calpicow
Copy link
Contributor

Fixes #884

@Calpicow
Copy link
Contributor Author

Calpicow commented Mar 29, 2017

Just realized we already have AudienceRestriction checking in https://github.com/coreos/dex/blob/master/connector/saml/saml.go#L462. Should we remove the checking altogether?

Edit: Decided to add optional ssoIssuer to perform checking on. What do you guys think?

@Calpicow Calpicow changed the title Fix issuer checking to use AudienceRestriction Add ssoIssuer to fix Response issuer checking Mar 29, 2017
@ericchiang ericchiang self-requested a review March 29, 2017 04:25
SSOURL string `json:"ssoURL"`
// Issuer refers to the SP issuer
Issuer string `json:"issuer"`
SSOIssuer string `json:"ssoIssuer"`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm a little confused by this fix. What's SSOIssuer? How is it different than issuer? What part of the spec is enforcing this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Refer to the issue I filed. In a nutshell, there appears to be some confusion between the SP issuer and IDP issuer.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay thanks. Give me a few to read up on your linked article.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Any updates? We don't really need to add this field, and just remove the Response issuer checking if you like.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, we've been dealing with a security issue in this connector. Please see https://groups.google.com/forum/#!topic/coreos-user/s_BWh4a3E1Y

}
if redirectURI == "" {
redirectURI = defaultRedirectURI
}
now, _ := time.Parse(time.RFC3339, "2017-01-24T20:48:41Z")
timeFunc := func() time.Time { return now }
return &provider{
issuer: issuer,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, trying to re-review this. Issuer is no longer being used here then, correct? I was under the impression that issuer was supposed to be the value that you've changed to ssoIssuer to anyway. E.g. that issuer should just be http://www.okta.com/exk91cb99lKkKSYoy0h7.

Maybe this an issue with the documentation?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, nvm I see what you're saying.

@ericchiang
Copy link
Contributor

Couple comments:

So we might want to rename issuer in this case, since it has different meanings for OpenID Connect. Issuer means the remote provider, not the dex server. Maybe SSOIssuer and EntityIssuer?

Also is this always going to be the same or different then redirectURI?

@Calpicow
Copy link
Contributor Author

Calpicow commented Apr 6, 2017

It is possible for issuer it to be different than redirectURI. I've avoided renaming issuer since it would be a breaking change, but I'm open to that.

@ericchiang
Copy link
Contributor

I've avoided renaming issuer since it would be a breaking change, but I'm open to that.

We've marked it experimental explicitly so we can do these kind of breaking changes :)

@ericchiang
Copy link
Contributor

(to give a timeline, we'd like to do one final push over the next couple days to get it to stable)

@Calpicow
Copy link
Contributor Author

Calpicow commented Apr 6, 2017

Done

Copy link
Contributor

@ericchiang ericchiang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm, thanks!

@ericchiang ericchiang merged commit 40f0265 into dexidp:master Apr 6, 2017
@Calpicow Calpicow deleted the saml_issuer_fix branch June 20, 2017 20:41
mmrath pushed a commit to mmrath/dex that referenced this pull request Sep 2, 2019
Add ssoIssuer to fix Response issuer checking
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

Successfully merging this pull request may close these issues.

2 participants