Add 'both' option to use team name AND slug in TeamNameField#1345
Conversation
d94387f to
00b9864
Compare
srenatus
left a comment
There was a problem hiding this comment.
Looks good code-wise -- could you add something to the connector docs, please?
Have to admit I don't completely understand why you'd want both, but I'm sure you've got reasons.
(💭 Got to be careful, at some point, JWT can be too large to be effectively handled. For example, if nginx is involved, it could spit upstream sent too big header while reading response header from upstream at you when you attempt to pass the giant JWT in a Location: redirect.)
|
@vito forgot to mention -- thank you for your contribution. 😃 👍 |
00b9864 to
b051960
Compare
|
Updated! And no problem. There should be more to come over the coming weeks as we try and slim down our fork's deltas. Thanks for the tip re: the header length, I'll keep an eye out for that. The reason we want both is that Concourse's dex integration allows whitelisting GitHub teams for Concourse teams, something like: Initially we just used the team name, but users kept trying to specify the slug when configuring teams and getting confused as to why auth wouldn't work (just because of a lowercase |
There was a problem hiding this comment.
❓ Would you mind much making this three blocks? Stdlib, third party, and anything starting with github.com/dexidp/dex? goimports has a setting for automatically doing this.
b051960 to
428fe82
Compare
this will result in both the team name *and* the team slug being returned for each team, allowing a bit more flexibility in auth validation. Signed-off-by: Topher Bullock <[email protected]> Signed-off-by: Alex Suraci <[email protected]>
428fe82 to
bb11a1e
Compare
…-slug Add 'both' option to use team name AND slug in TeamNameField This allows the connector to be configured with both so that both team names and slugs can be returned in the groups. This makes configuring teams in an application a bit more foolproof; we would often have confusion over whether the team name or slug should be given by the user, so it's easier to just allow both, since collisions shouldn't be possible anyway.
This allows the connector to be configured with
bothso that both team names and slugs can be returned in the groups. This makes configuring teams a bit more foolproof in Concourse; we would often have confusion over whether the team name or slug should be given by the user, so it's easier to just allow both, since collisions shouldn't be possible anyway.