Changing from /_xpack/security/ to /_security/ (#26922)

* Changing from /_xpack/security/ to /_security/

* Putting ML's routes back, will be addressed separately
This commit is contained in:
Brandon Kobel 2018-12-18 06:34:24 -08:00 committed by Bill McConaghy
parent f6dd17c93e
commit 2fa3cd8bf4
4 changed files with 29 additions and 29 deletions

View file

@ -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 },

View file

@ -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: [
{

View file

@ -27,7 +27,7 @@
shield.authenticate = ca({
params: {},
url: {
fmt: '/_xpack/security/_authenticate'
fmt: '/_security/_authenticate'
}
});
@ -46,7 +46,7 @@
},
urls: [
{
fmt: '/_xpack/security/user/<%=username%>/_password',
fmt: '/_security/user/<%=username%>/_password',
req: {
username: {
type: 'string',
@ -55,7 +55,7 @@
}
},
{
fmt: '/_xpack/security/user/_password'
fmt: '/_security/user/_password'
}
],
needBody: true,
@ -77,7 +77,7 @@
}
},
url: {
fmt: '/_xpack/security/realm/<%=realms%>/_clear_cache',
fmt: '/_security/realm/<%=realms%>/_clear_cache',
req: {
realms: {
type: 'string',
@ -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',
@ -122,7 +122,7 @@
}
},
url: {
fmt: '/_xpack/security/role/<%=name%>',
fmt: '/_security/role/<%=name%>',
req: {
name: {
type: 'string',
@ -147,7 +147,7 @@
}
},
url: {
fmt: '/_xpack/security/user/<%=username%>',
fmt: '/_security/user/<%=username%>',
req: {
username: {
type: 'string',
@ -168,7 +168,7 @@
params: {},
urls: [
{
fmt: '/_xpack/security/role/<%=name%>',
fmt: '/_security/role/<%=name%>',
req: {
name: {
type: 'string',
@ -177,7 +177,7 @@
}
},
{
fmt: '/_xpack/security/role'
fmt: '/_security/role'
}
]
});
@ -192,7 +192,7 @@
params: {},
urls: [
{
fmt: '/_xpack/security/user/<%=username%>',
fmt: '/_security/user/<%=username%>',
req: {
username: {
type: 'list',
@ -201,7 +201,7 @@
}
},
{
fmt: '/_xpack/security/user'
fmt: '/_security/user'
}
]
});
@ -220,7 +220,7 @@
}
},
url: {
fmt: '/_xpack/security/role/<%=name%>',
fmt: '/_security/role/<%=name%>',
req: {
name: {
type: 'string',
@ -246,7 +246,7 @@
}
},
url: {
fmt: '/_xpack/security/user/<%=username%>',
fmt: '/_security/user/<%=username%>',
req: {
username: {
type: 'string',
@ -266,7 +266,7 @@
params: {},
urls: [
{
fmt: '/_xpack/security/user/_privileges'
fmt: '/_security/user/_privileges'
}
]
});
@ -288,7 +288,7 @@
method: 'POST',
needBody: true,
url: {
fmt: '/_xpack/security/saml/prepare'
fmt: '/_security/saml/prepare'
}
});
@ -307,7 +307,7 @@
method: 'POST',
needBody: true,
url: {
fmt: '/_xpack/security/saml/authenticate'
fmt: '/_security/saml/authenticate'
}
});
@ -322,7 +322,7 @@
method: 'POST',
needBody: true,
url: {
fmt: '/_xpack/security/saml/logout'
fmt: '/_security/saml/logout'
}
});
@ -337,7 +337,7 @@
method: 'POST',
needBody: true,
url: {
fmt: '/_xpack/security/saml/logout'
fmt: '/_security/saml/logout'
}
});
@ -355,7 +355,7 @@
method: 'POST',
needBody: true,
url: {
fmt: '/_xpack/security/saml/invalidate'
fmt: '/_security/saml/invalidate'
}
});
@ -371,7 +371,7 @@
method: 'POST',
needBody: true,
url: {
fmt: '/_xpack/security/oauth2/token'
fmt: '/_security/oauth2/token'
}
});
@ -391,14 +391,14 @@
}
},
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',
@ -406,14 +406,14 @@
}
}
}, {
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',
@ -431,7 +431,7 @@
method: 'POST',
needBody: true,
url: {
fmt: '/_xpack/security/privilege'
fmt: '/_security/privilege'
}
});
@ -439,7 +439,7 @@
method: 'POST',
needBody: true,
url: {
fmt: '/_xpack/security/user/_has_privileges'
fmt: '/_security/user/_has_privileges'
}
});
};

View file

@ -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: [{