Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add comment to auth scope #4341

Merged
merged 1 commit into from
Nov 8, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)
}
Loading