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

Fixes saml login flow to work with anonymous auth #1839

Merged
Merged
Show file tree
Hide file tree
Changes from 26 commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
199683c
Fixes anonymous auth flow to work with SAML
DarshitChanpura Mar 6, 2024
cbdf7a6
Adds hardcoded credentials for anonymous user
DarshitChanpura Mar 11, 2024
a0f2db4
Updates basic auth header to be a config constant
DarshitChanpura Mar 11, 2024
3c0c2f9
Removes unneeded usage of anonymous auth header constant
DarshitChanpura Mar 11, 2024
8322a23
Updates logic to display anonymous auth login button
DarshitChanpura Mar 11, 2024
f331377
Adds test to check whether anonymous auth login button is displayed c…
DarshitChanpura Mar 11, 2024
63abb41
Fixes integrationtests
DarshitChanpura Mar 12, 2024
5492d2a
Adds integration tests for anonymous auth login with basic authorizat…
DarshitChanpura Mar 12, 2024
9d47261
Generates random password for anonymous user
DarshitChanpura Mar 12, 2024
d682701
Fixes lint errors
DarshitChanpura Mar 12, 2024
ca8b4ef
Adds saml auth header to differentiate saml requests
DarshitChanpura Mar 20, 2024
f63bbf2
Fixes linter errors
DarshitChanpura Mar 21, 2024
43c8499
Merge remote-tracking branch 'upstream/main' into fixes-saml-login-flow
DarshitChanpura Mar 21, 2024
573c715
Fixes basic auth tests
DarshitChanpura Mar 21, 2024
b9b9911
Removes console loggers
DarshitChanpura Mar 21, 2024
87ac6e0
Merge remote-tracking branch 'upstream/main' into fixes-saml-login-flow
DarshitChanpura Mar 26, 2024
e0585b9
Merge remote-tracking branch 'upstream/main' into fixes-saml-login-flow
DarshitChanpura Mar 27, 2024
366f413
Fixes lint error
DarshitChanpura Mar 28, 2024
4317901
Addresses feedback
DarshitChanpura Apr 1, 2024
2724e03
Resolves #1840
DarshitChanpura Apr 2, 2024
edcf65a
Merge remote-tracking branch 'upstream/main' into fixes-saml-login-flow
DarshitChanpura Apr 2, 2024
932fd5b
Replace magic value with constant
DarshitChanpura Apr 2, 2024
1f1ecfa
Renames query param and removes unused variables
DarshitChanpura Apr 8, 2024
43c0c9d
Merge remote-tracking branch 'upstream/main' into fixes-saml-login-flow
DarshitChanpura Apr 8, 2024
7b68f1c
Merge remote-tracking branch 'upstream/main' into fixes-saml-login-flow
DarshitChanpura Apr 9, 2024
2a1289d
Uses enum instead of magic constant
DarshitChanpura Apr 9, 2024
35a7f7e
Extracts template function to a separate util file
DarshitChanpura Apr 9, 2024
77608a0
Renames test
DarshitChanpura Apr 9, 2024
d756b6c
Removes unnecessary modifications required to solve this bug
DarshitChanpura Apr 11, 2024
f03d3ab
Fixes import
DarshitChanpura Apr 11, 2024
d58301f
Removes unused param
DarshitChanpura Apr 11, 2024
2819b10
Removes unused method param
DarshitChanpura Apr 11, 2024
1ad7343
Removes incorrect method param
DarshitChanpura Apr 11, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions common/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export const OPENID_AUTH_LOGIN_WITH_FRAGMENT = '/auth/openid/captureUrlFragment'
export const SAML_AUTH_LOGIN = '/auth/saml/login';
export const SAML_AUTH_LOGIN_WITH_FRAGMENT = '/auth/saml/captureUrlFragment';
export const ANONYMOUS_AUTH_LOGIN = '/auth/anonymous';
export const AUTH_TYPE_PARAM = 'auth_type';

export const OPENID_AUTH_LOGOUT = '/auth/openid/logout';
export const SAML_AUTH_LOGOUT = '/auth/saml/logout';
Expand Down
14 changes: 7 additions & 7 deletions public/apps/login/login-page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -231,14 +231,14 @@ export function LoginPage(props: LoginPageDeps) {
</EuiFormRow>
);

if (authOpts.length > 1) {
if (props.config.auth.anonymous_auth_enabled) {
const anonymousConfig = props.config.ui[AuthType.ANONYMOUS].login;
formBody.push(
renderLoginButton(AuthType.ANONYMOUS, ANONYMOUS_AUTH_LOGIN, anonymousConfig)
);
}
if (props.config.auth.anonymous_auth_enabled) {
const anonymousConfig = props.config.ui[AuthType.ANONYMOUS].login;
formBody.push(
renderLoginButton(AuthType.ANONYMOUS, ANONYMOUS_AUTH_LOGIN, anonymousConfig)
);
}

if (authOpts.length > 1) {
formBody.push(<EuiSpacer size="xs" />);
formBody.push(<EuiHorizontalRule size="full" margin="xl" />);
formBody.push(<EuiSpacer size="xs" />);
Expand Down
Loading
Loading