Skip to content

Groups from Cognito passed as string instead of list #13701

Answered by nuttmeister
jhodnett2 asked this question in Q&A
Discussion options

You must be logged in to vote

@jhodnett2 @carlosElopezVecino same here. Think this is more an issue with Cognito rather than argo-cd since all custom attributes are strings or numbers and there is no way to transform these built-in.

I solved it by adding a pre-token lambda that takes my custom-attribute (that I get from one of the IdPs) custom:groups and adds them into cognito:groups (since that is a list in the token).

I also do some other things like rename/prefix the groups when adding them (since my IdP only returns uuids for the groups).

And when done I also remove the custom:groups claim from the token to avoid any confusion.

Let me know if you want the lambda code + tests (it's very small) and if you want the t…

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
1 reply
@carlosElopezVecino
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by jhodnett2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants