mirror of
https://github.com/honeymoose/OpenSearch.git
synced 2025-02-20 03:45:02 +00:00
test: update Kibana role integ tests to use built in role
Original commit: elastic/x-pack-elasticsearch@89f3104a4b
This commit is contained in:
parent
b046a08842
commit
a2f3f304d3
@ -29,7 +29,7 @@ import static org.hamcrest.Matchers.notNullValue;
|
|||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class KibanaRoleTests extends ShieldIntegTestCase {
|
public class KibanaUserRoleIntegTests extends ShieldIntegTestCase {
|
||||||
|
|
||||||
protected static final SecuredString USERS_PASSWD = new SecuredString("change_me".toCharArray());
|
protected static final SecuredString USERS_PASSWD = new SecuredString("change_me".toCharArray());
|
||||||
protected static final String USERS_PASSWD_HASHED = new String(Hasher.BCRYPT.hash(new SecuredString("change_me".toCharArray())));
|
protected static final String USERS_PASSWD_HASHED = new String(Hasher.BCRYPT.hash(new SecuredString("change_me".toCharArray())));
|
||||||
@ -38,18 +38,11 @@ public class KibanaRoleTests extends ShieldIntegTestCase {
|
|||||||
public String configRoles() {
|
public String configRoles() {
|
||||||
return super.configRoles() + "\n" +
|
return super.configRoles() + "\n" +
|
||||||
"my_kibana_user:\n" +
|
"my_kibana_user:\n" +
|
||||||
" cluster:\n" +
|
|
||||||
" - monitor\n" +
|
|
||||||
" indices:\n" +
|
" indices:\n" +
|
||||||
" - names: 'logstash-*'\n" +
|
" - names: 'logstash-*'\n" +
|
||||||
" privileges:\n" +
|
" privileges:\n" +
|
||||||
" - view_index_metadata\n" +
|
" - view_index_metadata\n" +
|
||||||
" - read\n" +
|
" - read\n";
|
||||||
" - names: '.kibana*'\n" +
|
|
||||||
" privileges:\n" +
|
|
||||||
" - manage\n" +
|
|
||||||
" - read\n" +
|
|
||||||
" - index";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -61,7 +54,8 @@ public class KibanaRoleTests extends ShieldIntegTestCase {
|
|||||||
@Override
|
@Override
|
||||||
public String configUsersRoles() {
|
public String configUsersRoles() {
|
||||||
return super.configUsersRoles() +
|
return super.configUsersRoles() +
|
||||||
"my_kibana_user:kibana_user";
|
"my_kibana_user:kibana_user\n" +
|
||||||
|
"kibana_user:kibana_user";
|
||||||
}
|
}
|
||||||
|
|
||||||
public void testFieldMappings() throws Exception {
|
public void testFieldMappings() throws Exception {
|
Loading…
x
Reference in New Issue
Block a user