feat(registration): verify FACEIT team ownership - #11
Conversation
|
@greptileai review |
|
Vamos verificar o funcionamento de forma local antes do deploy |
Independent security reviewCurrent state/checks: OPEN but currently CONFLICTING/DIRTY against Actionable (blocking): Production state uses host-only Actionable (lower severity): Residual/informational: The documented FACEIT OIDC endpoints, PKCE S256, |
|
Addressed both independent-review findings in commit
Validation passed: current migrations, Deployment validation remains explicit: a real FACEIT OAuth success/denial/replay/leader-change matrix requires the production OAuth client and credentials. The local environment did not contain the Caddy binary, so |
Summary
www.aceprodutora.com.brto the apex host before host-only OAuth cookies are issuedclaimKeysafeguards frommainProblem
Anyone who knew a public FACEIT team URL could register that team without proving control of it. This allowed team-name squatting and could force the real team representative into a manual recovery path. The initial OAuth implementation also allowed the apex/
wwwsplit to strand a__Host-state cookie and allowed an invalid error callback to cancel a valid flow.Security design
Secure,HttpOnly,SameSite=Lax, and__Host-cookies in productionwwwrequests, including their path and query, tohttps://aceprodutora.com.brValidation
npm cinpm run db:generatenpm run db:migratenpm run test:securitynpm run lintnpx tsc --noEmitnpm run test:tournamentsnpx prisma validatenpm audit(0 vulnerabilities)npm run buildFocused coverage includes apex callback/return URLs, the
wwwto apex Caddy contract, production__Host-naming, valid provider denial, invalid and missing returned state, tampered state/proof tokens, mocked token exchange, and rejection before multipart parsing.Deployment validation still required
Create a FACEIT OAuth2 client with callback
https://aceprodutora.com.br/api/faceit/ownership/callback, then setFACEIT_OAUTH_CLIENT_ID,FACEIT_OAUTH_CLIENT_SECRET,FACEIT_OAUTH_REDIRECT_URI, and a 32+ characterFACEIT_OAUTH_COOKIE_SECRET. Before registrations reopen, restore the registration UI wired to the ownership-start endpoint and run a real apex/www, success/denial/replay/leader-change matrix with the deployed FACEIT client.caddy validatewas not available in this local environment and must run on the deployment target before reload.