mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 02:54:20 +00:00
fix: don't fail if OIDCClientSecretCheckSucceeded event can not be pushed (#1131)
This commit is contained in:
parent
6a05527f18
commit
273b7487b3
@ -811,12 +811,13 @@ func (es *ProjectEventstore) VerifyOIDCClientSecret(ctx context.Context, project
|
||||
err = crypto.CompareHash(app.OIDCConfig.ClientSecret, []byte(secret), es.passwordAlg)
|
||||
spanHash.EndWithError(err)
|
||||
if err == nil {
|
||||
return es.setOIDCClientSecretCheckResult(ctx, existingProject, app.AppID, OIDCClientSecretCheckSucceededAggregate)
|
||||
err = es.setOIDCClientSecretCheckResult(ctx, existingProject, app.AppID, OIDCClientSecretCheckSucceededAggregate)
|
||||
logging.Log("EVENT-AE1vf").OnError(err).Warn("could not push event OIDCClientSecretCheckSucceeded")
|
||||
return nil
|
||||
}
|
||||
if err := es.setOIDCClientSecretCheckResult(ctx, existingProject, app.AppID, OIDCClientSecretCheckFailedAggregate); err != nil {
|
||||
return err
|
||||
}
|
||||
return caos_errs.ThrowInvalidArgument(nil, "EVENT-wg24q", "Errors.Internal")
|
||||
err = es.setOIDCClientSecretCheckResult(ctx, existingProject, app.AppID, OIDCClientSecretCheckFailedAggregate)
|
||||
logging.Log("EVENT-GD1gh").OnError(err).Warn("could not push event OIDCClientSecretCheckFailed")
|
||||
return caos_errs.ThrowInvalidArgument(nil, "EVENT-wg24q", "Errors.Project.OIDCSecretInvalid")
|
||||
}
|
||||
|
||||
func (es *ProjectEventstore) setOIDCClientSecretCheckResult(ctx context.Context, project *proj_model.Project, appID string, check func(*es_models.AggregateCreator, *model.Project, string) es_sdk.AggregateFunc) error {
|
||||
|
@ -165,6 +165,7 @@ Errors:
|
||||
GrantNotExists: Projekt Grant existiert nicht
|
||||
GrantHasNotExistingRole: Eine der Rollen existiert nicht auf dem Projekt
|
||||
UserIDMisisng: User ID fehlt
|
||||
OIDCSecretInvalid: Client Secret ist ungültig
|
||||
IAM:
|
||||
MemberInvalid: Member ist ungültig
|
||||
MemberAlreadyExisting: Member existiert bereits
|
||||
|
@ -165,6 +165,7 @@ Errors:
|
||||
GrantNotExists: Project grant doesn't exist
|
||||
GrantHasNotExistingRole: One role doesn't exist on project
|
||||
UserIDMisisng: User ID missing
|
||||
OIDCSecretInvalid: Client Secret is invalid
|
||||
IAM:
|
||||
MemberInvalid: Member is invalid
|
||||
MemberAlreadyExisting: Member already exists
|
||||
|
Loading…
Reference in New Issue
Block a user