Skip to content

Commit

Permalink
Merge 7383037 into 1b92105
Browse files Browse the repository at this point in the history
  • Loading branch information
wild-endeavor authored Nov 1, 2023
2 parents 1b92105 + 7383037 commit f60dc56
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion flyteadmin/auth/token.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,12 @@ func IdentityContextFromIDTokenToken(ctx context.Context, tokenStr, clientID str
logger.Infof(ctx, "Failed to unmarshal claims from id token, err: %v", err)
}

// TODO: Document why automatically specify "all" scope
// This path is used when a user logs into the UI and when you login through the UI, you should have all the capabilities your identity
// allows you to have, which is denoted by the "all" scope.
// There was a plan to one day define one of a handful of scopes (all, proj admin, user, viewer) and if you configure your IDP
// to issue the right scopes, admin can do very light weight 'AuthZ' on admin based on these scopes, but until that plan is effected,
// we just use this single scope that Admin expects for all methods
// And because not all IdPs allow us to configure the Identity Token claims, the scope needs to live here.
return NewIdentityContext(idToken.Audience[0], idToken.Subject, "", idToken.IssuedAt,
sets.NewString(ScopeAll), userInfo, claims)
}

0 comments on commit f60dc56

Please sign in to comment.