Skip to content

Add support for url param ?auto_login=false to force show login screen and associated setting opensearch_security.auth.default_redirect_auth_type#2384

Open
cwperks wants to merge 5 commits intoopensearch-project:mainfrom
cwperks:auto-login
Open

Add support for url param ?auto_login=false to force show login screen and associated setting opensearch_security.auth.default_redirect_auth_type#2384
cwperks wants to merge 5 commits intoopensearch-project:mainfrom
cwperks:auto-login

Conversation

@cwperks
Copy link
Copy Markdown
Member

@cwperks cwperks commented Mar 23, 2026

Description

This PR creates a way where a cluster can:

  1. Enable multiple ways to sign in (i.e. basic auth + SAML)
  2. Choose SAML to auto-redirect by default
  3. Allow user to login with basic auth by forcing the login screen to show with ?auto_login=false

In order to accomplish this, it adds a new setting opensearch_security.auth.default_redirect_auth_type

For example:

opensearch_security.auth.type: ["basicauth","saml"]
opensearch_security.auth.multiple_auth_enabled: true
opensearch_security.auth.default_redirect_auth_type: "saml"

When this is set, it chooses SAML for auto-redirect by default. Someone wanting to login with basic auth (for example someone wanting another method to login as cluster admin), can pass ?auto_login=false and see the username and password input.

Category

Enhancement

Issues Resolved

Resolves #2240

Check List

  • New functionality includes testing
  • New functionality has been documented
  • Commits are signed per the DCO using --signoff

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

cwperks added 2 commits March 22, 2026 20:54
Signed-off-by: Craig Perkins <craig5008@gmail.com>
Signed-off-by: Craig Perkins <craig5008@gmail.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 23, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.59%. Comparing base (353df7d) to head (d6c035d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2384   +/-   ##
=======================================
  Coverage   71.59%   71.59%           
=======================================
  Files         101      101           
  Lines        3010     3010           
  Branches      529      511   -18     
=======================================
  Hits         2155     2155           
  Misses        699      699           
  Partials      156      156           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

cwperks and others added 3 commits March 22, 2026 21:23
Signed-off-by: Craig Perkins <craig5008@gmail.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
Signed-off-by: Craig Perkins <cwperx@amazon.com>
@cwperks cwperks marked this pull request as ready for review March 25, 2026 17:18
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.

[FEATURE] Add auto_login flag to bypass the login screen when openid and basicauth are enabled

1 participant