csrf: The dashboard session's CSRF token is missing or wrong
A state-changing request (anything but GET or HEAD) arrived with a dashboard session cookie but without that session's CSRF token in X-Dynamo-CSRF. Nothing was changed.
What to do
- Send the
csrfvalue fromGET /console/session(or from the sign-up and sign-in answers) inX-Dynamo-CSRFon every state-changing call. - A member signed in through single sign-on sends its member session's own token, from
GET /sso/v1/session. - Scripts should use an API key instead of a session cookie; keys need no CSRF token.
- If the dashboard shows this, reload the page to start from a fresh session.
On the wire
HTTP 403, error type authentication_error. The multi-tenant front door answers this code (on any route reached with a dashboard or member session, and on /logout and /console/logout), always with errorDetail.
A single-tenant core's own console (and a member session there) refuses the same case with HTTP 403 and only {"error": "missing or invalid CSRF token (fail closed)"}: no code and no errorDetail.
{
"error": "csrf",
"errorDetail": {
"type": "authentication_error",
"code": "csrf",
"message": "missing or invalid CSRF token (fail closed)",
"param": null,
"doc_url": "…/errors/csrf.md",
"fix": "send the session's CSRF token in X-Dynamo-CSRF on every state-changing dashboard request"
}
}
See all error codes.