argoproj / argoproj/argo-workflows
Allow string for "groups" in OIDC claims
- Dominant language
- Go
- Stars
- 17k
- Forks
- 3.7k
- Avg merge
- 1d 20h
- Merged PRs (30d)
- 138
Description
# Summary
Currently Argo Workflows only accepts array of strings for `groups` field from OIDC provider. https://github.com/argoproj/argo-workflows/blob/95cd467c7e75c38548bf42a5f3c940ac61568e4b/server/auth/types/claims.go#L13
So, the OIDC provider need to provide groups like this:
```json
"groups": ["user"]
```
But I'd like Argo Workflows accept string value as well.
```json
"groups": "user"
```
# Use Cases
Our OIDC provider returns string value as `groups` if the user only belong to one group. As I searched I could not find any standard schema definition of claims, so string `groups` is still possible. Also, I found similar issue in kubernetes repository which was accepted. https://github.com/kubernetes/kubernetes/pull/33332
---
**Message from the maintainers**:
Love this enhancement proposal? Give it a 👍. We prioritise the proposals with the most 👍.
Contributor guide
Research direction
Start in server/auth/types/claims.go at the OIDC groups claim definition and review how claims are decoded. Verify the behavior with the repository's existing authentication tests or test entry points, if available; done means both a single string and an array of strings are accepted without breaking the existing array form.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- authentication
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 55/100