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

Spaces Phase 1 #21408

Merged
merged 232 commits into from
Oct 1, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
232 commits
Select commit Hold shift + click to select a range
01b5cf0
partial implementation for OLS Phase 1
legrego Mar 26, 2018
7cee640
Allow Saved Objects Client to be wrapped
legrego Apr 17, 2018
0afd1c1
Add placeholder "kibana.namespace" configuration property
legrego Apr 17, 2018
30e86d1
revert changes to saved objects client
legrego Apr 18, 2018
936180b
Remove circular dependency
legrego Apr 19, 2018
4d4f946
Removing namespace setting, we're using xpack.security.rbac.application
kobelb Apr 24, 2018
df569df
Adding config.getDefault
kobelb Apr 24, 2018
9979fb9
Expose SavedObjectsClientProvider on the server for easy plugin consu…
legrego Apr 25, 2018
646a80a
migrate x-pack changes into kibana
legrego Apr 25, 2018
cfa9af3
move spaces plugin to kibana
legrego Apr 25, 2018
d4386db
[Spaces WIP] Additional space management UI (#18607)
legrego Apr 27, 2018
e4abf8a
Porting Spencers changes over (#18664)
kobelb Apr 30, 2018
63d5eaa
Spaces mapping (#18778)
legrego May 3, 2018
4cbfe51
Merge branch 'rbac-phase-1' into spaces-phase-1
legrego May 7, 2018
d679cf5
Beginning to use the ES APIs to insert/check privileges (#18645)
kobelb May 16, 2018
980c202
Merge branch 'rbac-phase-1' into spaces-phase-1
legrego May 17, 2018
50c73b4
[Spaces] Space Avatar with selector in main Kibana menu (#18609)
legrego May 21, 2018
7db020e
[Spaces] Create Default Space on startup (#19177)
legrego May 21, 2018
36e7a67
Adding built-in types and alphabetizing (#19306)
kobelb May 22, 2018
06eb784
Filtering out non-default resource Kibana privileges (#19321)
kobelb May 22, 2018
767fb27
Removing unused file
kobelb May 29, 2018
203ec3e
Adding kibana_rbac_dashboard_only_user to dashboard only mode roles (…
kobelb May 29, 2018
d818cc6
Adding create default roles test (#19505)
kobelb May 29, 2018
813a816
Merge remote-tracking branch 'upstream/master' into rbac-phase-1
kobelb May 30, 2018
66226d6
Merge remote-tracking branch 'upstream/master' into rbac-phase-1
kobelb May 30, 2018
d8d9810
RBAC - SecurityAuditLogger (#19571)
kobelb Jun 1, 2018
3e8e694
RBAC Integration Tests (#19647)
kobelb Jun 4, 2018
74b8486
Merge remote-tracking branch 'upstream/master' into rbac-phase-1
kobelb Jun 5, 2018
1231c70
Fixing "conflicts" after merging master
kobelb Jun 5, 2018
99d70b9
Removing some white-space differences
kobelb Jun 6, 2018
db18d1e
Deleting files that got left behind in a merge
kobelb Jun 6, 2018
d793056
Adding the RBAC API Integration Tests
kobelb Jun 6, 2018
7f2c9b0
SavedObjectClient.find filtering (#19708)
kobelb Jun 7, 2018
b6093bc
Trying to isolate cause of rbac test failures
kobelb Jun 7, 2018
4abf5ed
Adding .toLowerCase() to work around capitalization issue
kobelb Jun 7, 2018
d951a20
No longer exposing the auditLogger, we don't need it like that right now
kobelb Jun 7, 2018
8920425
Removing some unused code
kobelb Jun 7, 2018
91d04e4
Removing defaultSettings from test that doesn't utilize them
kobelb Jun 7, 2018
430d72c
Fixing misspelling
kobelb Jun 7, 2018
7977f00
Don't need an explicit login privilege when we have them all
kobelb Jun 7, 2018
4b52a1f
[Spaces] - Reactify roles screen (#19035)
legrego Jun 7, 2018
60d5917
Removing unused code, fixing misspelling, adding comment
kobelb Jun 7, 2018
4b3c6ba
Putting a file back
kobelb Jun 7, 2018
117b0d4
No longer creating the roles on start-up (#19799)
kobelb Jun 11, 2018
c42635b
Removing kibana_rbac_dashboard_only_user from dashboard only role
kobelb Jun 12, 2018
e887076
Fixing small issue with editing Kibana privileges
kobelb Jun 12, 2018
a76e4a5
[RBAC Phase 1] - Update application privileges when XPack license cha…
legrego Jun 13, 2018
7ef5850
RBAC Legacy Fallback (#19818)
kobelb Jun 13, 2018
9941eb2
Fixing checkLicenses tests since we added RBAC
kobelb Jun 13, 2018
8667ebd
[Flaky Test] - wait for page load to complete (#19895)
legrego Jun 14, 2018
b0e6998
[Flaky Test] Fixes flaky role test (#19899)
legrego Jun 14, 2018
f11a97f
Merge branch 'master' into spaces-phase-1
legrego Jun 14, 2018
9189918
updates from merge
legrego Jun 14, 2018
3dd4b3b
updates from merge -- add missing files
legrego Jun 14, 2018
84f4a8d
Merge remote-tracking branch 'upstream/master' into security-app-privs
kobelb Jun 14, 2018
b464f03
Now with even easier repository access
kobelb Jun 14, 2018
e02c5bb
Sample was including login/version privileges, which was occasionally…
kobelb Jun 14, 2018
9cdf641
Dynamic types (#19925)
kobelb Jun 15, 2018
50411b4
[Spaces] Allow Space Avatar to be customized (#19952)
legrego Jun 15, 2018
a53e7d0
start to address feedback
legrego Jun 19, 2018
472ae28
Merge branch 'security-app-privs' into spaces-phase-1
legrego Jun 19, 2018
b7d2514
fix merge
legrego Jun 19, 2018
1bc85f9
[Spaces] - Redesign space selector (#19964)
legrego Jun 20, 2018
e11d86b
Merge remote-tracking branch 'upstream/master' into security-app-privs
kobelb Jun 26, 2018
f875cec
Fix RBAC Phase 1 merge from master (#20226)
legrego Jun 26, 2018
f6d4466
Merge branch 'security-app-privs' into spaces-phase-1
legrego Jun 26, 2018
c899985
Merge branch 'master' into security-app-privs
legrego Jun 27, 2018
be6445c
Retrying initialize 20 times with a scaling backoff (#20297)
kobelb Jun 28, 2018
e3c1a99
Alternate legacy fallback (#20322)
kobelb Jun 29, 2018
a2cc325
Merge remote-tracking branch 'upstream/master' into security-app-privs
kobelb Jun 29, 2018
b8a110b
Setting the status to red on the first error then continually (#20343)
kobelb Jul 2, 2018
8696030
Renaming get*Privilege to get*Action
kobelb Jul 2, 2018
a56af65
Adding "instance" to alert about other application privileges
kobelb Jul 2, 2018
19a7d6f
Revising some of the naming for the edit roles screen
kobelb Jul 2, 2018
33a153d
One more edit role variable renamed
kobelb Jul 2, 2018
5d8745f
hasPrivileges is now checkPrivileges
kobelb Jul 2, 2018
c1689f7
Revising check_license tests
kobelb Jul 2, 2018
c7ae3e8
Adding 2 more privileges tests
kobelb Jul 2, 2018
03f7931
Moving the other _find method to be near his friend
kobelb Jul 2, 2018
98acdc0
Spelling "returning" correctly, whoops
kobelb Jul 2, 2018
3a95af3
Adding Privileges tests
kobelb Jul 2, 2018
3299a0a
tests for Elasticsearch's privileges APIs
legrego Jul 5, 2018
6942034
Switching the hard-coded resource from 'default' to *
kobelb Jul 5, 2018
19ddaea
Throw error before we execute a POST privilege call that won't work
kobelb Jul 5, 2018
b59be01
Merge branch 'security-app-privs' into spaces-phase-1
legrego Jul 5, 2018
1f48041
Resolving issue when initially registering privileges
kobelb Jul 5, 2018
6e72a63
Merge branch 'security-app-privs' into spaces-phase-1
legrego Jul 5, 2018
a1720af
fix merge 'conflict'
legrego Jul 5, 2018
98ea1b5
Logging legacy fallback deprecation warning on login (#20493)
kobelb Jul 6, 2018
3c87234
improve space selector in left nav
legrego Jul 9, 2018
a2b4ccf
Merge branch 'master' into spaces-phase-1
legrego Jul 9, 2018
7cef606
Deriving application from Kibana index (#20614)
kobelb Jul 10, 2018
fb724d2
Validate ES has_privileges response before trusting it (#20682)
legrego Jul 12, 2018
c65908b
Removing unused setting
kobelb Jul 12, 2018
3e6c057
Merge remote-tracking branch 'upstream/master' into security-app-privs
kobelb Jul 13, 2018
a597976
Public Role APIs (#20732)
kobelb Jul 13, 2018
36f4b2f
Adding setting to allow the user to turn off the legacy fallback (#20…
kobelb Jul 13, 2018
1330efd
Merge branch 'security-app-privs' into spaces-phase-1
legrego Jul 16, 2018
6fb21ee
Merge branch 'master' into spaces-phase-1
legrego Jul 19, 2018
6fa01f1
Merge branch 'master' into spaces-phase-1
legrego Jul 20, 2018
b6d9ec2
[Spaces] - Update Roles screen to use public API (#21031)
legrego Jul 20, 2018
91350bf
Merge branch 'master' into spaces-phase-1
legrego Jul 20, 2018
f1fdf2b
Merge branch 'master' into spaces-phase-1
legrego Jul 23, 2018
fe9e7fe
fix visual regressions from EUI upgrade
legrego Jul 23, 2018
88b51da
fix lint errors
legrego Jul 23, 2018
0e898e5
Merge branch 'master' into spaces-phase-1
legrego Jul 25, 2018
3d8b9b9
fix merge
legrego Jul 25, 2018
252e407
[Spaces] Space-Aware Saved Objects (#18862)
legrego Jul 26, 2018
e526f5b
[Spaces] - Introducing Space Identifier, Forgetting URL Context (#21295)
legrego Jul 27, 2018
c1ce140
Merge branch 'master' into spaces-phase-1
legrego Jul 30, 2018
3159a15
fix snapshot
legrego Jul 30, 2018
200725c
revert unnecessary changes from #18664
legrego Jul 30, 2018
70e8c76
Merge branch 'master' into spaces-phase-1
legrego Jul 31, 2018
0a9b027
yarn.lock update
legrego Jul 31, 2018
69ab612
[Spaces] - prepend space id to document id (#21372)
legrego Aug 1, 2018
0761b0a
Merge branch 'master' into spaces-phase-1
legrego Aug 15, 2018
f618f1a
use new spaces icon
legrego Aug 15, 2018
efb8f06
[Spaces] move Spaces management into Kibana section (#21665)
legrego Aug 16, 2018
0dd9ccd
[Spaces] - Reporting updates (#21457)
legrego Aug 16, 2018
7734701
snapshot updates
legrego Aug 16, 2018
71144f8
Merge branch 'spaces-phase-1' of github.com:elastic/kibana into space…
legrego Aug 16, 2018
649974a
Merge branch 'master' into spaces-phase-1
legrego Aug 16, 2018
69fe9a7
[Spaces] Replace Space Selector modal with a less intrusive popover (…
legrego Aug 16, 2018
e9ee8f8
Updating the Role API to work better spaces (#22080)
kobelb Aug 17, 2018
72a1526
Creating the roles properly (#22152)
kobelb Aug 17, 2018
0be2613
Merge remote-tracking branch 'upstream/master' into spaces-phase-1
kobelb Aug 20, 2018
ffb682e
Merge branch 'master' into spaces-phase-1
legrego Aug 24, 2018
4f2eb00
fix and ignore some typedefs, for now
legrego Aug 24, 2018
bfd3746
update snapshots
legrego Aug 24, 2018
8c42a68
fix space card rendering
legrego Aug 24, 2018
2f08590
[Spaces] - Space aware privileges UI (#21049)
legrego Aug 27, 2018
0ecf9e7
fix typescript errors
legrego Aug 27, 2018
e4f2c92
fix snapshot
legrego Aug 27, 2018
d5288dd
fix dashboard mode functional tests
legrego Aug 27, 2018
29c7b8a
[Spaces] - Support "Recently viewed" widget (#22492)
legrego Aug 29, 2018
156718a
fix tests
legrego Aug 29, 2018
2c50a9f
remove use of EuiTextColor to fix build
legrego Aug 30, 2018
70f615b
Merge branch 'master' into spaces-phase-1
legrego Aug 30, 2018
e04dfd2
attempt to fix test flakyness
legrego Aug 30, 2018
3e1c1fa
Merge branch 'master' into spaces-phase-1
legrego Sep 4, 2018
278f7b8
[Spaces] - basic telemetry (#20581)
legrego Sep 4, 2018
1fcfd4e
diagnose flakyness
legrego Sep 4, 2018
1544b38
Merge branch 'spaces-phase-1' of github.com:elastic/kibana into space…
legrego Sep 4, 2018
e4ebd0b
add missing await
legrego Sep 4, 2018
8b77134
Saved Object Namespaces (#22357)
kobelb Sep 4, 2018
a226521
[Spaces] - Experimental Public spaces api (#22501)
legrego Sep 6, 2018
896a89c
Merge branch 'master' into spaces-phase-1
legrego Sep 6, 2018
125cc36
supply space id to tutorial context (#22760)
legrego Sep 6, 2018
81096fd
attempt to isolate test failure
legrego Sep 6, 2018
ec71883
[Spaces] - copy edits (#22457)
legrego Sep 6, 2018
557bbcd
don't render space selector on login screen
legrego Sep 6, 2018
b6c5f11
run all tests again
legrego Sep 6, 2018
ce6bd30
run all oss tests again
legrego Sep 6, 2018
df74a82
update role api tests
legrego Sep 6, 2018
06ee993
[Spaces] - Handle space renaming and deleting (#22586)
legrego Sep 7, 2018
bf6dd35
Merge branch 'master' into spaces-phase-1
legrego Sep 10, 2018
2d0b1ed
update snapshot
legrego Sep 10, 2018
493b3df
fix failing test
legrego Sep 10, 2018
778f69f
fix getSortingParameters when an array of length 1 is specified
legrego Sep 10, 2018
1a76bfe
make basePath space aware again
legrego Sep 10, 2018
2c13b0e
update tests
legrego Sep 10, 2018
a582cb1
improve default space color
legrego Sep 11, 2018
eac1f4c
Merge branch 'master' into spaces-phase-1
legrego Sep 11, 2018
e9542a6
add chrome mock
legrego Sep 11, 2018
b90b30f
[WIP] Securing Spaces (#21995)
kobelb Sep 12, 2018
07919a7
fix package version
legrego Sep 12, 2018
d9095b6
update xpack yarn.lock
legrego Sep 12, 2018
e17ef32
Merge branch 'master' into spaces-phase-1
legrego Sep 12, 2018
a665a5e
[Spaces] - improve ux for unauthorized users (#22982)
legrego Sep 12, 2018
5ed4427
[Spaces] - Space-aware Settings UI (#22886)
legrego Sep 13, 2018
feef8b7
fix xpack_main replaceInjectedVars tests
legrego Sep 13, 2018
01f3cf1
Merge branch 'spaces-phase-1' of github.com:elastic/kibana into space…
legrego Sep 13, 2018
79bff57
[Spaces] - code cleanup (#22802)
legrego Sep 14, 2018
6cebf38
Merge branch 'master' into spaces-phase-1
legrego Sep 14, 2018
68829be
Merge branch 'master' into spaces-phase-1
legrego Sep 14, 2018
70641d5
update snapshots
legrego Sep 14, 2018
3874fee
update role management screen for EUI 4
legrego Sep 14, 2018
eb36356
adds space selection functional tests
legrego Sep 14, 2018
accbe4f
debug ts error
legrego Sep 14, 2018
703d90d
fix invalid login tests
legrego Sep 14, 2018
fc07717
test diagnosis
legrego Sep 14, 2018
49ea334
additional tests
legrego Sep 15, 2018
29686c6
re-enable spaces functional tests
legrego Sep 15, 2018
9dd36d3
sort spaces by name
legrego Sep 18, 2018
4544c7a
re-enable spaces functional test suites
legrego Sep 18, 2018
a3b3168
Use an instance of SavedObjectsSerializer for migrations and the repo…
kobelb Sep 18, 2018
04ed13d
Fixing spelling of serialization
kobelb Sep 18, 2018
d406c61
Making the serializer conditionally include and prepend id with ns
kobelb Sep 19, 2018
7b87f0a
Adding repository tests for the namespaces
kobelb Sep 19, 2018
f2a2f46
Implementing find
kobelb Sep 20, 2018
8c314f5
Modifying the SOCs to pass the options with the namespace
kobelb Sep 20, 2018
93c6b79
Centralizing omitting the namespace when using serializer.rawToSavedO…
kobelb Sep 20, 2018
be44857
Merge branch 'saved-object-namespaces-with-migrations' into spaces-ph…
kobelb Sep 20, 2018
ba43a69
Passing the schema through to the SavedObjectRepositoryProvider
kobelb Sep 20, 2018
954d9df
Changing the schema to work with undefined ui exports schemas
kobelb Sep 20, 2018
a293000
Adding schema tests
kobelb Sep 20, 2018
86edf75
Making the complimentary serialization test use the namespace
kobelb Sep 20, 2018
f54a294
Fixing uiExports
kobelb Sep 20, 2018
40eeab6
Merge remote-tracking branch 'upstream/master' into saved-object-name…
kobelb Sep 20, 2018
9d3b199
Merge branch 'saved-object-namespaces-with-migrations' into spaces-ph…
kobelb Sep 20, 2018
1cbd703
Removing erroneous export
kobelb Sep 20, 2018
78d44eb
Fixing find api integration tests with no type
kobelb Sep 20, 2018
3e20cda
Fixing some tests
kobelb Sep 20, 2018
2b46bf9
Merge branch 'saved-object-namespaces-with-migrations' into spaces-ph…
kobelb Sep 20, 2018
1350708
Fixing included fields for the find
kobelb Sep 20, 2018
d892566
We were specifying schema twice in a test
kobelb Sep 20, 2018
05f3465
Removing erroneous jsdoc parameter for SOC bulkCreate
kobelb Sep 20, 2018
1c3b481
Fixing include field tests, they're checking length also...
kobelb Sep 20, 2018
cf9a50a
Merge branch 'saved-object-namespaces-with-migrations' into spaces-ph…
kobelb Sep 20, 2018
3b115ad
redirect to space selector when active space is not found (#23340)
legrego Sep 20, 2018
1d8b2c5
Disable spaces for BWC reporting tests, as they require OSS data sets
legrego Sep 21, 2018
493f899
Updating Repository test after adding namespace to always included
kobelb Sep 21, 2018
debb061
Merge branch 'saved-object-namespaces-with-migrations' into spaces-ph…
kobelb Sep 21, 2018
33d871b
[Spaces] - Suppress conflict errors when creating the default space (…
legrego Sep 21, 2018
0a6d4f0
fix telemetry with spaces enabled (#23403)
legrego Sep 21, 2018
06d13c9
Merge branch 'spaces-phase-1-namespaces' into spaces-phase-1
kobelb Sep 21, 2018
41992d3
Switching telemetry from savedObjectsSchema: to savedObjectSchemas:
kobelb Sep 21, 2018
04efc88
Removing erroneous plugin from the spaces api integration tests
kobelb Sep 21, 2018
88aad1d
Fixing find test that is throwing a 400 when there is no type
kobelb Sep 24, 2018
6777c8c
Fixing other find tests with no type
kobelb Sep 24, 2018
bcac182
Merge remote-tracking branch 'upstream/master' into spaces-phase-1
kobelb Sep 24, 2018
4673d51
Moving the expects to the top of the suite factories
kobelb Sep 24, 2018
7c1e8c0
Changing the way users are names to hopefully make this more clear
kobelb Sep 24, 2018
8873643
Adding tests trying to access or specify other namespaces
kobelb Sep 25, 2018
7f49d05
Making user descriptions not use constants and be consistent
kobelb Sep 25, 2018
3832255
[Spaces] - Documentation (#23205)
legrego Sep 25, 2018
18ca584
Making it easier and more terse to specify the user for a test
kobelb Sep 25, 2018
32bd036
[Spaces] - Link to role management from space management (#23528)
legrego Sep 26, 2018
fec5a16
Merge remote-tracking branch 'upstream/master' into spaces-phase-1
kobelb Sep 26, 2018
4e71247
Minimizing some formatting changes from the diff
kobelb Sep 26, 2018
0c3c099
Switching from a while loop to a findIndex
kobelb Sep 27, 2018
e7dd8bf
Merge branch 'master' into spaces-phase-1
legrego Sep 28, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion docs/api.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@ entirely.

[float]
== APIs

* <<spaces-api>>
* <<role-management-api>>
* <<saved-objects-api>>
* <<dashboard-import-api>>
* <<logstash-configuration-management-api>>
* <<url-shortening-api>>
--

include::api/spaces-management.asciidoc[]
include::api/role-management.asciidoc[]
include::api/saved-objects.asciidoc[]
include::api/dashboard-import.asciidoc[]
Expand Down
42 changes: 38 additions & 4 deletions docs/api/role-management/put.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ 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`:: (list) A list of objects that specify the <<kibana-privileges>>.
`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.

===== Example

Expand All @@ -52,13 +52,47 @@ PUT /api/security/role/my_kibana_role
"query" : "{\"match\": {\"title\": \"foo\"}}"
} ],
},
"kibana": [ {
"privileges": [ "all" ]
} ],
"kibana": {
"global": ["all"]
}
}
--------------------------------------------------
// KIBANA

==== Response

A successful call returns a response code of `204` and no response body.


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

Note: granting access

[source,js]
--------------------------------------------------
PUT /api/security/role/my_kibana_role
{
"metadata" : {
"version" : 1
},
"elasticsearch": {
"cluster" : [ "all" ],
"indices" : [ {
"names" : [ "index1", "index2" ],
"privileges" : [ "all" ],
"field_security" : {
"grant" : [ "title", "body" ]
},
"query" : "{\"match\": {\"title\": \"foo\"}}"
} ],
},
"kibana": {
"global": [],
"space": {
"marketing": ["all"],
"engineering": ["read"]
}
}
}
--------------------------------------------------
17 changes: 17 additions & 0 deletions docs/api/spaces-management.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[role="xpack"]
[[spaces-api]]
== Kibana Spaces API

experimental[This API is *experimental* and may be changed or removed completely in a future release. The underlying Spaces concepts are stable, but the APIs for managing Spaces are currently experimental.]

The spaces API allows people to manage their spaces within {kib}.

* <<spaces-api-post>>
* <<spaces-api-put>>
* <<spaces-api-get>>
* <<spaces-api-delete>>

include::spaces-management/post.asciidoc[]
include::spaces-management/put.asciidoc[]
include::spaces-management/get.asciidoc[]
include::spaces-management/delete.asciidoc[]
25 changes: 25 additions & 0 deletions docs/api/spaces-management/delete.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
[[spaces-api-delete]]
=== Delete space

experimental[This API is *experimental* and may be changed or removed completely in a future release. The underlying Spaces concepts are stable, but the APIs for managing Spaces are currently experimental.]

[WARNING]
==================================================
Deleting a space will automatically delete all saved objects that belong to that space. This operation cannot be undone!
==================================================

==== Request

To delete a space, submit a DELETE request to the `/api/spaces/space/<space_id>`
endpoint:

[source,js]
--------------------------------------------------
DELETE /api/spaces/space/marketing
--------------------------------------------------
// KIBANA

==== Response

If the space is successfully deleted, the response code is `204`; otherwise, the response
code is 404.
77 changes: 77 additions & 0 deletions docs/api/spaces-management/get.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
[[spaces-api-get]]
=== Get Space

experimental[This API is *experimental* and may be changed or removed completely in a future release. The underlying Spaces concepts are stable, but the APIs for managing Spaces are currently experimental.]

Retrieves all {kib} spaces, or a specific space.

==== Get all {kib} spaces

===== Request

To retrieve all spaces, issue a GET request to the
/api/spaces/space endpoint.

[source,js]
--------------------------------------------------
GET /api/spaces/space
--------------------------------------------------
// KIBANA

===== Response

A successful call returns a response code of `200` and a response body containing a JSON
representation of the spaces.

[source,js]
--------------------------------------------------
[
{
"id": "default",
"name": "Default",
"description" : "This is the Default Space",
"_reserved": true
},
{
"id": "marketing",
"name": "Marketing",
"description" : "This is the Marketing Space",
"color": "#aabbcc",
"initials": "MK"
},
{
"id": "sales",
"name": "Sales",
"initials": "MK"
},
]
--------------------------------------------------

==== Get a specific space

===== Request

To retrieve a specific space, issue a GET request to
the `/api/spaces/space/<space_id>` endpoint:

[source,js]
--------------------------------------------------
GET /api/spaces/space/marketing
--------------------------------------------------
// KIBANA

===== Response

A successful call returns a response code of `200` and a response body containing a JSON
representation of the space.

[source,js]
--------------------------------------------------
{
"id": "marketing",
"name": "Marketing",
"description" : "This is the Marketing Space",
"color": "#aabbcc",
"initials": "MK"
}
--------------------------------------------------
50 changes: 50 additions & 0 deletions docs/api/spaces-management/post.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[[spaces-api-post]]
=== Create Space

experimental[This API is *experimental* and may be changed or removed completely in a future release. The underlying Spaces concepts are stable, but the APIs for managing Spaces are currently experimental.]

Creates a new {kib} space. To update an existing space, use the PUT command.

==== Request

To create a space, issue a POST request to the
`/api/spaces/space` endpoint.

[source,js]
--------------------------------------------------
POST /api/spaces/space
--------------------------------------------------

==== Request Body

The following parameters can be specified in the body of a POST request to create a space:

`id`:: (string) Required identifier for the space. This identifier becomes part of Kibana's URL when inside the space. This cannot be changed by the update operation.

`name`:: (string) Required display name for the space.

`description`:: (string) Optional description for the space.

`initials`:: (string) Optionally specify the initials shown in the Space Avatar for this space. By default, the initials will be automatically generated from the space name.
If specified, initials should be either 1 or 2 characters.

`color`:: (string) Optioanlly specify the hex color code used in the Space Avatar for this space. By default, the color will be automatically generated from the space name.

===== Example

[source,js]
--------------------------------------------------
POST /api/spaces/space
{
"id": "marketing",
"name": "Marketing",
"description" : "This is the Marketing Space",
"color": "#aabbcc",
"initials": "MK"
}
--------------------------------------------------
// KIBANA

==== Response

A successful call returns a response code of `200` with the created Space.
50 changes: 50 additions & 0 deletions docs/api/spaces-management/put.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
[[spaces-api-put]]
=== Update Space

experimental[This API is *experimental* and may be changed or removed completely in a future release. The underlying Spaces concepts are stable, but the APIs for managing Spaces are currently experimental.]

Updates an existing {kib} space. To create a new space, use the POST command.

==== Request

To update a space, issue a PUT request to the
`/api/spaces/space/<space_id>` endpoint.

[source,js]
--------------------------------------------------
PUT /api/spaces/space/<space_id>
--------------------------------------------------

==== Request Body

The following parameters can be specified in the body of a PUT request to update a space:

`id`:: (string) Required identifier for the space. This identifier becomes part of Kibana's URL when inside the space. This cannot be changed by the update operation.

`name`:: (string) Required display name for the space.

`description`:: (string) Optional description for the space.

`initials`:: (string) Optionally specify the initials shown in the Space Avatar for this space. By default, the initials will be automatically generated from the space name.
If specified, initials should be either 1 or 2 characters.

`color`:: (string) Optioanlly specify the hex color code used in the Space Avatar for this space. By default, the color will be automatically generated from the space name.

===== Example

[source,js]
--------------------------------------------------
PUT /api/spaces/space/marketing
{
"id": "marketing",
"name": "Marketing",
"description" : "This is the Marketing Space",
"color": "#aabbcc",
"initials": "MK"
}
--------------------------------------------------
// KIBANA

==== Response

A successful call returns a response code of `200` with the updated Space.
6 changes: 3 additions & 3 deletions docs/development/core/development-basepath.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ $http.get(chrome.addBasePath('/api/plugin/things'));
[float]
==== Server side

Append `config.get('server.basePath')` to any absolute URL path.
Append `request.getBasePath()` to any absolute URL path.

["source","shell"]
-----------
const basePath = server.config().get('server.basePath');
server.route({
path: '/redirect',
handler(req, reply) {
reply.redirect(`${basePath}/otherLocation`);
handler(request, reply) {
reply.redirect(`${request.getBasePath()}/otherLocation`);
}
});
-----------
Expand Down
2 changes: 2 additions & 0 deletions docs/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,8 @@ include::monitoring/index.asciidoc[]

include::management.asciidoc[]

include::spaces/index.asciidoc[]

include::security/index.asciidoc[]

include::management/watcher-ui/index.asciidoc[]
Expand Down
11 changes: 8 additions & 3 deletions docs/security/authorization/index.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@
[[xpack-security-authorization]]
=== Authorization

Authorizing users to use {kib} in most configurations is as simple as assigning the user
Authorizing users to use {kib} in simple configurations is as easy as assigning the user
either the `kibana_user` or `kibana_dashboard_only_user` reserved role. If you're running
a single tenant of {kib} against your {es} cluster, this is sufficient and no other
action is required.
a single tenant of {kib} against your {es} cluster, and you're not controlling access to individual spaces, then this is sufficient and no other action is required.

==== Spaces

If you want to control individual spaces in {kib}, do **not** use the `kibana_user` or `kibana_dashboard_only_user` roles. Users with these roles are able to access all spaces in Kibana. Instead, create your own roles that grant access to specific spaces.

==== Multi-tenant {kib}

Expand All @@ -15,6 +18,8 @@ either the *Management / Security / Roles* page in {kib} or the <<role-managemen
to assign a specific <<kibana-privileges, Kibana privilege>> at that tenant. After creating the
custom role, you should assign this role to the user(s) that you wish to have access.

While multi-tenant installations are supported, the recommended approach to securing access to segments of {kib} is to grant users access to specific spaces.

==== Legacy roles

Prior to {kib} 6.4, {kib} users required index privileges to the `kibana.index`
Expand Down
8 changes: 8 additions & 0 deletions docs/spaces/getting-started.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[role="xpack"]
[[spaces-getting-started]]
=== Getting Started

Spaces are automatically enabled in {kib}. If you don't wish to use this feature, you can disable it
by setting `xpack.spaces.enabled` to `false` in your `kibana.yml` configuration file.

{kib} automatically creates a default space for you. If you are upgrading from another version of {kib}, then the default space will contain all of your existing saved objects. Although you can't delete the default space, you can customize it to your liking.
Binary file added docs/spaces/images/delete-space.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/spaces/images/edit-space.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/spaces/images/securing-spaces.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/spaces/images/space-management.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/spaces/images/space-selector.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
17 changes: 17 additions & 0 deletions docs/spaces/index.asciidoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[role="xpack"]
[[xpack-spaces]]
== Spaces

With spaces, you can organize your dashboards and other saved objects into meaningful categories.
After creating your own spaces, you will be asked to choose a space when you enter {kib}. Once inside a space,
you will only see the dashboards and other saved objects that belong to that space. You can change your active space at any time.

With security enabled, you can control which users have access to individual spaces.

[role="screenshot"]
image::spaces/images/space-selector.png["Space selector screen"]

include::getting-started.asciidoc[]
include::managing-spaces.asciidoc[]
include::securing-spaces.asciidoc[]
include::moving-saved-objects.asciidoc[]
Loading