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

Create option to skip verified email check in OIDC provider #159

Merged
merged 4 commits into from
Jul 11, 2019

Conversation

djfinlay
Copy link
Contributor

Motivation and Context

Some OIDC identity providers don't verify email addresses but still set the "email_verified" claim to false, which results in a 500 error from oauth2_proxy. This option allows the "email_verified" check to be skipped.

Fixes #117

How Has This Been Tested?

Tested manually using the docker container with Auth0 as an OIDC provider:

  • use default settings
  • try to log in using an account with an unverified email address and get a 500 response
  • set --oidc-allow-unverified-email
  • try to log in with the same account and get proxied to the upstream

Checklist:

  • My change requires a change to the documentation or CHANGELOG.
  • I have updated the documentation/CHANGELOG accordingly.
  • I have created a feature (non-master) branch for my PR.

@djfinlay djfinlay requested a review from a team May 20, 2019 16:18
Copy link
Member

@JoelSpeed JoelSpeed left a comment

Choose a reason for hiding this comment

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

One quick fix then this LGTM, thank!

options.go Outdated Show resolved Hide resolved
@djfinlay djfinlay force-pushed the wip/allow-unverified-email branch from 4fe18a2 to be6d5c8 Compare May 20, 2019 20:25
@anthonymejia
Copy link

Is this good to merge?

@poblin-orange
Copy link

Will this feature be merged ? (blocking issue to use OIDC provider like UAA)

Copy link
Member

@JoelSpeed JoelSpeed left a comment

Choose a reason for hiding this comment

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

Just one final thought having looked at this, how do you feel about renaming the flag to be prefixed with insecure to let people know this is an insecure option, I'm thinking like insecure-skip-tls-verify for isntance?

Also, please add a note to the Changelog before we merge

@djfinlay djfinlay force-pushed the wip/allow-unverified-email branch from 3e62474 to 776d063 Compare July 11, 2019 14:31
docs/configuration/configuration.md Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
Copy link
Member

@JoelSpeed JoelSpeed left a comment

Choose a reason for hiding this comment

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

Looks good, thanks!

@JoelSpeed JoelSpeed merged commit a83c5ea into oauth2-proxy:master Jul 11, 2019
@iamfarsk
Copy link

My oidc provider return email_verified claim as string instead of boolean. This is causing an unmarshalling issue during callback handling. Is there a way to get rid off it. I tried using "allow-unverified-emails" but that didn't work.

@hamza3202
Copy link

@iamfarsk were you able to make this work?

@iamfarsk
Copy link

iamfarsk commented Feb 22, 2021 via email

@hamza3202
Copy link

I had skipped the --provider flag and thats why it wasn't working. Perhaps code can be improved so that it only reads fields relevant to a provider.

Jing-ze pushed a commit to Jing-ze/oauth2-proxy that referenced this pull request Nov 19, 2024
T-vK pushed a commit to T-vK/oauth2-proxy that referenced this pull request Nov 20, 2024
…text_improvements

Improved securityContext and timeout of the initContainer wait-for-redis
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.

Ability to ignore unverified email
6 participants