fix(#411): auth & frontend remediation — all 6 phases complete #418

Merged
jason.woltje merged 51 commits from fix/auth-frontend-remediation into develop 2026-02-16 23:11:42 +00:00
2 changed files with 7 additions and 1 deletions
Showing only changes of commit 976d14d94b - Show all commits

View File

@@ -89,6 +89,12 @@ export class AuthController {
* Rate limiting and logging are applied to mitigate abuse (SEC-API-10).
*/
@All("*")
/**
* BetterAuth implements CSRF protection internally via Fetch Metadata headers
* (Sec-Fetch-Site, Sec-Fetch-Mode) and SameSite=Lax cookies. The @SkipCsrf()
* decorator skips the custom CSRF guard to avoid double-protection conflicts.
* Reference: https://www.better-auth.com/docs/reference/security
*/
@SkipCsrf()
@Throttle({ strict: { limit: 10, ttl: 60000 } })
async handleAuth(@Req() req: ExpressRequest, @Res() res: ExpressResponse): Promise<void> {

View File

@@ -293,7 +293,7 @@ services:
OIDC_ISSUER: ${OIDC_ISSUER}
OIDC_CLIENT_ID: ${OIDC_CLIENT_ID}
OIDC_CLIENT_SECRET: ${OIDC_CLIENT_SECRET}
OIDC_REDIRECT_URI: ${OIDC_REDIRECT_URI:-http://localhost:3001/auth/callback}
OIDC_REDIRECT_URI: ${OIDC_REDIRECT_URI:-}
JWT_SECRET: ${JWT_SECRET:-change-this-to-a-random-secret}
JWT_EXPIRATION: ${JWT_EXPIRATION:-24h}
BETTER_AUTH_SECRET: ${BETTER_AUTH_SECRET}