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 option to enable groups for oidc connectors #1434

Merged
merged 1 commit into from
Nov 27, 2019

Conversation

jacksontj
Copy link
Contributor

There's been some discussion in #1065 regarding what to do about
refreshing groups. As it stands today dex doesn't update any of the
claims on refresh (groups would just be another one). The main concern
with enabling it is that group claims may change more frequently. While
we continue to wait on the upstream refresh flows, this adds an option
to enable the group claim. This is disabled by default (so no behavioral
change) but enables those that are willing to have the delay in group
claim change to use oidc IDPs.

Workaround to #1065

@jacksontj
Copy link
Contributor Author

cc @ericchiang (as you seem to be the one working with PRs :) )

@ericchiang
Copy link
Contributor

dup of #1180

@ericchiang ericchiang closed this May 12, 2019
@jacksontj
Copy link
Contributor Author

@ericchiang I looked over #1180 I don't see it adding the groups claim for oidc connectors? From my reading that PR adds better support for refresh no changes in the oidc connector for groups; which seems to indicate that this PR is still needed.

@tsuna
Copy link
Contributor

tsuna commented May 23, 2019

ping? thanks :)

@jacksontj
Copy link
Contributor Author

cc @ericchiang ^^

@ericchiang
Copy link
Contributor

Currently dex clients can refresh their IDToken with dex. When using an upstream OpenID Connect provider, the groups will be populated when the user logs in. But if the client refreshes, the groups aren't updated. I don't want to add groups until we can refresh them.

@jacksontj
Copy link
Contributor Author

Why don't we want to add them? Not all claims are guaranteed to be refreshed as-is, and this specifically calls it out in the docs (not to mention its off by default). Without this it is impossible to do groups with an oidc upstream regardless of your dex configuration.

@jacksontj
Copy link
Contributor Author

@ericchiang bump ^^

1 similar comment
@jacksontj
Copy link
Contributor Author

@ericchiang bump ^^

@JAtula
Copy link

JAtula commented Jul 24, 2019

I'd rather have groups not refreshing than not having them at all.

@jacksontj
Copy link
Contributor Author

cc @JoelSpeed and @srenatus (2 other active maintainers)

@srenatus
Copy link
Contributor

srenatus commented Sep 3, 2019

Not caught up on the state of the OIDC connector, sorry. I'll try to get up to speed...

@JoelSpeed
Copy link
Contributor

I believe this is blocked on #1180 and #1185, I don't have time right now to separate the PRs as suggested though, does anyone else have any bandwidth for updating them?

@jacksontj
Copy link
Contributor Author

jacksontj commented Sep 3, 2019

@JoelSpeed AFAIk this is not blocked on either of those. Those PRs are for implementing refresh; this PR is to add groups to the oidc connector.

(Those PRs are the google connector, this is the oidc one)

@JoelSpeed
Copy link
Contributor

I'm still with the standpoint that we shouldn't be providing group information until we can properly refresh them (as mentioned #1434 (comment)), so in my view the refresh work blocks them. @srenatus Do you agree that refresh should block groups so that we don't allow people to continue to have groups they may have been removed from, seems like a major security risk to me.

Also, if you have a moment, could you look at #1180 and see what you think needs doing before we merge, I don't think I have much time at the moment but may be able to squeeze a little in if that PR will unblock other stuff

@jacksontj
Copy link
Contributor Author

refresh should block groups so that we don't allow people to continue to have groups they may have been removed from, seems like a major security risk to me.

Unfortunately we've been waiting for refresh groups for >1year (longer than this PR has been open :( ) -- which is why this PR specifically adds it as an optional config which is disabled by default. This way users can decide they are willing to take the risk and/or mitigate it some other way (setting short id token lifetimes, etc.)

I'd be okay to implement refresh (presumably just hit the userinfo endpoint and update from there) -- but we'd need #1180 merged to do so -- and I would need to make a new PR since this one was closed (unfortunately it was closed erroneously as a dupe of #1180 initially :/ ).

@JoelSpeed JoelSpeed reopened this Sep 4, 2019
@JoelSpeed
Copy link
Contributor

I could potentially see us merging this before #1180 if we renamed the option to make it more obvious that it is insecure. Though this decision is not just up to me.

My suggestion would be to call the option insecureEnableGroups, but I'd like opinions from the other maintainers first.

The will however, be creating deprecation work once the refreshing is actually merged.

In the mean time, I've reopened the PR, so if @srenatus and @bonifaido agree with my suggestion, would you be ok to fix up the conflicts and do the rename?

@jacksontj
Copy link
Contributor Author

In the mean time, I've reopened the PR, so if @srenatus and @bonifaido agree with my suggestion, would you be ok to fix up the conflicts and do the rename?

Definitely -- and if not I'll just update this PR with the refresh path once ready.

@bonifaido
Copy link
Member

I had a look at #1180 which looks good to me (I would be happy to see that merged as well since we started to rely on the refresh mechanism in other providers, and OIDC would be needed as well), great work!

I agree with the insecureEnableGroups renaming as well (as for the email).

@srenatus
Copy link
Contributor

srenatus commented Sep 5, 2019

👍 Let's get this moving! Thanks to everyone involved, and those waiting for bearing with the delays 😉

@jacksontj
Copy link
Contributor Author

Do we have an idea of when we'd get #1180 in or what is left to get that in? If that is soon I'd rather go that approach, but seeing as its been a long time I'm not sure if/when it'll get done :/

@jacksontj
Copy link
Contributor Author

PR updated with requested rename; hopefully we can get this merged in soon :)

cc @JoelSpeed @srenatus

@jacksontj jacksontj force-pushed the groups branch 3 times, most recently from 2408de7 to e1723dd Compare September 13, 2019 18:36
There's been some discussion in dexidp#1065 regarding what to do about
refreshing groups. As it stands today dex doesn't update any of the
claims on refresh (groups would just be another one). The main concern
with enabling it is that group claims may change more frequently. While
we continue to wait on the upstream refresh flows, this adds an option
to enable the group claim. This is disabled by default (so no behavioral
change) but enables those that are willing to have the delay in group
claim change to use oidc IDPs.

Workaround to dexidp#1065
@jacksontj
Copy link
Contributor Author

bump @JoelSpeed @srenatus

1 similar comment
@jacksontj
Copy link
Contributor Author

bump @JoelSpeed @srenatus

@JoelSpeed
Copy link
Contributor

Hey @jacksontj, I fixed up #1180, I think that long term it may be a better route to go down if we can get that reviewed and merged, would you be up for doing a sanity check on it?

@jacksontj
Copy link
Contributor Author

I do agree that #1180 is the correct long-term solution, but my understanding of some previous comments (e.g. #1434 (comment) ) was that we'd merge this first. I'm okay to wait-- but its already been a month, do we have any idea how much longer it'll take to get refresh in?

@JoelSpeed
Copy link
Contributor

JoelSpeed commented Oct 2, 2019

but my understanding of some previous comments

Yeah I'm ok with merging this first tbh, but I think #1180 is close to landing
I have bandwidth to work on it currently just need reviews and approval from a different maintainer

but its already been a month, do we have any idea how much longer it'll take to get refresh in?

I'm sorry it's taken so long. I don't know what other maintainers schedules are like, I'm unfortunately waiting for them on 1180. But I will make sure to address any feedback on that PR promptly if there is anything further needed

@colinhoglund
Copy link

colinhoglund commented Nov 19, 2019

@bonifaido @jacksontj Any chance of this PR getting merged soon since #1180 is now merged? Would love to benefit from this without needing to fork dex!

@jhohertz
Copy link

Would something need to be done here to see #1185 land in mainline? Curious, as it sounds like some overlap in the areas of concern.

@dskatz
Copy link

dskatz commented Nov 20, 2019

I'd like to see OIDC Groups claims independently of the google connector modifications in #1185.

@bonifaido bonifaido self-assigned this Nov 27, 2019
Copy link
Member

@bonifaido bonifaido 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 @srenatus do you think we can merge this now?

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

Successfully merging this pull request may close these issues.

10 participants