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

Replace _opendistro route to _plugins #2172

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion .github/workflows/cypress-test-multiauth-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
opensearch_security.multitenancy.tenants.preferred: ["Private", "Global"]
opensearch_security.readonly_mode.roles: ["kibana_read_only"]
opensearch_security.cookie.secure: false
server.xsrf.allowlist: ["/_opendistro/_security/saml/acs", "/_opendistro/_security/saml/acs/idpinitiated", "/_opendistro/_security/saml/logout"]
server.xsrf.allowlist: ["/_plugins/_security/saml/acs", "/_plugins/_security/saml/acs/idpinitiated", "/_plugins/_security/saml/logout"]
opensearch_security.auth.type: ["basicauth","saml"]
opensearch_security.auth.multiple_auth_enabled: true
opensearch_security.auth.anonymous_auth_enabled: false
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/cypress-test-saml-e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ jobs:
opensearch_security.multitenancy.tenants.preferred: ["Private", "Global"]
opensearch_security.readonly_mode.roles: ["kibana_read_only"]
opensearch_security.cookie.secure: false
server.xsrf.allowlist: ["/_opendistro/_security/saml/acs", "/_opendistro/_security/saml/acs/idpinitiated", "/_opendistro/_security/saml/logout"]
server.xsrf.allowlist: ["/_plugins/_security/saml/acs", "/_plugins/_security/saml/acs/idpinitiated", "/_plugins/_security/saml/logout"]
opensearch_security.auth.type: ["saml"]
opensearch_security.auth.multiple_auth_enabled: true
opensearch_security.auth.anonymous_auth_enabled: false
Expand Down
8 changes: 4 additions & 4 deletions server/auth/types/saml/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ export class SamlAuthRoutes {

this.router.post(
{
path: `/_opendistro/_security/saml/acs`,
path: `/_plugins/_security/saml/acs`,
validate: {
body: schema.any(),
},
Expand Down Expand Up @@ -200,7 +200,7 @@ export class SamlAuthRoutes {

this.router.post(
{
path: `/_opendistro/_security/saml/acs/idpinitiated`,
path: `/_plugins/_security/saml/acs/idpinitiated`,
validate: {
body: schema.any(),
},
Expand All @@ -209,7 +209,7 @@ export class SamlAuthRoutes {
},
},
async (context, request, response) => {
const acsEndpoint = `${this.coreSetup.http.basePath.serverBasePath}/_opendistro/_security/saml/acs/idpinitiated`;
const acsEndpoint = `${this.coreSetup.http.basePath.serverBasePath}/_plugins/_security/saml/acs/idpinitiated`;
try {
const credentials = await this.securityClient.authToken({
requestId: undefined,
Expand Down Expand Up @@ -328,7 +328,7 @@ export class SamlAuthRoutes {
}
);

// Once the User is authenticated via the '_opendistro/_security/saml/acs' route,
// Once the User is authenticated via the '_plugins/_security/saml/acs' route,
// the browser will be redirected to '/auth/saml/redirectUrlFragment' route,
// which will execute the redirectUrlFragment.js.
this.coreSetup.http.resources.register(
Expand Down
2 changes: 1 addition & 1 deletion test/jest_integration/runIdpServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const argv = minimist(process.argv.slice(2), {

// Create certificate pair on the fly and pass it to runServer
runServer({
acsUrl: `http://localhost:5601${argv.basePath}/_opendistro/_security/saml/acs`,
acsUrl: `http://localhost:5601${argv.basePath}/_plugins/_security/saml/acs`,
audience: 'https://localhost:9200',
cert: pems.cert,
key: pems.private.toString().replace(/\r\n/, '\n'),
Expand Down
Loading