fix: return unauthenticated code (#6819)

* fix: return unauthenticated code

* remove cfg.yaml

---------

Co-authored-by: Livio Spring <livio.a@gmail.com>
This commit is contained in:
Elio Bischof 2023-10-27 08:09:07 +02:00 committed by GitHub
parent 0187487f26
commit a4626f9bdb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 12 additions and 2 deletions

View File

@ -109,9 +109,8 @@ func VerifyTokenAndCreateCtxData(ctx context.Context, token, orgID, orgDomain st
if err != nil {
var sysTokenErr error
sysMemberships, userID, sysTokenErr = t.VerifySystemToken(ctx, tokenWOBearer, orgID)
err = errors.Join(err, sysTokenErr)
if sysTokenErr != nil || sysMemberships == nil {
return CtxData{}, err
return CtxData{}, zitadel_errors.ThrowUnauthenticated(errors.Join(err, sysTokenErr), "AUTH-7fs1e", "Errors.Token.Invalid")
}
}
var projectID string

View File

@ -436,6 +436,7 @@ Errors:
AuditRetention: Историята е извън съхранението на журнала за проверка
Token:
NotFound: Токенът не е намерен
Invalid: Токенът е невалиден
UserSession:
NotFound: UserSession не е намерена
Key:

View File

@ -424,6 +424,7 @@ Errors:
AuditRetention: Änderungsverlauf ist ausserhalb der Audit Log Retention
Token:
NotFound: Token konnte nicht gefunden werden
Invalid: Token ist ungültig
UserSession:
NotFound: Benutzer Sitzung konnte nicht gefunden werden
Key:

View File

@ -424,6 +424,7 @@ Errors:
AuditRetention: History is outside of the Audit Log Retention
Token:
NotFound: Token not found
Invalid: Token is invalid
UserSession:
NotFound: UserSession not found
Key:

View File

@ -424,6 +424,7 @@ Errors:
AuditRetention: El histórico está fuera de la retención del registro de auditoría
Token:
NotFound: Token no encontrado
Invalid: Token no válido
UserSession:
NotFound: UserSession no encontrado
Key:

View File

@ -424,6 +424,7 @@ Errors:
AuditRetention: L'historique est en dehors de la rétention du journal d'audit
Token:
NotFound: Token non trouvé
Invalid: Le jeton n'est pas valide
UserSession:
NotFound: UserSession non trouvé
Key:

View File

@ -425,6 +425,7 @@ Errors:
AuditRetention: La storia è al di fuori della Ritenzione Audit Log
Token:
NotFound: Token non trovato
Invalid: Token non valido
UserSession:
NotFound: Sessione non trovata
Key:

View File

@ -413,6 +413,7 @@ Errors:
AuditRetention: 履歴は監査ログの管理外にあります
Token:
NotFound: トークンが見つかりません
Invalid: 無効なトークンです
UserSession:
NotFound: ユーザーが見つかりません
Key:

View File

@ -424,6 +424,7 @@ Errors:
AuditRetention: Историјата е надвор од задржувањето на аудитот
Token:
NotFound: Токенот не е пронајден
Invalid: Токенот е невалиден
UserSession:
NotFound: Корисничката сесија не е пронајдена
Key:

View File

@ -424,6 +424,7 @@ Errors:
AuditRetention: Historia jest poza zasięgiem retencji dziennika audytu
Token:
NotFound: Token nie znaleziony
Invalid: Token jest nieprawidłowy
UserSession:
NotFound: Sesja użytkownika nie znaleziona
Key:

View File

@ -422,6 +422,7 @@ Errors:
AuditRetention: O histórico está fora do período de retenção do registro de auditoria
Token:
NotFound: Token não encontrado
Invalid: Token inválido
UserSession:
NotFound: Sessão do usuário não encontrada
Key:

View File

@ -424,6 +424,7 @@ Errors:
AuditRetention: 历史记录在审核日志保留范围之外
Token:
NotFound: 令牌不存在
Invalid: 令牌无效
UserSession:
NotFound: 用户会话不存在
Key: