Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Facing 431 Request Header Fields Too Large error #14

Open
2 of 5 tasks
hirenoble opened this issue Feb 2, 2021 · 3 comments
Open
2 of 5 tasks

Facing 431 Request Header Fields Too Large error #14

hirenoble opened this issue Feb 2, 2021 · 3 comments

Comments

@hirenoble
Copy link

I'm submitting this issue for the package(s):

  • jwt-verifier
  • oidc-middleware

I'm submitting a:

  • Bug report
  • Feature request
  • Other (Describe below)

Current behavior

When the browser cookies payload is large receiving 431 Request Header Fields Too Large error.

Expected behavior

The @okta/oidc-middleware package should handle the request headers.

Minimal reproduction of the problem with instructions

Extra information about the use case/user story you are trying to implement

Environment

  • Package Version:
  • Browser:
  • OS:
  • Node version (node -v):
  • Other:
@swiftone
Copy link

swiftone commented Feb 2, 2021

@hirenoble - Thanks for the feedback. For clarity, you're receiving this from the express server on a page you're serving, correct? Do you have an example cookie payload size (don't need the exact cookies, but a payload size to reproduce the error).

@aarongranick-okta
Copy link
Contributor

internal ref: OKTA-367034

@swiftone
Copy link

swiftone commented Feb 2, 2021

Note: This may be due to a node fix of this issue: https://nodejs.org/en/blog/vulnerability/november-2018-security-releases/#denial-of-service-with-large-http-headers-cve-2018-12121

The fix sets the max size of headers to be 8kb. (you can see this in node --help) If you are exceeding that, you can alter this limit by using the --max-http-header-size flag, for example: --max-http-header-size=16384

Please let us know if you're hitting this limit of node or if you're hitting a different limit that is somehow related to this SDK.

@denysoblohin-okta denysoblohin-okta transferred this issue from okta/okta-oidc-js Oct 29, 2021
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

No branches or pull requests

3 participants