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

Fetch groups in a Google Connector #1185

Merged
merged 9 commits into from
Nov 27, 2019

Conversation

JoelSpeed
Copy link
Contributor

Fixes #866 #1001

This PR should not be used without #1180. Wanted to get the PR opened though in case anyone wants this feature urgently and can't wait until both PRs are merged.

I have created a separate Google connector that uses a service account to fetch all groups that a user is a member of.

I wasn't sure which documentation would need to be updated so I have added a document explaining the new parameters and how to set up the Google service account, but I reckon this will need extra documentation changes before it can be merged, let me know what it needs.

@jhohertz
Copy link

Just wanted to note I am presently testing this variation (plus #1180) and find it to be a valuable addition.

What needs to happen to have the code mainlined? Happy to help in any way I can.

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.

mostly just nits.

you'll need to update the dependencies, we switched to Go modules since this PR was originally authored.

// Config holds configuration options for Google logins.
type Config struct {
ClientID string `json:"clientID"`
ClientSecret string `json:"clientSecret"`
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: can this be optionally read from a file? e.g. ClientSecretFile

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't see this being done in any of the other connectors but could add this. I assume the ClientSecretFile would just contain a single string? Or is there a format for files from Google containing the ClientSecret?

connector/google/google.go Show resolved Hide resolved
connector/google/google.go Outdated Show resolved Hide resolved
@JoelSpeed
Copy link
Contributor Author

I've rebased and addressed a couple of your comments @ericchiang

Took me a while to work out go mod as I haven't used it before but I think I got it. I need to squash the commits down before we merge this, should I prefix the commit messages based on where the commit touches?

@tsuna
Copy link
Contributor

tsuna commented May 23, 2019

ping pretty please :)

@ericchiang
Copy link
Contributor

Still blocked on #1180, right?

@JoelSpeed
Copy link
Contributor Author

Still blocked on #1180 indeed, apologies all, will get back on to that once I'm recovered from KubeCon 😴

@surajssd
Copy link

It would be awesome to have this feature in dex master! Really waiting for this to be merged!

@jhohertz
Copy link

jhohertz commented Oct 3, 2019

I'd like to test this w/ #1180 , any way we could see this rebased?

@JoelSpeed
Copy link
Contributor Author

@jhohertz I've just rebased this branch, you should be able to test with 1180 with a little work

@jhohertz
Copy link

Testing the rebased PR... This is working well along with #1180

What do we need to do to see this get merged?

@quantonganh
Copy link

#1180 has been merged.

@ericchiang @bonifaido Do you have some time to take a review?

@bonifaido
Copy link
Member

Just checking this.

@justaugustus
Copy link
Member

justaugustus commented Nov 27, 2019

@srenatus @rithujohn191 -- Can you take a look at this one?

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, tested locally, works great!

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.

Google IAM Groups extension
9 participants