Skip to content

AP-614 - Update state parameter explanation on authenticate-your-user.html.md.erb#454

Open
ImogenCraigmile wants to merge 4 commits intomainfrom
AP-614_improve_explanation_of_state_parameter
Open

AP-614 - Update state parameter explanation on authenticate-your-user.html.md.erb#454
ImogenCraigmile wants to merge 4 commits intomainfrom
AP-614_improve_explanation_of_state_parameter

Conversation

@ImogenCraigmile
Copy link
Copy Markdown
Contributor

@ImogenCraigmile ImogenCraigmile commented Mar 9, 2026

https://govukverify.atlassian.net/browse/AP-614

Why

At the moment, the documentation around the State parameter is very vague on the topic and a specific RP encountered an issue with an error but tighter guidance should avoid this happening again.

What

Added specific WAF limits and dimensions

Technical writer support

Do you need a tech writer's support, for example to review your PR? Yes

How to review

Tell reviewers how to assess your changes.

Changelog

If this change is significant (for example, launching a new feature or deprecating a feature), you should update the changelog found at partials/_changelog.erb under the heading 'Documentation updates'.

Confirm

  • I have checked if any docs change here also requires updates to other repositories (ADRs / RFCs, README.md, Team Manual, elsewhere in these docs)
  • Where there is any overlap I have updated or opened a PR for corresponding changes

@ImogenCraigmile ImogenCraigmile changed the title Update authenticate-your-user.html.md.erb Update state parameter explantion on authenticate-your-user.html.md.erb Mar 10, 2026
@ImogenCraigmile ImogenCraigmile marked this pull request as ready for review March 10, 2026 13:24
@pauldougan pauldougan changed the title Update state parameter explantion on authenticate-your-user.html.md.erb Update state parameter explanation on authenticate-your-user.html.md.erb Mar 10, 2026
@pauldougan pauldougan changed the title Update state parameter explanation on authenticate-your-user.html.md.erb AP-614 - Update state parameter explanation on authenticate-your-user.html.md.erb Mar 10, 2026
| `scope` | Required | A space-separated list of scopes. You must include `openid` as one scope value. If you request `openid` but also request other incorrect scopes, the error `invalid_scope` will return with an HTTP 302 instead.<br><br>You should refer to the guidance on [choosing which user attributes your service can request][integrate.choose-user-attributes] for the `scope` parameter.<br><br>If you’re using JAR, make sure the `scope` values in the query parameters and the request object are identical. |
| `client_id` | Required | The [client identifier][integrate.client-id], which we generated for you when you [registered your service to use GOV.UK One Login][integrate.register-your-service] must match your client configuration.<br><br>If you’re using JAR, make sure the `client_id` values in the query parameters and the request object are identical. |
| `state` | Required | When you receive a response at the redirect URL, there must be a way to verify the response came for a request which you sent. The `state` value solves this issue by binding the request and response, which reduces impact of [Cross Site Request Forgery](https://owasp.org/www-community/attacks/csrf) attacks.<br>This value will be returned to the client in the authentication response. |
| `state` | Required | When you receive a response at the redirect URL, there must be a way to verify the response came for a request which you sent. The `state` value solves this issue by binding the request and response, which reduces impact of [Cross Site Request Forgery](https://owasp.org/www-community/attacks/csrf) attacks.<br>This value will be returned to the client in the authentication response. <br> The parameter should be:<ul><li> a unique value</li><li>opaque and not open to inspection</li><li>small, to avoid hitting the Web Application Firewall (WAF) limit on the logout endpoint</li></ul><br> The WAF limit depends on the length of the whole query. The limits are:<ul><li>4096 for /authorize endpoint</li><li>2048 for /logout endpoint</li></ul>|
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could also possibly hit the limit on the authorize call as well FYI so probably don't want to single out logout in the description

Co-authored-by: Carly Gilson <carly.gilson@digital.cabinet-office.gov.uk>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants