fix(cli): prefer user/api audience for mixed-aud JWTs#2828
fix(cli): prefer user/api audience for mixed-aud JWTs#2828SergioChan wants to merge 1 commit intochainloop-dev:mainfrom
Conversation
Signed-off-by: Sergio <c@rct.ai>
b3a0ca9 to
5885882
Compare
|
Thanks for the checks — I force-pushed an amended commit with DCO sign-off so the DCO status should now pass. No functional code changes were introduced in this push. |
|
Thanks for the contribution Could you elaborate on what was the root cause of the problem? Thanks |
|
Thanks for the detailed review feedback 鈥?I鈥檓 working through the requested updates and will post a focused patch (or direct answers) shortly. |
1 similar comment
|
Thanks for the detailed review feedback 鈥?I鈥檓 working through the requested updates and will post a focused patch (or direct answers) shortly. |
|
Thanks for asking — root cause was in the CLI audience selection logic, not tmux itself. Before this patch, we effectively trusted the first value when That caused the CLI to classify the token via the generic audience path and then fall back to issuer resolution ( The fix changes audience handling to treat |
Summary
audclaims as an ordered set instead of trusting the first item in an arrayapi-token-auth.chainloopanduser-auth.chainloopahead of genericchainloopwhen multiple audiences are present["chainloop", "user-auth.chainloop"]) so user identity is selected instead of issuer fallbackTesting
go test ./app/cli/internal/tokenRelated