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 - Role Management API Docs #34854

Closed
wants to merge 15 commits into from

Conversation

legrego
Copy link
Member

@legrego legrego commented Apr 10, 2019

Summary

Updates the role management api documentation to reflect the new shape of Kibana privileges, including updated examples.

Related: #31053

@legrego legrego added Team:Docs Feature:Security/Feature Controls Platform Security - Spaces & Role Mgmt feature controls labels Apr 10, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-docs

@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security

@legrego legrego mentioned this pull request Apr 10, 2019
6 tasks
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@legrego legrego changed the base branch from granular-app-privileges to master April 12, 2019 16:20
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

{
"base": [],
"feature": {
"discover": [
Copy link
Member Author

Choose a reason for hiding this comment

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

This feature list might be overkill, but I wanted to show an example of a really customized role definition. I can scale it back if that'd be better.

`kibana`:: (array) An array of objects which specify the <<kibana-privileges>> for this role:
[source,js]
--------------------------------------------------
[{
Copy link
Member Author

Choose a reason for hiding this comment

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

Rather than explain all this in prose, I thought it'd be easier to understand if I just had a well-documented JSON snippet instead.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is a good idea. However, some of the lines are hard to read because of horizontal scrolling. I made an attempt to edit them down.

Copy link
Contributor

Choose a reason for hiding this comment

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

My only concern is that we can't link to the "Kibana Privileges" section when using comments within the JSON. Perhaps we could mirror the way that Elasticsearch's role API docs implement the "index privileges": https://www.elastic.co/guide/en/elasticsearch/reference/7.0/security-api-put-role.html

}]
--------------------------------------------------

<1> <<features-api>>
Copy link
Member Author

Choose a reason for hiding this comment

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

note: This relies on the Features API docs created in #34575

@legrego legrego marked this pull request as ready for review April 15, 2019 12:27
@legrego legrego requested review from kobelb and gchaps April 15, 2019 12:27
docs/api/role-management/put.asciidoc Outdated Show resolved Hide resolved
docs/api/role-management/put.asciidoc Outdated Show resolved Hide resolved
docs/api/role-management/put.asciidoc Outdated Show resolved Hide resolved
docs/api/role-management/put.asciidoc Outdated Show resolved Hide resolved
docs/api/role-management/put.asciidoc Outdated Show resolved Hide resolved
docs/security/authorization/kibana-privileges.asciidoc Outdated Show resolved Hide resolved
docs/security/authorization/kibana-privileges.asciidoc Outdated Show resolved Hide resolved
docs/security/authorization/kibana-privileges.asciidoc Outdated Show resolved Hide resolved
docs/security/authorization/kibana-privileges.asciidoc Outdated Show resolved Hide resolved
Thanks, Gail!

Co-Authored-By: legrego <lgregorydev@gmail.com>
@elasticmachine

This comment has been minimized.

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@legrego legrego added the review label Apr 16, 2019
Copy link
Contributor

@gchaps gchaps left a comment

Choose a reason for hiding this comment

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

LGTM

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

`kibana`:: (array) An array of objects which specify the <<kibana-privileges>> for this role:
[source,js]
--------------------------------------------------
[{
Copy link
Contributor

Choose a reason for hiding this comment

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

My only concern is that we can't link to the "Kibana Privileges" section when using comments within the JSON. Perhaps we could mirror the way that Elasticsearch's role API docs implement the "index privileges": https://www.elastic.co/guide/en/elasticsearch/reference/7.0/security-api-put-role.html

docs/api/role-management/put.asciidoc Show resolved Hide resolved
@@ -2,14 +2,30 @@
[[kibana-privileges]]
=== Kibana privileges

This section lists the Kibana privileges that you can assign to a role.
Privileges have levels that you can use to manage which features users can access. Roles have privileges to determine whether users have write or read access.
Copy link
Contributor

Choose a reason for hiding this comment

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

Instead of trying to discuss the concept of "levels", would it simplify this to just have two sections: "Base privileges" and "Feature privileges"?

Copy link
Member Author

Choose a reason for hiding this comment

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

Something like this?
image

Copy link
Contributor

Choose a reason for hiding this comment

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

I think that's perfect, since we won't be referencing this from the "Role Management UI docs", do you mind integrating this within the role api docs themselves?

Copy link
Member Author

Choose a reason for hiding this comment

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

I'll make those changes, but I'd prefer to wait on integrating until we have the rest of the doc updates in place: we have almost 10 references to this section today, so I want to see what those sections look like after we've updated them for Feature Controls.

Copy link
Member Author

Choose a reason for hiding this comment

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

@kobelb Last we talked, we had discussed including more context here to help users understand where this is used. What are your thoughts on something like this?

image

Copy link
Contributor

Choose a reason for hiding this comment

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

I like it!

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@legrego legrego closed this Apr 29, 2019
@legrego legrego deleted the fc/role-api-docs branch April 29, 2019 14:12
@legrego legrego restored the fc/role-api-docs branch April 29, 2019 14:12
@legrego legrego reopened this Apr 29, 2019
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@legrego
Copy link
Member Author

legrego commented May 3, 2019

Closing: cherry-picked commits into #35656

@legrego legrego closed this May 3, 2019
@legrego legrego deleted the fc/role-api-docs branch June 12, 2020 02:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Feature:Security/Feature Controls Platform Security - Spaces & Role Mgmt feature controls review Team:Docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants