You've already forked step-ca-cli
mirror of
https://github.com/smallstep/cli.git
synced 2025-08-09 03:22:43 +03:00
Remove principals when OIDC provisioner is used.
OIDC provisioners use an identity function to get the principals for a given email, so there's no need to provide principals. Moreover, if the email and principal does not match `step ssh proxycommand` will fail if the username does not match the email address. For an unknown reason this feature was removed in an unrelated commit: smallstep/cli@2c9b200 Fixes smallstep/certificates#550
This commit is contained in:
@@ -202,6 +202,7 @@ func loginAction(ctx *cli.Context) error {
|
||||
// provisioner is responsible for setting default principals by using an
|
||||
// identity function.
|
||||
if email, ok := tokenHasEmail(token); ok {
|
||||
principals = []string{}
|
||||
subject = email
|
||||
}
|
||||
|
||||
|
@@ -147,6 +147,7 @@ func doLoginIfNeeded(ctx *cli.Context, subject string) error {
|
||||
// provisioner is responsible for setting default principals by using an
|
||||
// identity function.
|
||||
if email, ok := tokenHasEmail(token); ok {
|
||||
principals = []string{}
|
||||
subject = email
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user