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

connector/oidc: expose oauth2.RegisterBrokenAuthHeaderProvider #860

Merged
merged 2 commits into from
Mar 20, 2017

Conversation

ericchiang
Copy link
Contributor

closes #859

@curtisallen if you can confirm the fix I'll add docs and such.

Copy link

@curtisallen curtisallen left a comment

Choose a reason for hiding this comment

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

Great works like a charm for me.
Thanks for fixing this so quickly!

@ericchiang
Copy link
Contributor Author

@curtisallen do you have any suggestions for setting up okta as an OpenID Connect provider? I've tried with their free tier, but only see options for SAML and their SOO solution. We'd like to test this internally.

@ericchiang
Copy link
Contributor Author

Basically, I've tried following this doc but it looks outdated or not available on the free tier https://support.okta.com/help/Documentation/Knowledge_Article/Using-OpenID-Connect

@curtisallen
Copy link

@ericchiang yeah absolutely setting up an OIDC app is hidden this guide is really useful https://help.okta.com/en/prev/Content/Topics/Apps/Apps_App_Integration_Wizard.htm#OIDCWizard

@curtisallen
Copy link

You'll basically end up with a app like this
screen shot 2017-03-17 at 2 00 04 pm

@ericchiang
Copy link
Contributor Author

Yeah that's really weird, I don't see those options on my dev account. Blah.

@curtisallen
Copy link

Oh strange maybe you have a make a new account or something (perhaps it's out of beta) ¯_(ツ)_/¯

@ericchiang ericchiang force-pushed the oidc-broken-auth-header branch from 6ba88d4 to 179d059 Compare March 17, 2017 20:23
@ericchiang
Copy link
Contributor Author

@curtisallen @rithujohn191 ptal

@rithujohn191
Copy link
Contributor

Do you wanna add an example of its usage here: https://github.com/coreos/dex/blob/master/examples/config-dev.yaml#L58 ?

// avoid having to explicitly set "basicAuthUnsupported" in their config.
//
// Setting the config field always overrides values returned by this function.
func knownBrokenAuthHeaderProvider(issuerURL string) bool {

Choose a reason for hiding this comment

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

IMO implementing a known list of broken providers isn't a good idea. This list will grow and grow over time just like it has in oauth2 violating the open close principle.

I think it's better to rely on clear documentation in this case

Choose a reason for hiding this comment

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

conversely, not all IDPs have nice error messages like Okta so things could fail and operators will have no idea why... So I can see both sides of it

Copy link
Contributor Author

@ericchiang ericchiang Mar 17, 2017

Choose a reason for hiding this comment

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

If we can detect cases where someone will always have to set the basicAuthUnsupported flag then I think we should just avoid the overhead and do it automatically. These providers being weird shouldn't cost our users ease of use, and maintaining a list isn't that bad.

@ericchiang
Copy link
Contributor Author

@rithujohn191 let me add a note here https://github.com/coreos/dex/blob/master/Documentation/openid-connect.md

@ericchiang
Copy link
Contributor Author

@rithujohn191 docs added.

// Detect Okta.
//
// https://github.com/coreos/dex/issues/859
for _, host := range []string{"okta.com", "oktapreview.com"} {

Choose a reason for hiding this comment

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

Perhaps this list should be defined separately above?

@ericchiang ericchiang force-pushed the oidc-broken-auth-header branch from 5465c70 to d7c450f Compare March 20, 2017 15:39
@ericchiang ericchiang force-pushed the oidc-broken-auth-header branch from d7c450f to f503ff7 Compare March 20, 2017 15:47
Copy link
Contributor

@rithujohn191 rithujohn191 left a comment

Choose a reason for hiding this comment

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

lgtm

@ericchiang ericchiang merged commit 25fdaa6 into dexidp:master Mar 20, 2017
@ericchiang ericchiang deleted the oidc-broken-auth-header branch March 20, 2017 16:56
mmrath pushed a commit to mmrath/dex that referenced this pull request Sep 2, 2019
connector/oidc: expose oauth2.RegisterBrokenAuthHeaderProvider
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.

odic connector: Expose x/oauth2#RegisterBrokenAuthHeaderProvider to clients
3 participants