From 1e829d254a25270b0d2d082a82790198976d9cad Mon Sep 17 00:00:00 2001 From: Sid Date: Wed, 20 Nov 2024 18:50:10 +0100 Subject: [PATCH 1/2] [Docs] Update feature privilege docs to reflect new route authorization --- dev_docs/key_concepts/feature_privileges.mdx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/dev_docs/key_concepts/feature_privileges.mdx b/dev_docs/key_concepts/feature_privileges.mdx index 7666ca1e82399..835853283bbf8 100644 --- a/dev_docs/key_concepts/feature_privileges.mdx +++ b/dev_docs/key_concepts/feature_privileges.mdx @@ -179,8 +179,10 @@ public setup(core: CoreSetup, deps: FeatureControlExampleDeps) { { path: '/internal/my_plugin/sensitive_action', validate: false, - options: { - tags: ['access:my_closed_example_api'], + security: { + authz: { + requiredPrivileges: ['my_closed_example_api'] + } }, }, async (context, request, response) => { @@ -193,8 +195,11 @@ public setup(core: CoreSetup, deps: FeatureControlExampleDeps) { ); } ``` + + For more information on the `security.authz` object and API authorization, please refer to our guide on + -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 an `security.authz.requiredPrivileges` property for the API route that returns sensitive information. This tag is then used in the privileges object as follow ```ts { @@ -347,7 +352,6 @@ A deep dive into every option for the Kibana Feature configuration and what they } ``` - ### FeatureKibanaPrivileges Interface #### excludeFromBasePrivileges (optional) From b13127d9ba9a864eb4db02f12bbf8c0d824c90ff Mon Sep 17 00:00:00 2001 From: Sid Date: Wed, 20 Nov 2024 20:08:18 +0100 Subject: [PATCH 2/2] update text --- dev_docs/key_concepts/feature_privileges.mdx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dev_docs/key_concepts/feature_privileges.mdx b/dev_docs/key_concepts/feature_privileges.mdx index 835853283bbf8..87f650133be25 100644 --- a/dev_docs/key_concepts/feature_privileges.mdx +++ b/dev_docs/key_concepts/feature_privileges.mdx @@ -199,7 +199,7 @@ public setup(core: CoreSetup, deps: FeatureControlExampleDeps) { For more information on the `security.authz` object and API authorization, please refer to our guide on -Notice, we've added an `security.authz.requiredPrivileges` 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 {