Skip to content

Commit d3c5d8e

Browse files
authored
fix(gateway): point admin auto-approve warnings at identityScopes (#129538)
The startup SECURITY WARNING and the critical security-audit remediation for gateway.auth.trustedProxy.deviceAutoApprove.scopes containing operator.admin still told operators to wait "until per-identity roles are available". Per-identity admin grants shipped as gateway.auth.identityScopes and the trusted-proxy docs already recommend them; the runtime guidance now names that shipped fix instead of a nonexistent future feature.
1 parent 889a153 commit d3c5d8e

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎src/gateway/server-startup-bootstrap.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,7 @@ export async function prepareGatewayServerBootstrap(input: {
271271
trustedProxyDeviceAutoApprove.scopes?.some((scope) => scope.trim() === ADMIN_SCOPE)
272272
) {
273273
log.warn(
274-
"SECURITY WARNING: gateway.auth.trustedProxy.deviceAutoApprove.scopes includes operator.admin; every proxy-authenticated user can auto-approve a new browser device with full admin, and requests without scopes receive full admin automatically. Remove operator.admin to require manual approval until per-identity roles are available.",
274+
"SECURITY WARNING: gateway.auth.trustedProxy.deviceAutoApprove.scopes includes operator.admin; every proxy-authenticated user can auto-approve a new browser device with full admin, and requests without scopes receive full admin automatically. Remove operator.admin and grant admin per identity via gateway.auth.identityScopes instead.",
275275
);
276276
}
277277
const resolvedStartupAuthOverride = startupAuthOverride

‎src/gateway/server.auth.trusted-proxy-device-autoapprove.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ describe("trusted-proxy browser device auto-approval", () => {
212212
expect(
213213
warnings.filter((message) =>
214214
message.includes(
215-
"SECURITY WARNING: gateway.auth.trustedProxy.deviceAutoApprove.scopes includes operator.admin; every proxy-authenticated user can auto-approve a new browser device with full admin, and requests without scopes receive full admin automatically. Remove operator.admin to require manual approval until per-identity roles are available.",
215+
"SECURITY WARNING: gateway.auth.trustedProxy.deviceAutoApprove.scopes includes operator.admin; every proxy-authenticated user can auto-approve a new browser device with full admin, and requests without scopes receive full admin automatically. Remove operator.admin and grant admin per identity via gateway.auth.identityScopes instead.",
216216
),
217217
),
218218
).toHaveLength(1);

‎src/security/audit-gateway-config.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -373,7 +373,7 @@ export function collectGatewayConfigFindings(
373373
detail:
374374
"gateway.auth.trustedProxy.deviceAutoApprove.scopes includes operator.admin, so every proxy-authenticated user can auto-approve a new browser device with full admin; requests without scopes receive full admin automatically.",
375375
remediation:
376-
"Remove operator.admin and approve admin access manually, or use per-identity roles when they become available.",
376+
"Remove operator.admin and approve admin access manually, or grant admin per identity via gateway.auth.identityScopes.",
377377
});
378378
}
379379
}

‎src/security/audit-gateway-exposure.test.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -504,7 +504,7 @@ describe("security audit gateway exposure findings", () => {
504504
detail:
505505
"gateway.auth.trustedProxy.deviceAutoApprove.scopes includes operator.admin, so every proxy-authenticated user can auto-approve a new browser device with full admin; requests without scopes receive full admin automatically.",
506506
remediation:
507-
"Remove operator.admin and approve admin access manually, or use per-identity roles when they become available.",
507+
"Remove operator.admin and approve admin access manually, or grant admin per identity via gateway.auth.identityScopes.",
508508
});
509509
});
510510

0 commit comments

Comments
 (0)