Skip to content

Commit

Permalink
Changing from /_xpack/security/ to /_security/ (#26922)
Browse files Browse the repository at this point in the history
* Changing from /_xpack/security/ to /_security/

* Putting ML's routes back, will be addressed separately
  • Loading branch information
kobelb authored and bmcconaghy committed Dec 18, 2018
1 parent f6dd17c commit 2fa3cd8
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion packages/kbn-test/src/functional_tests/lib/auth.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ async function updateCredentials(port, auth, username, password, retries = 10) {
auth,
hostname: 'localhost',
port,
pathname: `/_xpack/security/user/${username}/_password`,
pathname: `/_security/user/${username}/_password`,
}),
json: true,
body: { password },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async function verifyHasPrivileges(req) {

const response = await callWithRequest(req, 'transport.request', {
method: 'POST',
path: '/_xpack/security/user/_has_privileges',
path: '/_security/user/_has_privileges',
body: {
index: [
{
Expand Down
52 changes: 26 additions & 26 deletions x-pack/server/lib/esjs_shield_plugin.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
shield.authenticate = ca({
params: {},
url: {
fmt: '/_xpack/security/_authenticate'
fmt: '/_security/_authenticate'
}
});

Expand All @@ -46,7 +46,7 @@
},
urls: [
{
fmt: '/_xpack/security/user/<%=username%>/_password',
fmt: '/_security/user/<%=username%>/_password',
req: {
username: {
type: 'string',
Expand All @@ -55,7 +55,7 @@
}
},
{
fmt: '/_xpack/security/user/_password'
fmt: '/_security/user/_password'
}
],
needBody: true,
Expand All @@ -77,7 +77,7 @@
}
},
url: {
fmt: '/_xpack/security/realm/<%=realms%>/_clear_cache',
fmt: '/_security/realm/<%=realms%>/_clear_cache',
req: {
realms: {
type: 'string',
Expand All @@ -97,7 +97,7 @@
shield.clearCachedRoles = ca({
params: {},
url: {
fmt: '/_xpack/security/role/<%=name%>/_clear_cache',
fmt: '/_security/role/<%=name%>/_clear_cache',
req: {
name: {
type: 'string',
Expand All @@ -122,7 +122,7 @@
}
},
url: {
fmt: '/_xpack/security/role/<%=name%>',
fmt: '/_security/role/<%=name%>',
req: {
name: {
type: 'string',
Expand All @@ -147,7 +147,7 @@
}
},
url: {
fmt: '/_xpack/security/user/<%=username%>',
fmt: '/_security/user/<%=username%>',
req: {
username: {
type: 'string',
Expand All @@ -168,7 +168,7 @@
params: {},
urls: [
{
fmt: '/_xpack/security/role/<%=name%>',
fmt: '/_security/role/<%=name%>',
req: {
name: {
type: 'string',
Expand All @@ -177,7 +177,7 @@
}
},
{
fmt: '/_xpack/security/role'
fmt: '/_security/role'
}
]
});
Expand All @@ -192,7 +192,7 @@
params: {},
urls: [
{
fmt: '/_xpack/security/user/<%=username%>',
fmt: '/_security/user/<%=username%>',
req: {
username: {
type: 'list',
Expand All @@ -201,7 +201,7 @@
}
},
{
fmt: '/_xpack/security/user'
fmt: '/_security/user'
}
]
});
Expand All @@ -220,7 +220,7 @@
}
},
url: {
fmt: '/_xpack/security/role/<%=name%>',
fmt: '/_security/role/<%=name%>',
req: {
name: {
type: 'string',
Expand All @@ -246,7 +246,7 @@
}
},
url: {
fmt: '/_xpack/security/user/<%=username%>',
fmt: '/_security/user/<%=username%>',
req: {
username: {
type: 'string',
Expand All @@ -266,7 +266,7 @@
params: {},
urls: [
{
fmt: '/_xpack/security/user/_privileges'
fmt: '/_security/user/_privileges'
}
]
});
Expand All @@ -288,7 +288,7 @@
method: 'POST',
needBody: true,
url: {
fmt: '/_xpack/security/saml/prepare'
fmt: '/_security/saml/prepare'
}
});

Expand All @@ -307,7 +307,7 @@
method: 'POST',
needBody: true,
url: {
fmt: '/_xpack/security/saml/authenticate'
fmt: '/_security/saml/authenticate'
}
});

Expand All @@ -322,7 +322,7 @@
method: 'POST',
needBody: true,
url: {
fmt: '/_xpack/security/saml/logout'
fmt: '/_security/saml/logout'
}
});

Expand All @@ -337,7 +337,7 @@
method: 'POST',
needBody: true,
url: {
fmt: '/_xpack/security/saml/logout'
fmt: '/_security/saml/logout'
}
});

Expand All @@ -355,7 +355,7 @@
method: 'POST',
needBody: true,
url: {
fmt: '/_xpack/security/saml/invalidate'
fmt: '/_security/saml/invalidate'
}
});

Expand All @@ -371,7 +371,7 @@
method: 'POST',
needBody: true,
url: {
fmt: '/_xpack/security/oauth2/token'
fmt: '/_security/oauth2/token'
}
});

Expand All @@ -391,29 +391,29 @@
}
},
url: {
fmt: '/_xpack/security/oauth2/token'
fmt: '/_security/oauth2/token'
}
});

shield.getPrivilege = ca({
method: 'GET',
urls: [{
fmt: '/_xpack/security/privilege/<%=privilege%>',
fmt: '/_security/privilege/<%=privilege%>',
req: {
privilege: {
type: 'string',
required: false
}
}
}, {
fmt: '/_xpack/security/privilege'
fmt: '/_security/privilege'
}]
});

shield.deletePrivilege = ca({
method: 'DELETE',
urls: [{
fmt: '/_xpack/security/privilege/<%=application%>/<%=privilege%>',
fmt: '/_security/privilege/<%=application%>/<%=privilege%>',
req: {
application: {
type: 'string',
Expand All @@ -431,15 +431,15 @@
method: 'POST',
needBody: true,
url: {
fmt: '/_xpack/security/privilege'
fmt: '/_security/privilege'
}
});

shield.hasPrivileges = ca({
method: 'POST',
needBody: true,
url: {
fmt: '/_xpack/security/user/_has_privileges'
fmt: '/_security/user/_has_privileges'
}
});
};
Expand Down
2 changes: 1 addition & 1 deletion x-pack/test/api_integration/apis/es/has_privileges.js
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ export default function ({ getService }) {
function createHasPrivilegesRequest(privileges) {
const supertest = getService('esSupertestWithoutAuth');
return supertest
.post(`/_xpack/security/user/_has_privileges`)
.post(`/_security/user/_has_privileges`)
.auth('testuser', 'testpassword')
.send({
applications: [{
Expand Down

0 comments on commit 2fa3cd8

Please sign in to comment.