-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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 Bitbucket connector #1307
Add Bitbucket connector #1307
Conversation
Excellent, we are really missing this capability from dex v1. It will be great to get it back. Thanks for your work @edtan. |
@srenatus any chance you could have a look at this PR or suggest somebody ? Thanks :-) |
I'll try to review this tomorrow. Sorry for the wait. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some comments, mostly minor nitpicks. Thank you for working on this 🎉
# Required field for connector id. | ||
id: bitbucket | ||
# Required field for connector name. | ||
name: Bitbucket |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🤔 This could also default to Bitbucket
but be configurable, I suppose?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I wasn't sure where we can set a default for the connector's name
. It seems like it currently just comes from the yaml?
connector/bitbucket/bitbucket.go
Outdated
// https://developer.atlassian.com/bitbucket/api/2/reference/resource/user | ||
type user struct { | ||
Username string `json:"username"` | ||
DisplayName string `json:"display_name"` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't seem to be using DisplayName
. I wonder if we could 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When adding the Bitbucket connector, I was initially working with Concourse's fork of Dex and they had added a Name
field to connector.Identity
, which is where DisplayName
was used. However, I forgot to remove this field earlier when working on this PR. I've removed the DisplayName
field now.
Thanks for working in this @edtan 🎉 Looking forward to testing it out. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you so much. I think this is a great addition 🎈
LGTM -- @ericchiang, any concerns on your end?
@ericchiang any chance you could have a look at this PR ? Thanks :-) |
none from me. Feel free to merge without my lgtm in the future 😄 |
Thanks, acknowledged 😃 |
@edtan Thanks a lot for your contribution 🎈 |
@edtan, @srenatus, @ericchiang Thanks a lot, this is very helpful for my team :-) |
…ector Add Bitbucket connector
This adds a connector for Bitbucket Cloud. It supports mapping a Bitbucket user's teams to the
groups
claim. Most of the code was based off of the existing Github and Microsoft connectors, so please let me know if I'm missing anything.