Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature Controls - Documentation #35656

Merged
merged 34 commits into from
May 22, 2019
Merged
Show file tree
Hide file tree
Changes from 25 commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
0f04bc7
update spaces images
legrego Apr 26, 2019
df03afd
add Spaces FC section
legrego Apr 26, 2019
911fad9
Updates for kibana authorization section
legrego Apr 26, 2019
6ff863e
update plugin development guide
legrego Apr 26, 2019
b9fa9af
start adding docs
legrego Apr 16, 2019
a459a61
remove unused description field from Feature Registry interface
legrego Apr 18, 2019
e0280b4
Merge branch 'master' of github.com:elastic/kibana into fc/docs
legrego May 3, 2019
9e1f34b
Update role management API documentation
legrego Apr 10, 2019
84c7511
Apply suggestions from code review
gchaps Apr 16, 2019
bdaf6f8
Update docs/api/role-management/put.asciidoc
legrego Apr 16, 2019
bf85bd2
update kibana privileges section intro
legrego Apr 16, 2019
add7220
relocate link to Role Management API
legrego Apr 16, 2019
eb9f70b
update PUT role docs to align with ES
legrego Apr 17, 2019
26748d8
indicate that base and feature privileges cannot be used at the same …
legrego Apr 22, 2019
989b8ce
restructure kibana privileges section
legrego Apr 22, 2019
fbdd496
add UI and API examples to Kibana Privileges section
legrego Apr 29, 2019
69bbe1f
Apply suggestions from code review
kobelb May 6, 2019
f30808b
address PR feedback
legrego May 6, 2019
e278d14
Apply suggestions from code review
kobelb May 6, 2019
9f570d8
Merge branch 'master' of github.com:elastic/kibana into fc/docs
legrego May 7, 2019
e3bb057
Merge branch 'fc/docs' of github.com:legrego/kibana into fc/docs
legrego May 7, 2019
fed4d74
Merge branch 'master' of github.com:elastic/kibana into fc/docs
legrego May 7, 2019
6197eb1
Apply suggestions from code review
kobelb May 8, 2019
cd30048
Merge branch 'master' of github.com:elastic/kibana into fc/docs
legrego May 8, 2019
5cc76d6
address pr feedback
legrego May 8, 2019
dd38b52
Update docs/api/role-management/put.asciidoc
legrego May 20, 2019
63369d1
Update docs/security/index.asciidoc
legrego May 20, 2019
c854280
address PR feedback
legrego May 20, 2019
91dd2de
Merge branch 'fc/docs' of github.com:legrego/kibana into fc/docs
legrego May 20, 2019
f2adf1a
Merge branch 'master' of github.com:elastic/kibana into fc/docs
legrego May 20, 2019
34432bc
Merge branch 'master' of github.com:elastic/kibana into fc/docs
legrego May 21, 2019
54d57bb
fix merge from master
legrego May 21, 2019
e75537c
Merge branch 'master' of github.com:elastic/kibana into fc/docs
legrego May 22, 2019
f357612
Update docs/spaces/managing-spaces.asciidoc
legrego May 22, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
81 changes: 73 additions & 8 deletions docs/api/role-management/get.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,15 @@ representation of the roles.
"cluster": [ ],
"run_as": [ ]
},
"kibana": [ {
"privileges": [ "all" ]
} ],
"kibana": [{
"base": [
"all"
],
"feature": {},
"spaces": [
"*"
]
}]
},
{
"name": "my_admin_role",
Expand Down Expand Up @@ -82,7 +88,7 @@ the `/api/security/role/<rolename>` endpoint:

[source,js]
--------------------------------------------------
GET /api/security/role/my_kibana_role
GET /api/security/role/my_restricted_kibana_role
--------------------------------------------------
// KIBANA

Expand All @@ -94,7 +100,7 @@ representation of the role.
[source,js]
--------------------------------------------------
{
"name": "my_kibana_role",
"name": "my_restricted_kibana_role",
"metadata" : {
"version" : 1
},
Expand All @@ -106,8 +112,67 @@ representation of the role.
"indices": [ ],
"run_as": [ ]
},
"kibana": [ {
"privileges": [ "all" ]
} ],
"kibana": [
{
"base": [
"read"
],
"feature": {},
"spaces": [
"marketing"
]
},
{
"base": [],
"feature": {
"discover": [
"all"
],
"visualize": [
"all"
],
"dashboard": [
"all"
],
"dev_tools": [
"read"
],
"advancedSettings": [
"read"
],
"indexPatterns": [
"read"
],
"timelion": [
"all"
],
"graph": [
"all"
],
"apm": [
"read"
],
"maps": [
"read"
],
"canvas": [
"read"
],
"infrastructure": [
"all"
],
"logs": [
"all"
],
"uptime": [
"all"
]
},
"spaces": [
"sales",
"default"
]
}
]
}
--------------------------------------------------
196 changes: 171 additions & 25 deletions docs/api/role-management/put.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,21 @@ that begin with `_` are reserved for system usage.
`elasticsearch`:: (object) Optional {es} cluster and index privileges, valid keys are
`cluster`, `indices` and `run_as`. For more information, see {xpack-ref}/defining-roles.html[Defining Roles].

`kibana`:: (object) An object that specifies the <<kibana-privileges>>. Valid keys are `global` and `space`. Privileges defined in the `global` key will apply to all spaces within Kibana, and will take precedent over any privileges defined in the `space` key. For example, specifying `global: ["all"]` will grant full access to all spaces within Kibana, even if the role indicates that a specific space should only have `read` privileges.
`kibana`:: (list) A list of objects that specifies the <<kibana-privileges>> for this role:
`base` ::: (list) An optional base privilege. If specified, must either be `["all"]` or `["read"]`.
The `feature` section cannot be used if a base privilege is specified here. You must use one or the other.
"all" grants read/write access to all Kibana features for the specified spaces.
"read" grants read-only access to all Kibana features for the specified spaces.

===== Example
`feature` ::: (object) Object containing privileges for specific features.
The `base` section cannot be used if feature privileges are specified here. You must use one or the other.
Use the <<features-api, Features API>> to retrieve a list of available features.

`spaces` ::: (list) The spaces these privileges should be applied to.
To grant access to all spaces, set this to `["*"]`, or omit the value.

===== Example 1
Granting access to various features in all spaces
legrego marked this conversation as resolved.
Show resolved Hide resolved

[source,js]
--------------------------------------------------
Expand All @@ -44,32 +56,159 @@ PUT /api/security/role/my_kibana_role
"version" : 1
},
"elasticsearch": {
"cluster" : [ "all" ],
"indices" : [ {
"names" : [ "index1", "index2" ],
"privileges" : [ "all" ],
"field_security" : {
"grant" : [ "title", "body" ]
},
"query" : "{\"match\": {\"title\": \"foo\"}}"
} ]
"cluster" : [ ],
"indices" : [ ]
},
"kibana": {
"global": ["all"]
}
"kibana": [
{
"base": [],
"feature": {
"discover": [
"all"
],
"visualize": [
"all"
],
"dashboard": [
"all"
],
"dev_tools": [
"read"
],
"advancedSettings": [
"read"
],
"indexPatterns": [
"read"
],
"timelion": [
"all"
],
"graph": [
"all"
],
"apm": [
"read"
],
"maps": [
"read"
],
"canvas": [
"read"
],
"infrastructure": [
"all"
],
"logs": [
"all"
],
"uptime": [
"all"
]
},
"spaces": [
"*"
]
}
]
}
--------------------------------------------------
// KIBANA

==== Response
===== Example 2
Granting "dashboard only" access to only the Marketing space.

A successful call returns a response code of `204` and no response body.
[source,js]
--------------------------------------------------
PUT /api/security/role/my_kibana_role
{
"metadata" : {
"version" : 1
},
"elasticsearch": {
"cluster" : [ ],
"indices" : [ ]
},
"kibana": [
{
"base": [],
"feature": {
"dashboard": ["read"]
},
"spaces": [
"marketing"
]
}
]
}
--------------------------------------------------

===== Example 3
Granting full access to all features in the Default space.

[source,js]
--------------------------------------------------
PUT /api/security/role/my_kibana_role
{
"metadata" : {
"version" : 1
},
"elasticsearch": {
"cluster" : [ ],
"indices" : [ ]
},
"kibana": [
{
"base": ["all"],
"feature": {
},
"spaces": [
"default"
]
}
]
}
--------------------------------------------------

===== Example 4
Granting different access to different spaces.

[source,js]
--------------------------------------------------
PUT /api/security/role/my_kibana_role
{
"metadata" : {
"version" : 1
},
"elasticsearch": {
"cluster" : [ ],
"indices" : [ ]
},
"kibana": [
{
"base": [],
"feature": {
"discover": ["all"],
"dashboard": ["all"]
},
"spaces": [
"default"
]
},
{
"base": ["read"],
"spaces": [
"marketing",
"sales"
]
}
]
}
--------------------------------------------------

==== Granting access to specific spaces
To grant access to individual spaces within {kib}, specify the space identifier within the `kibana` object.

Note: granting access
===== Example 5
Granting access to both Kibana and Elasticsearch.

[source,js]
--------------------------------------------------
Expand All @@ -89,12 +228,19 @@ PUT /api/security/role/my_kibana_role
"query" : "{\"match\": {\"title\": \"foo\"}}"
} ]
},
"kibana": {
"global": [],
"space": {
"marketing": ["all"],
"engineering": ["read"]
"kibana": [
{
"base": ["all"],
"feature": {
},
"spaces": [
"default"
]
}
}
]
}
--------------------------------------------------

==== Response

A successful call returns a response code of `204` and no response body.
3 changes: 3 additions & 0 deletions docs/development/plugin-development.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,16 @@ The Kibana plugin interfaces are in a state of constant development. We cannot

* <<development-plugin-resources>>
* <<development-uiexports>>
* <<development-plugin-feature-registration>>
* <<development-plugin-functional-tests>>
* <<development-plugin-localization>>

include::plugin/development-plugin-resources.asciidoc[]

include::plugin/development-uiexports.asciidoc[]

include::plugin/development-plugin-feature-registration.asciidoc[]

include::plugin/development-plugin-functional-tests.asciidoc[]

include::plugin/development-plugin-localization.asciidoc[]
Expand Down