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 { if err != nil {
var sysTokenErr error var sysTokenErr error
sysMemberships, userID, sysTokenErr = t.VerifySystemToken(ctx, tokenWOBearer, orgID) sysMemberships, userID, sysTokenErr = t.VerifySystemToken(ctx, tokenWOBearer, orgID)
err = errors.Join(err, sysTokenErr)
if sysTokenErr != nil || sysMemberships == nil { 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 var projectID string

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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