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)
|
err = crypto.CompareHash(app.OIDCConfig.ClientSecret, []byte(secret), es.passwordAlg)
|
||||||
spanHash.EndWithError(err)
|
spanHash.EndWithError(err)
|
||||||
if err == nil {
|
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 {
|
err = es.setOIDCClientSecretCheckResult(ctx, existingProject, app.AppID, OIDCClientSecretCheckFailedAggregate)
|
||||||
return err
|
logging.Log("EVENT-GD1gh").OnError(err).Warn("could not push event OIDCClientSecretCheckFailed")
|
||||||
}
|
return caos_errs.ThrowInvalidArgument(nil, "EVENT-wg24q", "Errors.Project.OIDCSecretInvalid")
|
||||||
return caos_errs.ThrowInvalidArgument(nil, "EVENT-wg24q", "Errors.Internal")
|
|
||||||
}
|
}
|
||||||
|
|
||||||
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 {
|
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
|
GrantNotExists: Projekt Grant existiert nicht
|
||||||
GrantHasNotExistingRole: Eine der Rollen existiert nicht auf dem Projekt
|
GrantHasNotExistingRole: Eine der Rollen existiert nicht auf dem Projekt
|
||||||
UserIDMisisng: User ID fehlt
|
UserIDMisisng: User ID fehlt
|
||||||
|
OIDCSecretInvalid: Client Secret ist ungültig
|
||||||
IAM:
|
IAM:
|
||||||
MemberInvalid: Member ist ungültig
|
MemberInvalid: Member ist ungültig
|
||||||
MemberAlreadyExisting: Member existiert bereits
|
MemberAlreadyExisting: Member existiert bereits
|
||||||
|
@ -165,6 +165,7 @@ Errors:
|
|||||||
GrantNotExists: Project grant doesn't exist
|
GrantNotExists: Project grant doesn't exist
|
||||||
GrantHasNotExistingRole: One role doesn't exist on project
|
GrantHasNotExistingRole: One role doesn't exist on project
|
||||||
UserIDMisisng: User ID missing
|
UserIDMisisng: User ID missing
|
||||||
|
OIDCSecretInvalid: Client Secret is invalid
|
||||||
IAM:
|
IAM:
|
||||||
MemberInvalid: Member is invalid
|
MemberInvalid: Member is invalid
|
||||||
MemberAlreadyExisting: Member already exists
|
MemberAlreadyExisting: Member already exists
|
||||||
|
Loading…
Reference in New Issue
Block a user