forked from baron/baron-sso
감사 로그 403 권한 안내 문구 및 locale 키 반영
This commit is contained in:
@@ -26,16 +26,16 @@ func TestDevHandler_Isolation(t *testing.T) {
|
||||
if r.Method == http.MethodGet && r.URL.Path == "/clients" {
|
||||
return httpJSONAny(r, http.StatusOK, []map[string]interface{}{
|
||||
{
|
||||
"client_id": "client-tenant-a",
|
||||
"client_name": "App Tenant A",
|
||||
"client_id": "client-tenant-a",
|
||||
"client_name": "App Tenant A",
|
||||
"token_endpoint_auth_method": "none", // PKCE
|
||||
"metadata": map[string]interface{}{"tenant_id": "tenant-a"},
|
||||
"metadata": map[string]interface{}{"tenant_id": "tenant-a"},
|
||||
},
|
||||
{
|
||||
"client_id": "client-tenant-b",
|
||||
"client_name": "App Tenant B",
|
||||
"client_id": "client-tenant-b",
|
||||
"client_name": "App Tenant B",
|
||||
"token_endpoint_auth_method": "none", // PKCE
|
||||
"metadata": map[string]interface{}{"tenant_id": "tenant-b"},
|
||||
"metadata": map[string]interface{}{"tenant_id": "tenant-b"},
|
||||
},
|
||||
}), nil
|
||||
}
|
||||
@@ -46,10 +46,10 @@ func TestDevHandler_Isolation(t *testing.T) {
|
||||
tenantID = "tenant-b"
|
||||
}
|
||||
return httpJSONAny(r, http.StatusOK, map[string]interface{}{
|
||||
"client_id": id,
|
||||
"client_name": "App " + id,
|
||||
"client_id": id,
|
||||
"client_name": "App " + id,
|
||||
"token_endpoint_auth_method": "none",
|
||||
"metadata": map[string]interface{}{"tenant_id": tenantID},
|
||||
"metadata": map[string]interface{}{"tenant_id": tenantID},
|
||||
}), nil
|
||||
}
|
||||
if r.Method == http.MethodPost && r.URL.Path == "/clients" {
|
||||
|
||||
@@ -180,7 +180,8 @@ function AuditLogsPage() {
|
||||
);
|
||||
}
|
||||
|
||||
const errMsg = axiosError.response?.data?.error ?? (query.error as Error).message;
|
||||
const errMsg =
|
||||
axiosError.response?.data?.error ?? (query.error as Error).message;
|
||||
return (
|
||||
<div className="p-8 text-center text-red-500">
|
||||
{t("msg.dev.audit.load_error", "Error loading logs: {{error}}", {
|
||||
|
||||
@@ -113,7 +113,10 @@ function ClientsPage() {
|
||||
labelKey: "ui.dev.clients.stats.auth_failures",
|
||||
labelFallback: "Auth Failures (24h)",
|
||||
value: authFailures.toString(),
|
||||
deltaKey: authFailures > 0 ? "ui.dev.clients.stats.alert" : "ui.dev.clients.stats.stable",
|
||||
deltaKey:
|
||||
authFailures > 0
|
||||
? "ui.dev.clients.stats.alert"
|
||||
: "ui.dev.clients.stats.stable",
|
||||
deltaFallback: authFailures > 0 ? "Check Logs" : "Stable",
|
||||
tone: authFailures > 0 ? ("down" as const) : ("stable" as const),
|
||||
},
|
||||
@@ -285,11 +288,11 @@ function ClientsPage() {
|
||||
<span className="text-3xl font-bold">{item.value}</span>
|
||||
<Badge
|
||||
variant={
|
||||
item.tone === "up"
|
||||
? "success"
|
||||
: item.tone === "down"
|
||||
? "destructive"
|
||||
: "muted"
|
||||
item.tone === "up"
|
||||
? "success"
|
||||
: item.tone === "down"
|
||||
? "destructive"
|
||||
: "muted"
|
||||
}
|
||||
className={cn(
|
||||
"px-2",
|
||||
|
||||
@@ -957,6 +957,9 @@ logout = "Logout"
|
||||
load_more = "Load more"
|
||||
title = "Audit Logs"
|
||||
|
||||
[ui.dev.audit.registry]
|
||||
title = "Audit registry"
|
||||
|
||||
[ui.dev.audit.filter]
|
||||
action = "Filter by Action (e.g. ROTATE_SECRET)"
|
||||
client_id = "Filter by Client ID"
|
||||
|
||||
@@ -957,6 +957,9 @@ logout = "로그아웃"
|
||||
load_more = "더 보기"
|
||||
title = "감사 로그"
|
||||
|
||||
[ui.dev.audit.registry]
|
||||
title = "Audit registry"
|
||||
|
||||
[ui.dev.audit.filter]
|
||||
action = "액션으로 필터 (예: ROTATE_SECRET)"
|
||||
client_id = "Client ID로 필터"
|
||||
|
||||
@@ -969,6 +969,9 @@ logout = ""
|
||||
load_more = ""
|
||||
title = ""
|
||||
|
||||
[ui.dev.audit.registry]
|
||||
title = ""
|
||||
|
||||
[ui.dev.audit.filter]
|
||||
action = ""
|
||||
client_id = ""
|
||||
|
||||
@@ -268,6 +268,7 @@ logout_confirm = "Are you sure you want to log out?"
|
||||
|
||||
[msg.dev.audit]
|
||||
empty = "No audit logs found."
|
||||
forbidden = "You do not have permission to view audit logs. Please request access from an administrator."
|
||||
load_error = "Error loading audit logs: {{error}}"
|
||||
loaded_count = "Loaded {{count}} rows"
|
||||
loading = "Loading audit logs..."
|
||||
@@ -1116,6 +1117,9 @@ logout = "Logout"
|
||||
load_more = "Load more"
|
||||
title = "Audit Logs"
|
||||
|
||||
[ui.dev.audit.registry]
|
||||
title = "Audit registry"
|
||||
|
||||
[ui.dev.audit.filter]
|
||||
action = "Filter by Action (e.g. ROTATE_SECRET)"
|
||||
client_id = "Filter by Client ID"
|
||||
|
||||
@@ -268,6 +268,7 @@ logout_confirm = "로그아웃 하시겠습니까?"
|
||||
|
||||
[msg.dev.audit]
|
||||
empty = "조회된 감사 로그가 없습니다."
|
||||
forbidden = "감사 로그를 조회할 권한이 없습니다. 관리자에게 권한을 요청해주세요."
|
||||
load_error = "감사 로그 조회 실패: {{error}}"
|
||||
loaded_count = "로드된 로그 {{count}}건"
|
||||
loading = "감사 로그를 불러오는 중..."
|
||||
@@ -1116,6 +1117,9 @@ logout = "로그아웃"
|
||||
load_more = "더 보기"
|
||||
title = "감사 로그"
|
||||
|
||||
[ui.dev.audit.registry]
|
||||
title = "Audit registry"
|
||||
|
||||
[ui.dev.audit.filter]
|
||||
action = "액션으로 필터 (예: ROTATE_SECRET)"
|
||||
client_id = "Client ID로 필터"
|
||||
|
||||
@@ -215,6 +215,7 @@ logout_confirm = ""
|
||||
|
||||
[msg.dev.audit]
|
||||
empty = ""
|
||||
forbidden = ""
|
||||
load_error = ""
|
||||
loaded_count = ""
|
||||
loading = ""
|
||||
@@ -999,6 +1000,9 @@ logout = ""
|
||||
load_more = ""
|
||||
title = ""
|
||||
|
||||
[ui.dev.audit.registry]
|
||||
title = ""
|
||||
|
||||
[ui.dev.audit.filter]
|
||||
action = ""
|
||||
client_id = ""
|
||||
|
||||
@@ -7,10 +7,7 @@ void main() {
|
||||
const challenge = 'loop-guard-test-challenge';
|
||||
loginChallengeLoopGuard.clear(challenge);
|
||||
|
||||
expect(
|
||||
loginChallengeLoopGuard.shouldAllowAutoAccept(challenge),
|
||||
isTrue,
|
||||
);
|
||||
expect(loginChallengeLoopGuard.shouldAllowAutoAccept(challenge), isTrue);
|
||||
|
||||
loginChallengeLoopGuard.markAutoAcceptAttempt(challenge);
|
||||
|
||||
@@ -24,10 +21,7 @@ void main() {
|
||||
|
||||
loginChallengeLoopGuard.clear(challenge);
|
||||
|
||||
expect(
|
||||
loginChallengeLoopGuard.shouldAllowAutoAccept(challenge),
|
||||
isTrue,
|
||||
);
|
||||
expect(loginChallengeLoopGuard.shouldAllowAutoAccept(challenge), isTrue);
|
||||
});
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user