Skip to content

feat: optional sign-in page to stop background request CSRF accumulation#100

Merged
thesuperzapper merged 1 commit into
deployKF:mainfrom
thesuperzapper:feat-optional-sign-in-page
Feb 7, 2024
Merged

feat: optional sign-in page to stop background request CSRF accumulation#100
thesuperzapper merged 1 commit into
deployKF:mainfrom
thesuperzapper:feat-optional-sign-in-page

Conversation

@thesuperzapper

Copy link
Copy Markdown
Member

related #96

Continuing on from #99, this PR creates a permanent fix to background requests accumulating CSRF cookies upon auth token expiry. Specifically, this PR allows enabling the oauth2-proxy sign-in page, which will require a user to click "sign in" before they are redirected to dex (which triggers a CSRF cookie to be added).

When enabled, this will prevent all but the most determined users from exceeding the header limits (and getting 431 errors), because the only way to cause a CSRF cookie to be added is to manually start a dex auth flow.

However, because this change will break our existing KFPClientManager() class, we will leave the sign-in page disabled by default in deployKF 0.1.X, and only enable it by default in 0.2.0.

NOTE: cluster admins who are seeing lots of 431 errors can enable it before then by setting the deploykf_core.deploykf_auth.oauth2Proxy.enableSignInPage value to true:

deploykf_core:
  deploykf_auth:
    oauth2Proxy:
      enableSignInPage: true

@thesuperzapper thesuperzapper added this to the v0.1.4 milestone Feb 7, 2024
@thesuperzapper
thesuperzapper merged commit 308d0c9 into deployKF:main Feb 7, 2024
@thesuperzapper
thesuperzapper deleted the feat-optional-sign-in-page branch February 7, 2024 01:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant