mirror of
https://github.com/elastic/kibana.git
synced 2025-06-28 11:05:39 -04:00
[Docs] Update feature privilege docs to reflect new route authorization (#201017)
## Summary Updates developer documentation on Feature privileges to reflect changes to Route Authorization. ### Screenshots Before <img width="400" alt="Screenshot 2024-11-20 at 18 52 02" src="https://github.com/user-attachments/assets/0bb01bd0-e41a-48ee-bcaf-bd4119037f1b"> After <img width="400" alt="Screenshot 2024-11-20 at 18 49 26" src="https://github.com/user-attachments/assets/2d5712ce-c277-4ecd-831e-750df8309933"> ### Checklist Check the PR satisfies following conditions. Reviewers should verify this PR satisfies this list as well. - [x] [Documentation](https://www.elastic.co/guide/en/kibana/master/development-documentation.html) was added for features that require explanation or tutorials
This commit is contained in:
parent
83b282a63a
commit
4ffdb35b14
1 changed files with 8 additions and 4 deletions
|
@ -179,8 +179,10 @@ public setup(core: CoreSetup, deps: FeatureControlExampleDeps) {
|
||||||
{
|
{
|
||||||
path: '/internal/my_plugin/sensitive_action',
|
path: '/internal/my_plugin/sensitive_action',
|
||||||
validate: false,
|
validate: false,
|
||||||
options: {
|
security: {
|
||||||
tags: ['access:my_closed_example_api'],
|
authz: {
|
||||||
|
requiredPrivileges: ['my_closed_example_api']
|
||||||
|
}
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
async (context, request, response) => {
|
async (context, request, response) => {
|
||||||
|
@ -193,8 +195,11 @@ public setup(core: CoreSetup, deps: FeatureControlExampleDeps) {
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
<DocCallOut>
|
||||||
|
For more information on the `security.authz` object and API authorization, please refer to our guide on <DocLink id="kibDevDocsSecurityAPIAuthorization" text="Configuring authorization on routes"/>
|
||||||
|
</DocCallOut>
|
||||||
|
|
||||||
Notice, we've added an `options.tags` property for the API route that returns sensitive information. This tag is then used in the privileges object as follow
|
Notice, we've added a `security.authz.requiredPrivileges` property for the API route that returns sensitive information. This added configuration is then used in the privileges object as follow
|
||||||
|
|
||||||
```ts
|
```ts
|
||||||
{
|
{
|
||||||
|
@ -347,7 +352,6 @@ A deep dive into every option for the Kibana Feature configuration and what they
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
### FeatureKibanaPrivileges Interface
|
### FeatureKibanaPrivileges Interface
|
||||||
|
|
||||||
#### excludeFromBasePrivileges (optional)
|
#### excludeFromBasePrivileges (optional)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue