Skip to content

Commit

Permalink
No longer creating the roles on start-up (#19799)
Browse files Browse the repository at this point in the history
  • Loading branch information
kobelb committed Jun 11, 2018
1 parent 4b3c6ba commit 117b0d4
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 291 deletions.
3 changes: 0 additions & 3 deletions x-pack/plugins/security/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import { checkLicense } from './server/lib/check_license';
import { initAuthenticator } from './server/lib/authentication/authenticator';
import { mirrorStatusAndInitialize } from './server/lib/mirror_status_and_initialize';
import { registerPrivilegesWithCluster } from './server/lib/privileges';
import { createDefaultRoles } from './server/lib/authorization/create_default_roles';
import { initPrivilegesApi } from './server/routes/api/v1/privileges';
import { hasPrivilegesWithServer } from './server/lib/authorization/has_privileges';
import { SecurityAuditLogger } from './server/lib/audit_logger';
Expand Down Expand Up @@ -46,7 +45,6 @@ export const security = (kibana) => new kibana.Plugin({
}).default(),
rbac: Joi.object({
enabled: Joi.boolean().default(false),
createDefaultRoles: Joi.boolean().default(true),
application: Joi.string().default('kibana').regex(
/[a-zA-Z0-9-_]+/,
`may contain alphanumeric characters (a-z, A-Z, 0-9), underscores and hyphens`
Expand Down Expand Up @@ -99,7 +97,6 @@ export const security = (kibana) => new kibana.Plugin({
}

await registerPrivilegesWithCluster(server);
await createDefaultRoles(server);
});

// Register a function that is called whenever the xpack info changes,
Expand Down

This file was deleted.

This file was deleted.

This file was deleted.

30 changes: 30 additions & 0 deletions x-pack/test/rbac_api_integration/apis/saved_objects/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,36 @@ export default function ({ loadTestFile, getService }) {

describe('saved_objects', () => {
before(async () => {
await es.shield.putRole({
name: 'kibana_rbac_user',
body: {
cluster: [],
index: [],
applications: [
{
application: 'kibana',
privileges: [ 'all' ],
resources: [ 'default' ]
}
]
}
});

await es.shield.putRole({
name: 'kibana_rbac_dashboard_only_user',
body: {
cluster: [],
index: [],
applications: [
{
application: 'kibana',
privileges: [ 'read' ],
resources: [ 'default' ]
}
]
}
});

await es.shield.putUser({
username: AUTHENTICATION.NOT_A_KIBANA_USER.USERNAME,
body: {
Expand Down

0 comments on commit 117b0d4

Please sign in to comment.