Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
136 commits
Select commit Hold shift + click to select a range
4093cfd
hacking away at privileges
legrego Nov 28, 2018
850136b
Merge branch 'granular-app-privileges' into gap/security-ui
legrego Dec 3, 2018
8ffd05c
additional ui testing
legrego Dec 3, 2018
fb693d9
Merge branch 'granular-app-privileges' into gap/security-ui
legrego Dec 6, 2018
a589c8a
less-than-mvp, but functional against updated role management api
legrego Dec 7, 2018
3f9ccfc
Merge branch 'granular-app-privileges' into gap/security-ui
legrego Dec 7, 2018
ebabcf1
fix saved object types in oss feature privilege registry
legrego Dec 7, 2018
6bb3698
allowed space minimum should not account for global feature toggles
legrego Dec 7, 2018
692ea4d
tooltip support for feature privileges that support it
legrego Dec 7, 2018
a026171
remove dead code & fix TypeScript errors
legrego Dec 10, 2018
c42985e
distinguish between create and edit space privileges
legrego Dec 10, 2018
0611743
update space privilege form to handle multiple spaces
legrego Dec 10, 2018
d794923
Merge branch 'granular-app-privileges' into gap/security-ui
legrego Dec 10, 2018
57ded79
Merge branch 'granular-app-privileges' into gap/security-ui
legrego Dec 11, 2018
1ab090a
enable customize privilege for UI
legrego Dec 11, 2018
852a422
Merge branch 'granular-app-privileges' into gap/security-ui
legrego Dec 12, 2018
88fcd21
Merge branch 'granular-app-privileges' into gap/security-ui
legrego Dec 14, 2018
addb22f
Merge branch 'granular-app-privileges' into gap/security-ui
legrego Dec 21, 2018
121f7e9
wip rewrite of effective privileges calculations
legrego Jan 2, 2019
83eb4f4
Merge branch 'granular-app-privileges' into gap/security-ui
legrego Jan 3, 2019
964de15
some cleanup and testing
legrego Jan 3, 2019
f9400cf
enables role management feature toggles with spaces disabled
legrego Jan 3, 2019
eb536ba
additional tests and bugfixes
legrego Jan 3, 2019
e7611fe
design feedback for privilege form
legrego Jan 3, 2019
c8aebb9
remove debug code
legrego Jan 3, 2019
5d9fc5e
Make privilege matrix a modal
legrego Jan 3, 2019
6db5ae6
remove unused components as a result of the redesign
legrego Jan 3, 2019
469c2e9
restructure kibana privilege components
legrego Jan 3, 2019
7f5a0f8
extracting privilege space table into its own component again
legrego Jan 3, 2019
9371bc8
additional cleanup & existing unit tests passing
legrego Jan 3, 2019
9fb4304
subdue feature name when no privilege is assigned
legrego Jan 4, 2019
45aa9a8
more cleanup and typesafety
legrego Jan 4, 2019
fd5fde2
privilege matrix improvements
legrego Jan 4, 2019
e38db13
consolidate rendering of privilege values into a component
legrego Jan 4, 2019
24a81cb
much refactoring; such cleanup
legrego Jan 4, 2019
2fa3e26
show when privileges have been superceded by other privileges
legrego Jan 4, 2019
8b7ea95
more effective privilege testing
legrego Jan 4, 2019
c3f148c
testing the factory
legrego Jan 4, 2019
c13d875
fix typo
legrego Jan 4, 2019
2b45bad
comment and color cleanup
legrego Jan 7, 2019
0c037ed
make typescript a little happier
legrego Jan 7, 2019
2d18c4b
additional testing
legrego Jan 7, 2019
3448333
remove 'kibana.global' property from role definition
legrego Jan 9, 2019
38fd39a
update UI to conform to new API spec
legrego Jan 9, 2019
83555da
Prevent both feature and base privileges from being saved for a given…
legrego Jan 9, 2019
349c7c3
Design Edits (#13)
cchaos Jan 9, 2019
a2890be
Merge branch 'gap/security-ui' of github.com:legrego/kibana into gap/…
legrego Jan 9, 2019
6ab0eb4
Merge branch 'granular-app-privileges' into gap/security-ui
legrego Jan 9, 2019
751fd78
Change feature privilege selection to EuiButtonGroup
legrego Jan 10, 2019
9b43b3d
Allow feature privileges to be changed in bulk
legrego Jan 10, 2019
d16cb20
improve tooltip messages
legrego Jan 10, 2019
bd201ac
Show lock any time a privilege is set by global privileges
legrego Jan 10, 2019
5ed8a59
allow privilege table to expand/collapse spaces in each group
legrego Jan 10, 2019
4160ad3
stubbing i18n for the PrivilegeMatrix
legrego Jan 10, 2019
c741663
show all impacted spaces in popover inside PrivilegeMatrix
legrego Jan 10, 2019
4d69022
Merge branch 'granular-app-privileges' into gap/security-ui
legrego Jan 11, 2019
d58cf01
support editing existing roles
legrego Jan 11, 2019
5e3e5f3
updates to support existing functional tests
legrego Jan 11, 2019
64186aa
snapshot updates
legrego Jan 11, 2019
da30068
update imports
legrego Jan 11, 2019
674a493
making typescript happy
legrego Jan 11, 2019
a1cb24c
Update i18n id prefixes
legrego Jan 11, 2019
33a4a29
Merge branch 'granular-app-privileges' into gap/security-ui
legrego Jan 11, 2019
d3149ac
i18n fixes
legrego Jan 11, 2019
beaa51f
support deleted spaces when editing roles
legrego Jan 11, 2019
55ebe13
adds read-only view for roles with a transform error
legrego Jan 11, 2019
9c92e6a
handle scenario where multiple base privileges are assigned
legrego Jan 11, 2019
2a33a13
update test
legrego Jan 11, 2019
c8947aa
fix ts
legrego Jan 11, 2019
825c314
consolidate PrivilegeMap definition
legrego Jan 14, 2019
9f48caf
make use of FeaturePrivilegeSet type where possible
legrego Jan 14, 2019
eee2311
cleanup and consolidate imports from 'common/model'
legrego Jan 14, 2019
c8f331c
rename role.ts => role_utils.ts
legrego Jan 14, 2019
a0c75a8
move copyRole into role_utils
legrego Jan 14, 2019
e9b06d6
consolidate logic for determining the global privilege definition
legrego Jan 14, 2019
18fd066
add link to show all spaces when viewing global privilege definition
legrego Jan 14, 2019
edc65a7
improve 'create space privilege' button; add warning when creating gl…
legrego Jan 14, 2019
f55e819
update import reference
legrego Jan 14, 2019
736d948
Improve i18n
legrego Jan 14, 2019
0d674b8
a11y updates
legrego Jan 14, 2019
4080b70
Adds unit tests for GET /api/security/privileges route
legrego Jan 14, 2019
cb6fdd1
adds functional API tests for GET /api/security/privileges
legrego Jan 14, 2019
d14aa9b
implement open TODOs from design edits
legrego Jan 14, 2019
74ddad3
removes unnecessary isGroupLabelOption prop; fixes react warnings
legrego Jan 14, 2019
9544de3
Support xpack.spaces.enabled: false
legrego Jan 14, 2019
dd12fda
additional tests
legrego Jan 15, 2019
2997870
remove unnecessary 'rbacEnabled' prop from EditRolePage
legrego Jan 15, 2019
ca67150
update test: derive version action string
legrego Jan 15, 2019
6c93d00
disable space base privileges when not allowed
legrego Jan 15, 2019
310fdd1
hide 'change all' option when form is disabled
legrego Jan 15, 2019
bd01fbe
improve space base privilege display when influenced by global base p…
legrego Jan 15, 2019
46d0d7c
Adds i18n support for the SimplePrivilegeSection
legrego Jan 15, 2019
9c0c288
remove debug code
legrego Jan 15, 2019
7b4d767
additional cleanup
legrego Jan 15, 2019
8cc0b61
Merge branch 'granular-app-privileges' into gap/security-ui
legrego Jan 15, 2019
390280d
snapshot updates
legrego Jan 15, 2019
b2d8703
improve type checks for components using initialFocus
legrego Jan 15, 2019
e205f13
derive version for privileges functional api test
legrego Jan 15, 2019
c502eb2
Removes space privileges (and warns) when updating a role with spaces…
legrego Jan 15, 2019
10c217f
fix visualize test
legrego Jan 15, 2019
e5808ac
Better matrix layout (#14)
cchaos Jan 16, 2019
b7e35ed
Apply suggestions from code review
kobelb Jan 18, 2019
f4586d5
Replace 'effective privileges' with 'kibana privilege calculator': WIP
legrego Jan 22, 2019
889b022
Replaces 'custom' hard-coded strings with a dedicated constant
legrego Jan 22, 2019
dd89a49
cleanup privilege display
legrego Jan 22, 2019
c3d7bfa
improve privilege display
legrego Jan 22, 2019
b665230
Merge branch 'gap/security-ui' of github.com:legrego/kibana into gap/…
legrego Jan 22, 2019
c09e325
remove unused imports/props/vars
legrego Jan 22, 2019
2747374
consolidate available spaces logic
legrego Jan 22, 2019
d67a7b3
update tests to match description
legrego Jan 22, 2019
73e7fb1
remove unused ActionSet interface
legrego Jan 22, 2019
c16ba50
Don't include privilege actions by default, but instead include them …
legrego Jan 22, 2019
b58b799
Moving where the privileges tooltips are specified (#15)
kobelb Jan 22, 2019
f008641
Merge branch 'granular-app-privileges' into gap/security-ui
legrego Jan 22, 2019
075bd05
fix i18n lint issues
legrego Jan 22, 2019
a97a745
more i18n lint fixes
legrego Jan 22, 2019
31b80cf
cleanup, bug fixes, and additional testing for privilege calculator
legrego Jan 22, 2019
c991ba4
consolidate transform role logic
legrego Jan 22, 2019
cb301a2
remove unused import
legrego Jan 22, 2019
f42e584
Merge branch 'granular-app-privileges' into gap/security-ui
legrego Jan 25, 2019
09701a4
test fix: update expected privilege action mapping
legrego Jan 25, 2019
834cc96
i18n linter fixes
legrego Jan 25, 2019
8eeed58
update security scenarios to reflect changed feature privileges
legrego Jan 25, 2019
0c62090
simplify empty role via buildRole()
legrego Jan 28, 2019
a425023
fix spelling: superceded => superseded
legrego Jan 28, 2019
7a11724
I speel gud
legrego Jan 28, 2019
bfc37a9
fix global find/replace error
legrego Jan 28, 2019
542cef1
adds tests against the public calculateAllowedPrivileges function
legrego Jan 28, 2019
551700e
Update x-pack/plugins/security/public/views/management/edit_role/comp…
kobelb Jan 28, 2019
50b1460
allow roles to be created without kibana privileges
legrego Jan 29, 2019
8e87029
Merge branch 'granular-app-privileges' into gap/security-ui
legrego Jan 29, 2019
3ca6b1f
Merge branch 'gap/security-ui' of github.com:legrego/kibana into gap/…
legrego Jan 29, 2019
e61f308
Specifying a privileges tooltip for APM (#16)
kobelb Jan 29, 2019
dec7f15
update failing snapshots
legrego Jan 29, 2019
f12aa60
Add expected privilege/action mappings for infrastructure-ui-source s…
legrego Jan 29, 2019
4978eed
Merge branch 'gap/security-ui' of github.com:legrego/kibana into gap/…
legrego Jan 29, 2019
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
9 changes: 3 additions & 6 deletions test/functional/page_objects/visualize_page.js
Original file line number Diff line number Diff line change
Expand Up @@ -700,12 +700,9 @@ export function VisualizePageProvider({ getService, getPageObjects }) {
));
}

async saveVisualizationExpectFail(vizName, { saveAsNew = false } = {}) {
await this.saveVisualization(vizName, { saveAsNew });
const errorToast = await testSubjects.exists('saveVisualizationError', {
timeout: defaultFindTimeout
});
expect(errorToast).to.be(true);
async expectNoSaveOption() {
const saveButtonExists = await testSubjects.exists('visualizeSaveButton');
expect(saveButtonExists).to.be(false);
}

async clickLoadSavedVisButton() {
Expand Down
10 changes: 8 additions & 2 deletions x-pack/plugins/apm/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,9 @@ export function apm(kibana) {
init(server) {
server.plugins.xpack_main.registerFeature({
id: 'apm',
name: 'APM',
name: i18n.translate('xpack.apm.featureRegistry.apmFeatureName', {
defaultMessage: 'APM'
}),
icon: 'apmApp',
navLinkId: 'apm',
catalogue: ['apm'],
Expand All @@ -86,7 +88,11 @@ export function apm(kibana) {
},
ui: []
}
}
},
privilegesTooltip: i18n.translate('xpack.apm.privileges.tooltip', {
defaultMessage:
'A role with access to the apm-* indicies should be assigned to users to grant access'
})
});

initTransactionsApi(server);
Expand Down
4 changes: 2 additions & 2 deletions x-pack/plugins/canvas/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default async function(server /*options*/) {
all: {
app: ['canvas', 'kibana'],
savedObject: {
all: ['canvas'],
all: ['canvas-workpad'],
read: ['config', 'index-pattern'],
},
ui: [],
Expand All @@ -54,7 +54,7 @@ export default async function(server /*options*/) {
app: ['canvas', 'kibana'],
savedObject: {
all: [],
read: ['config', 'index-pattern', 'canvas'],
read: ['config', 'index-pattern', 'canvas-workpad'],
},
ui: [],
},
Expand Down
5 changes: 4 additions & 1 deletion x-pack/plugins/gis/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import mappings from './mappings.json';
import { checkLicense } from './check_license';
import { watchStatusAndLicenseToInitialize } from
'../../server/lib/watch_status_and_license_to_initialize';
import { i18n } from '@kbn/i18n';

export function gis(kibana) {

Expand Down Expand Up @@ -62,7 +63,9 @@ export function gis(kibana) {

xpackMainPlugin.registerFeature({
id: 'gis',
name: 'Maps',
name: i18n.translate('xpack.gis.featureRegistry.gisFeatureName', {
defaultMessage: 'Maps',
}),
icon: 'gisApp',
navLinkId: 'gis',
catalogue: ['gis'],
Expand Down
6 changes: 4 additions & 2 deletions x-pack/plugins/graph/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import { resolve } from 'path';
import Boom from 'boom';
import { i18n } from '@kbn/i18n';

import { initServer } from './server';
import mappings from './mappings.json';
Expand Down Expand Up @@ -52,7 +52,9 @@ export function graph(kibana) {

server.plugins.xpack_main.registerFeature({
id: 'graph',
name: 'Graph',
name: i18n.translate('xpack.graph.featureRegistry.graphFeatureName', {
defaultMessage: 'Graph',
}),
icon: 'graphApp',
navLinkId: 'graph',
catalogue: ['graph'],
Expand Down
6 changes: 4 additions & 2 deletions x-pack/plugins/infra/server/kibana.index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,10 @@ export const initServerWithKibana = (kbnServer: KbnServer) => {
const xpackMainPlugin = kbnServer.plugins.xpack_main;
xpackMainPlugin.registerFeature({
id: 'infrastructure',
name: i18n.translate('xpack.infra.linkInfrastructureTitle', {
name: i18n.translate('xpack.infra.featureRegistry.linkInfrastructureTitle', {
defaultMessage: 'Infrastructure',
}),
icon: 'infraApp',
navLinkId: 'infra:home',
catalogue: ['infraops'],
privileges: {
Expand All @@ -52,9 +53,10 @@ export const initServerWithKibana = (kbnServer: KbnServer) => {

xpackMainPlugin.registerFeature({
id: 'logs',
name: i18n.translate('xpack.infra.linkLogsTitle', {
name: i18n.translate('xpack.infra.featureRegistry.linkLogsTitle', {
defaultMessage: 'Logs',
}),
icon: 'loggingApp',
navLinkId: 'infra:logs',
catalogue: ['infralogging'],
privileges: {
Expand Down
15 changes: 8 additions & 7 deletions x-pack/plugins/ml/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,17 +73,15 @@ export const ml = (kibana) => {

xpackMainPlugin.registerFeature({
id: 'ml',
name: 'Machine Learning',
name: i18n.translate('xpack.ml.featureRegistry.mlFeatureName', {
defaultMessage: 'Machine Learning',
}),
icon: 'machineLearningApp',
navLinkId: 'ml',
catalogue: ['ml'],
privileges: {
all: {
metadata: {
tooltip: i18n.translate('xpack.ml.privileges.tooltip', {
defaultMessage: 'The machine_learning_user or machine_learning_admin role should be assigned to grant access'
})
},
catalogue: ['ml'],
grantWithBaseRead: true,
app: ['ml', 'kibana'],
savedObject: {
Expand All @@ -92,7 +90,10 @@ export const ml = (kibana) => {
},
ui: [],
},
}
},
privilegesTooltip: i18n.translate('xpack.ml.privileges.tooltip', {
defaultMessage: 'The machine_learning_user or machine_learning_admin role should also be assigned to users to grant access'
})
});

// Add server routes and initialize the plugin here
Expand Down
15 changes: 8 additions & 7 deletions x-pack/plugins/monitoring/init.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,15 @@ export const init = (monitoringPlugin, server) => {

xpackMainPlugin.registerFeature({
id: 'monitoring',
name: 'Monitoring',
name: i18n.translate('xpack.monitoring.featureRegistry.monitoringFeatureName', {
defaultMessage: 'Stack Monitoring',
}),
icon: 'monitoringApp',
navLinkId: 'monitoring',
catalogue: ['monitoring'],
privileges: {
all: {
metadata: {
tooltip: i18n.translate('xpack.monitoring.privileges.tooltip', {
defaultMessage: 'The monitoring_user role should be assigned to grant access'
})
},
catalogue: ['monitoring'],
grantWithBaseRead: true,
app: ['monitoring', 'kibana'],
savedObject: {
Expand All @@ -76,7 +74,10 @@ export const init = (monitoringPlugin, server) => {
},
ui: [],
},
}
},
privilegesTooltip: i18n.translate('xpack.monitoring.privileges.tooltip', {
defaultMessage: 'The monitoring_user role should also be assigned to users to grant access'
})
});

const bulkUploader = initBulkUploader(kbnServer, server);
Expand Down
13 changes: 13 additions & 0 deletions x-pack/plugins/security/common/model/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

export { Role } from './role';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's interactively play around with the naming of some of these common models, they're getting a bit inconsistent.

export { FeaturesPrivileges, PrivilegeMap, KibanaPrivilegeSpec } from './kibana_privilege';
export { IndexPrivilege } from './index_privilege';
export { PrivilegeDefinition } from './privileges/privilege_definition';
export { GlobalPrivileges } from './privileges/global_privileges';
export { SpacesPrivileges } from './privileges/spaces_privileges';
export { FeaturePrivileges, FeaturePrivilegeSet } from './privileges/feature_privileges';
15 changes: 13 additions & 2 deletions x-pack/plugins/security/common/model/kibana_privilege.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,17 @@
* you may not use this file except in compliance with the Elastic License.
*/

export type KibanaPrivilege = 'none' | 'read' | 'all';
import { FeaturePrivilegeSet } from './privileges/feature_privileges';
export type FeaturesPrivileges = Record<string, Record<string, string[]>>;

export const KibanaAppPrivileges: KibanaPrivilege[] = ['read', 'all'];
export interface PrivilegeMap {
global: Record<string, string[]>;
features: FeaturesPrivileges;
space: Record<string, string[]>;
}

export interface KibanaPrivilegeSpec {
spaces: string[];
base: string[];
feature: FeaturePrivilegeSet;
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

interface FeaturePrivilegesMap {
[featureId: string]: {
[privilegeId: string]: string[];
};
}

export interface FeaturePrivilegeSet {
[featureId: string]: string[];
}

export class FeaturePrivileges {
constructor(private readonly featurePrivilegesMap: FeaturePrivilegesMap) {}

public getAllPrivileges(): FeaturePrivilegeSet {
return Object.entries(this.featurePrivilegesMap).reduce((acc, [featureId, privileges]) => {
return {
...acc,
[featureId]: Object.keys(privileges),
};
}, {});
}

public getPrivileges(featureId: string): string[] {
return Object.keys(this.featurePrivilegesMap[featureId]);
}

public getActions(featureId: string, privilege: string): string[] {
if (!this.featurePrivilegesMap[featureId]) {
return [];
}
return this.featurePrivilegesMap[featureId][privilege] || [];
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

export class GlobalPrivileges {
constructor(private readonly globalPrivilegesMap: Record<string, string[]>) {}

public getAllPrivileges(): string[] {
return Object.keys(this.globalPrivilegesMap);
}

public getActions(privilege: string): string[] {
return this.globalPrivilegesMap[privilege] || [];
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

import { PrivilegeMap } from '../kibana_privilege';
import { FeaturePrivileges } from './feature_privileges';
import { GlobalPrivileges } from './global_privileges';
import { SpacesPrivileges } from './spaces_privileges';

export class PrivilegeDefinition {
constructor(private readonly privilegeActionMap: PrivilegeMap) {}

public getGlobalPrivileges() {
return new GlobalPrivileges(this.privilegeActionMap.global);
}

public getSpacesPrivileges() {
return new SpacesPrivileges(this.privilegeActionMap.space);
}

public getFeaturePrivileges() {
return new FeaturePrivileges(this.privilegeActionMap.features);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
* or more contributor license agreements. Licensed under the Elastic License;
* you may not use this file except in compliance with the Elastic License.
*/

export class SpacesPrivileges {
constructor(private readonly spacesPrivilegesMap: Record<string, string[]>) {}

public getAllPrivileges(): string[] {
return Object.keys(this.spacesPrivilegesMap);
}

public getActions(privilege: string): string[] {
return this.spacesPrivilegesMap[privilege] || [];
}
}
11 changes: 4 additions & 7 deletions x-pack/plugins/security/common/model/role.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
*/

import { IndexPrivilege } from './index_privilege';
import { KibanaPrivilege } from './kibana_privilege';
import { KibanaPrivilegeSpec } from './kibana_privilege';
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: renaming KibanaPrivilege to KibanaPrivilegeSpec while leaving IndexPrivilege named the same bothers me. I think that KibanaPrivilege is too imprecise given it's current usage. How do you feel about IndexPrivileges -> RoleElasticsearchIndexPrivileges and KibanaPrivilege -> RoleKibanaPrivilege since they're used only within the context of a "role"?


export interface Role {
name: string;
Expand All @@ -14,16 +14,13 @@ export interface Role {
indices: IndexPrivilege[];
run_as: string[];
};
kibana: {
global: KibanaPrivilege[];
space: {
[spaceId: string]: KibanaPrivilege[];
};
};
kibana: KibanaPrivilegeSpec[];
metadata?: {
[anyKey: string]: any;
};
transient_metadata?: {
[anyKey: string]: any;
};
_transform_error?: string[];
_unrecognized_applications?: string[];
}
2 changes: 2 additions & 0 deletions x-pack/plugins/security/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { getUserProvider } from './server/lib/get_user';
import { initAuthenticateApi } from './server/routes/api/v1/authenticate';
import { initUsersApi } from './server/routes/api/v1/users';
import { initPublicRolesApi } from './server/routes/api/public/roles';
import { initPrivilegesApi } from './server/routes/api/public/privileges';
import { initIndicesApi } from './server/routes/api/v1/indices';
import { initLoginView } from './server/routes/views/login';
import { initLogoutView } from './server/routes/views/logout';
Expand Down Expand Up @@ -199,6 +200,7 @@ export const security = (kibana) => new kibana.Plugin({
initUsersApi(server);
initPublicRolesApi(server);
initIndicesApi(server);
initPrivilegesApi(server);
initLoginView(server, xpackMainPlugin);
initLogoutView(server);
initLoggedOutView(server);
Expand Down
1 change: 1 addition & 0 deletions x-pack/plugins/security/public/components/_index.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import './management/users/index';
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
@import './users';
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
// HACK -- Fix for background color full-height of browser
.secUsersEditPage,
.secUsersListingPage {
min-height: calc(100vh - 70px);
}

.secUsersListingPage__content {
flex-grow: 0;
}

.secUsersEditPage__content {
max-width: $secFormWidth;
margin-left: auto;
margin-right: auto;
flex-grow: 0;
}
Loading