Explorar el Código

Revert using preferred_username

It might present a security issue if the users can change this value for themselves. Needs further investigation
Cristian Le hace 5 años
padre
commit
decf0fc8ce
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  1. 2 1
      authority/provisioner/oidc.go

+ 2 - 1
authority/provisioner/oidc.go

@@ -389,7 +389,8 @@ func (o *OIDC) AuthorizeSSHSign(ctx context.Context, token string) ([]SignOption
 
 	// Get the identity using either the default identityFunc or one injected
 	// externally. Note that the PreferredUsername might be empty.
-	iden, err := o.getIdentityFunc(ctx, o, claims.Email, claims.PreferredUsername)
+	// TBD: Would preferred_username present a safety issue here?
+	iden, err := o.getIdentityFunc(ctx, o, claims.Email)
 	if err != nil {
 		return nil, errs.Wrap(http.StatusInternalServerError, err, "oidc.AuthorizeSSHSign")
 	}