Harden default authentication secrets#20
Conversation
Co-authored-by: Aliasocracy <alias8818@users.noreply.github.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c325b9c. Configure here.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c325b9c636
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if (this.adminApiToken && !req.headers.authorization) { | ||
| headers.authorization = `ApiKey ${this.adminApiToken}`; |
There was a problem hiding this comment.
Gate proxy token injection behind dashboard authentication
proxyToApiGateway now adds Authorization: ApiKey <ADMIN_API_TOKEN> whenever the incoming request lacks an Authorization header, but /api/v1 is mounted without any auth guard in setupRoutes. This means any client that can reach the admin server (for example via the published admin port) can call /api/v1/* without credentials and still be proxied as admin-dashboard, which nullifies the token hardening this change is trying to achieve. Require admin-side authentication before injecting the token (or only inject for trusted authenticated sessions).
Useful? React with 👍 / 👎.
Co-authored-by: Aliasocracy <alias8818@users.noreply.github.com>

Summary
/api/v1callsVerification
npm run build✅npm test -- --runTestsByPath src/api/__tests__/gateway.test.ts src/api/__tests__/authentication.test.ts✅