From 197fa770fbc3fa5c12f45f8fc8b46471f6759034 Mon Sep 17 00:00:00 2001 From: Timothy Sullivan Date: Wed, 15 Dec 2021 13:18:00 -0700 Subject: [PATCH 1/6] [Reporting] Clarify deprecation changes of the roles settings --- .../plugins/reporting/server/config/index.ts | 26 +++++------- .../server/deprecations/reporting_role.ts | 42 +++++++++++++------ 2 files changed, 39 insertions(+), 29 deletions(-) diff --git a/x-pack/plugins/reporting/server/config/index.ts b/x-pack/plugins/reporting/server/config/index.ts index 963895d1fe583..2d1e40b30935b 100644 --- a/x-pack/plugins/reporting/server/config/index.ts +++ b/x-pack/plugins/reporting/server/config/index.ts @@ -30,38 +30,32 @@ export const config: PluginConfigDescriptor = { configPath: `${fromPath}.roles.enabled`, level: 'warning', title: i18n.translate('xpack.reporting.deprecations.reportingRoles.title', { - defaultMessage: 'Setting "{fromPath}.roles" is deprecated', + defaultMessage: 'The [{fromPath}.roles] setting is deprecated', values: { fromPath }, }), // TODO: once scheduled reports is released, restate this to say that we have no access to scheduled reporting. // https://github.com/elastic/kibana/issues/79905 message: i18n.translate('xpack.reporting.deprecations.reportingRoles.description', { defaultMessage: - `Use Kibana application privileges to grant reporting privileges.` + - ` Using "{fromPath}.roles.allow" to grant reporting privileges` + - ` is deprecated.` + - ` The "{fromPath}.roles.enabled" setting will default to false` + - ` in a future release.`, - values: { fromPath }, + `The default mechanism for Reporting privilege will work differently in future versions,` + + ` which will affect the behavior of this cluster. Set [xpack.reporting.roles.enabled] to` + + ` [false] to adopt the future behavior before upgrading.`, }), correctiveActions: { manualSteps: [ i18n.translate('xpack.reporting.deprecations.reportingRoles.manualStepOne', { - defaultMessage: `Set "xpack.reporting.roles.enabled" to "false" in kibana.yml.`, - }), - i18n.translate('xpack.reporting.deprecations.reportingRoles.manualStepOnePartOne', { - defaultMessage: `Remove "xpack.reporting.roles.allow" to "false" in kibana.yml, if present.`, + defaultMessage: `Set [xpack.reporting.roles.enabled] to [false] in kibana.yml.`, }), i18n.translate('xpack.reporting.deprecations.reportingRoles.manualStepTwo', { + defaultMessage: `Remove [xpack.reporting.roles.allow] in kibana.yml, if present.`, + }), + i18n.translate('xpack.reporting.deprecations.reportingRoles.manualStepThree', { defaultMessage: `Create one or more roles that grant the Kibana application` + ` privilege for reporting from **Management > Security > Roles**.`, }), - i18n.translate('xpack.reporting.deprecations.reportingRoles.manualStepThree', { - defaultMessage: - `Grant reporting privileges to users by assigning one of the new roles.` + - ` Users assigned a reporting role specified in "xpack.reporting.roles.allow"` + - ` will no longer have reporting privileges, they must be assigned an application privilege based role.`, + i18n.translate('xpack.reporting.deprecations.reportingRoles.manualStepFour', { + defaultMessage: `Grant reporting privileges to users by assigning one of the new roles.`, }), ], }, diff --git a/x-pack/plugins/reporting/server/deprecations/reporting_role.ts b/x-pack/plugins/reporting/server/deprecations/reporting_role.ts index 355a83c13a37e..180c3afdf9b39 100644 --- a/x-pack/plugins/reporting/server/deprecations/reporting_role.ts +++ b/x-pack/plugins/reporting/server/deprecations/reporting_role.ts @@ -57,32 +57,39 @@ async function getUsersDeprecations( ): Promise { const usingDeprecatedConfig = !reportingCore.getContract().usesUiCapabilities(); const strings = { - title: i18n.translate('xpack.reporting.deprecations.reportingRoleUsersTitle', { + title: i18n.translate('xpack.reporting.deprecations.reportingRoleUsers.title', { defaultMessage: 'The "{reportingUserRoleName}" role is deprecated: check user roles', values: { reportingUserRoleName: REPORTING_USER_ROLE_NAME }, }), - message: i18n.translate('xpack.reporting.deprecations.reportingRoleUsersMessage', { + message: i18n.translate('xpack.reporting.deprecations.reportingRoleUsers.description', { defaultMessage: - 'Existing users have their Reporting privilege granted by a deprecated setting.', + `The default mechanism for Reporting privilege will work differently in future versions, and` + + ` this cluster contains users who have a deprecated role for this privilege.` + + ` Set [xpack.reporting.roles.enabled] to [false] to adopt the future behavior before upgrading.`, }), manualSteps: (usersRoles: string) => [ ...(usingDeprecatedConfig ? [ i18n.translate('xpack.reporting.deprecations.reportingRoleUsers.manualStepOne', { - defaultMessage: 'Set "xpack.reporting.roles.enabled: false" in kibana.yml.', + defaultMessage: 'Set [xpack.reporting.roles.enabled] to [false] in kibana.yml.', }), i18n.translate('xpack.reporting.deprecations.reportingRoleUsers.manualStepTwo', { - defaultMessage: 'Remove "xpack.reporting.roles.allow" in kibana.yml, if present.', + defaultMessage: 'Remove [xpack.reporting.roles.allow] in kibana.yml, if present.', }), ] : []), i18n.translate('xpack.reporting.deprecations.reportingRoleUsers.manualStepThree', { - defaultMessage: 'Create a custom role with Kibana privileges to grant access to Reporting.', + defaultMessage: + `Create one or more roles that grant the Kibana application` + + ` privilege for reporting from **Management > Security > Roles**.`, }), i18n.translate('xpack.reporting.deprecations.reportingRoleUsers.manualStepFour', { + defaultMessage: `Grant reporting privileges to users by assigning one of the new roles.`, + }), + i18n.translate('xpack.reporting.deprecations.reportingRoleUsers.manualStepFive', { defaultMessage: - 'Remove the "reporting_user" role from all users and add the custom role. The affected users are: {usersRoles}.', + 'Remove the "reporting_user" role from all users and add the custom role. The affected users are: [{usersRoles}].', values: { usersRoles }, }), ], @@ -136,18 +143,21 @@ async function getRoleMappingsDeprecations( ): Promise { const usingDeprecatedConfig = !reportingCore.getContract().usesUiCapabilities(); const strings = { - title: i18n.translate('xpack.reporting.deprecations.reportingRoleMappingsTitle', { + title: i18n.translate('xpack.reporting.deprecations.reportingRoleMappings.title', { defaultMessage: 'The "{reportingUserRoleName}" role is deprecated: check role mappings', values: { reportingUserRoleName: REPORTING_USER_ROLE_NAME }, }), - message: i18n.translate('xpack.reporting.deprecations.reportingRoleMappingsMessage', { - defaultMessage: 'Existing roles are mapped to a deprecated role for Reporting privileges', + message: i18n.translate('xpack.reporting.deprecations.reportingRoleMappings.description', { + defaultMessage: + `The default mechanism for Reporting privilege will work differently in future versions, and` + + ` this cluster contains role mappings that are mapped to a deprecated role for this privilege.` + + ` Set [xpack.reporting.roles.enabled] to [false] to adopt the future behavior before upgrading.`, }), manualSteps: (roleMappings: string) => [ ...(usingDeprecatedConfig ? [ i18n.translate('xpack.reporting.deprecations.reportingRoleMappings.manualStepOne', { - defaultMessage: 'Set "xpack.reporting.roles.enabled: false" in kibana.yml.', + defaultMessage: `Set [xpack.reporting.roles.enabled] to [false] in kibana.yml.`, }), i18n.translate('xpack.reporting.deprecations.reportingRoleMappings.manualStepTwo', { defaultMessage: 'Remove "xpack.reporting.roles.allow" in kibana.yml, if present.', @@ -156,11 +166,17 @@ async function getRoleMappingsDeprecations( : []), i18n.translate('xpack.reporting.deprecations.reportingRoleMappings.manualStepThree', { - defaultMessage: 'Create a custom role with Kibana privileges to grant access to Reporting.', + defaultMessage: + `Create one or more roles that grant the Kibana application` + + ` privilege for reporting from **Management > Security > Roles**.`, }), i18n.translate('xpack.reporting.deprecations.reportingRoleMappings.manualStepFour', { + defaultMessage: `Grant reporting privileges to users by assigning one of the new roles.`, + }), + i18n.translate('xpack.reporting.deprecations.reportingRoleMappings.manualStepFive', { defaultMessage: - 'Remove the "reporting_user" role from all role mappings and add the custom role. The affected role mappings are: {roleMappings}.', + 'Remove the "reporting_user" role from all role mappings and add the custom role.' + + ' The affected role mappings are: {roleMappings}.', values: { roleMappings }, }), ], From 25b15aa97ed77cfd3299f3028a6f79e3e5af6d3d Mon Sep 17 00:00:00 2001 From: Timothy Sullivan Date: Wed, 15 Dec 2021 15:19:10 -0700 Subject: [PATCH 2/6] updates per feedback --- .../plugins/reporting/server/config/index.ts | 18 ++++---- .../server/deprecations/reporting_role.ts | 41 ++++++++++--------- 2 files changed, 30 insertions(+), 29 deletions(-) diff --git a/x-pack/plugins/reporting/server/config/index.ts b/x-pack/plugins/reporting/server/config/index.ts index 2d1e40b30935b..59d06716ed233 100644 --- a/x-pack/plugins/reporting/server/config/index.ts +++ b/x-pack/plugins/reporting/server/config/index.ts @@ -30,32 +30,32 @@ export const config: PluginConfigDescriptor = { configPath: `${fromPath}.roles.enabled`, level: 'warning', title: i18n.translate('xpack.reporting.deprecations.reportingRoles.title', { - defaultMessage: 'The [{fromPath}.roles] setting is deprecated', + defaultMessage: `The "{fromPath}.roles" setting is deprecated`, values: { fromPath }, }), // TODO: once scheduled reports is released, restate this to say that we have no access to scheduled reporting. // https://github.com/elastic/kibana/issues/79905 message: i18n.translate('xpack.reporting.deprecations.reportingRoles.description', { defaultMessage: - `The default mechanism for Reporting privilege will work differently in future versions,` + - ` which will affect the behavior of this cluster. Set [xpack.reporting.roles.enabled] to` + - ` [false] to adopt the future behavior before upgrading.`, + `The default mechanism for Reporting privileges will work differently in future versions,` + + ` which will affect the behavior of this cluster. Set "xpack.reporting.roles.enabled" to` + + ` "false" to adopt the future behavior before upgrading.`, }), correctiveActions: { manualSteps: [ i18n.translate('xpack.reporting.deprecations.reportingRoles.manualStepOne', { - defaultMessage: `Set [xpack.reporting.roles.enabled] to [false] in kibana.yml.`, + defaultMessage: `Set "xpack.reporting.roles.enabled" to "false" in kibana.yml.`, }), i18n.translate('xpack.reporting.deprecations.reportingRoles.manualStepTwo', { - defaultMessage: `Remove [xpack.reporting.roles.allow] in kibana.yml, if present.`, + defaultMessage: `Remove "xpack.reporting.roles.allow" in kibana.yml, if present.`, }), i18n.translate('xpack.reporting.deprecations.reportingRoles.manualStepThree', { defaultMessage: - `Create one or more roles that grant the Kibana application` + - ` privilege for reporting from **Management > Security > Roles**.`, + `Go to **Management > Security > Roles** to create one or more roles that grant` + + ` the Kibana application privilege for Reporting.`, }), i18n.translate('xpack.reporting.deprecations.reportingRoles.manualStepFour', { - defaultMessage: `Grant reporting privileges to users by assigning one of the new roles.`, + defaultMessage: `Grant Reporting privileges to users by assigning one of the new roles.`, }), ], }, diff --git a/x-pack/plugins/reporting/server/deprecations/reporting_role.ts b/x-pack/plugins/reporting/server/deprecations/reporting_role.ts index 180c3afdf9b39..9c4251f98b8ed 100644 --- a/x-pack/plugins/reporting/server/deprecations/reporting_role.ts +++ b/x-pack/plugins/reporting/server/deprecations/reporting_role.ts @@ -58,38 +58,39 @@ async function getUsersDeprecations( const usingDeprecatedConfig = !reportingCore.getContract().usesUiCapabilities(); const strings = { title: i18n.translate('xpack.reporting.deprecations.reportingRoleUsers.title', { - defaultMessage: 'The "{reportingUserRoleName}" role is deprecated: check user roles', + defaultMessage: `The "{reportingUserRoleName}" role is deprecated: check user roles`, values: { reportingUserRoleName: REPORTING_USER_ROLE_NAME }, }), message: i18n.translate('xpack.reporting.deprecations.reportingRoleUsers.description', { defaultMessage: `The default mechanism for Reporting privilege will work differently in future versions, and` + - ` this cluster contains users who have a deprecated role for this privilege.` + - ` Set [xpack.reporting.roles.enabled] to [false] to adopt the future behavior before upgrading.`, + ` this cluster has users who have a deprecated role for this privilege.` + + ` Set "xpack.reporting.roles.enabled" to "false" to adopt the future behavior before upgrading.`, }), manualSteps: (usersRoles: string) => [ ...(usingDeprecatedConfig ? [ i18n.translate('xpack.reporting.deprecations.reportingRoleUsers.manualStepOne', { - defaultMessage: 'Set [xpack.reporting.roles.enabled] to [false] in kibana.yml.', + defaultMessage: `Set "xpack.reporting.roles.enabled" to "false" in kibana.yml.`, }), i18n.translate('xpack.reporting.deprecations.reportingRoleUsers.manualStepTwo', { - defaultMessage: 'Remove [xpack.reporting.roles.allow] in kibana.yml, if present.', + defaultMessage: `Remove "xpack.reporting.roles.allow" in kibana.yml, if present.`, }), ] : []), i18n.translate('xpack.reporting.deprecations.reportingRoleUsers.manualStepThree', { defaultMessage: - `Create one or more roles that grant the Kibana application` + - ` privilege for reporting from **Management > Security > Roles**.`, + `Go to **Management > Security > Roles** to create one or more roles that grant` + + ` the Kibana application privilege for Reporting.`, }), i18n.translate('xpack.reporting.deprecations.reportingRoleUsers.manualStepFour', { - defaultMessage: `Grant reporting privileges to users by assigning one of the new roles.`, + defaultMessage: `Grant Reporting privileges to users by assigning one of the new roles.`, }), i18n.translate('xpack.reporting.deprecations.reportingRoleUsers.manualStepFive', { defaultMessage: - 'Remove the "reporting_user" role from all users and add the custom role. The affected users are: [{usersRoles}].', + `Remove the "reporting_user" role from all users and add the custom role.` + + ` The affected users are: {usersRoles}.`, values: { usersRoles }, }), ], @@ -144,39 +145,39 @@ async function getRoleMappingsDeprecations( const usingDeprecatedConfig = !reportingCore.getContract().usesUiCapabilities(); const strings = { title: i18n.translate('xpack.reporting.deprecations.reportingRoleMappings.title', { - defaultMessage: 'The "{reportingUserRoleName}" role is deprecated: check role mappings', + defaultMessage: `The "{reportingUserRoleName}" role is deprecated: check role mappings`, values: { reportingUserRoleName: REPORTING_USER_ROLE_NAME }, }), message: i18n.translate('xpack.reporting.deprecations.reportingRoleMappings.description', { defaultMessage: - `The default mechanism for Reporting privilege will work differently in future versions, and` + - ` this cluster contains role mappings that are mapped to a deprecated role for this privilege.` + - ` Set [xpack.reporting.roles.enabled] to [false] to adopt the future behavior before upgrading.`, + `The default mechanism for Reporting privileges will work differently in future versions, and` + + ` this cluster has role mappings that are mapped to a deprecated role for this privilege.` + + ` Set "xpack.reporting.roles.enabled" to "false" to adopt the future behavior before upgrading.`, }), manualSteps: (roleMappings: string) => [ ...(usingDeprecatedConfig ? [ i18n.translate('xpack.reporting.deprecations.reportingRoleMappings.manualStepOne', { - defaultMessage: `Set [xpack.reporting.roles.enabled] to [false] in kibana.yml.`, + defaultMessage: `Set "xpack.reporting.roles.enabled" to "false" in kibana.yml.`, }), i18n.translate('xpack.reporting.deprecations.reportingRoleMappings.manualStepTwo', { - defaultMessage: 'Remove "xpack.reporting.roles.allow" in kibana.yml, if present.', + defaultMessage: `Remove "xpack.reporting.roles.allow" in kibana.yml, if present.`, }), ] : []), i18n.translate('xpack.reporting.deprecations.reportingRoleMappings.manualStepThree', { defaultMessage: - `Create one or more roles that grant the Kibana application` + - ` privilege for reporting from **Management > Security > Roles**.`, + `Go to **Management > Security > Roles** to create one or more roles that grant` + + ` the Kibana application privilege for Reporting.`, }), i18n.translate('xpack.reporting.deprecations.reportingRoleMappings.manualStepFour', { - defaultMessage: `Grant reporting privileges to users by assigning one of the new roles.`, + defaultMessage: `Grant Reporting privileges to users by assigning one of the new roles.`, }), i18n.translate('xpack.reporting.deprecations.reportingRoleMappings.manualStepFive', { defaultMessage: - 'Remove the "reporting_user" role from all role mappings and add the custom role.' + - ' The affected role mappings are: {roleMappings}.', + `Remove the "reporting_user" role from all role mappings and add the custom role.` + + ` The affected role mappings are: {roleMappings}.`, values: { roleMappings }, }), ], From 294db45ffbd81859aef8bbdacffe6c6907e1c49e Mon Sep 17 00:00:00 2001 From: Timothy Sullivan Date: Wed, 15 Dec 2021 15:34:03 -0700 Subject: [PATCH 3/6] update test snapshots --- .../reporting/server/config/index.test.ts | 2 +- .../__snapshots__/reporting_role.test.ts.snap | 34 +++++++++++-------- 2 files changed, 21 insertions(+), 15 deletions(-) diff --git a/x-pack/plugins/reporting/server/config/index.test.ts b/x-pack/plugins/reporting/server/config/index.test.ts index efaf567d9acfc..7c428a29ca741 100644 --- a/x-pack/plugins/reporting/server/config/index.test.ts +++ b/x-pack/plugins/reporting/server/config/index.test.ts @@ -40,7 +40,7 @@ describe('deprecations', () => { const { messages } = applyReportingDeprecations({ roles: { enabled: true } }); expect(messages).toMatchInlineSnapshot(` Array [ - "Use Kibana application privileges to grant reporting privileges. Using \\"xpack.reporting.roles.allow\\" to grant reporting privileges is deprecated. The \\"xpack.reporting.roles.enabled\\" setting will default to false in a future release.", + "The default mechanism for Reporting privileges will work differently in future versions, which will affect the behavior of this cluster. Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" to adopt the future behavior before upgrading.", ] `); }); diff --git a/x-pack/plugins/reporting/server/deprecations/__snapshots__/reporting_role.test.ts.snap b/x-pack/plugins/reporting/server/deprecations/__snapshots__/reporting_role.test.ts.snap index 00a2a63280c9e..b3f0bd9a40536 100644 --- a/x-pack/plugins/reporting/server/deprecations/__snapshots__/reporting_role.test.ts.snap +++ b/x-pack/plugins/reporting/server/deprecations/__snapshots__/reporting_role.test.ts.snap @@ -5,16 +5,17 @@ Array [ Object { "correctiveActions": Object { "manualSteps": Array [ - "Set \\"xpack.reporting.roles.enabled: false\\" in kibana.yml.", + "Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" in kibana.yml.", "Remove \\"xpack.reporting.roles.allow\\" in kibana.yml, if present.", - "Create a custom role with Kibana privileges to grant access to Reporting.", + "Go to **Management > Security > Roles** to create one or more roles that grant the Kibana application privilege for Reporting.", + "Grant Reporting privileges to users by assigning one of the new roles.", "Remove the \\"reporting_user\\" role from all users and add the custom role. The affected users are: reportron[reporting_user].", ], }, "deprecationType": "feature", "documentationUrl": "https://www.elastic.co/guide/en/kibana/branch/kibana-privileges.html", "level": "warning", - "message": "Existing users have their Reporting privilege granted by a deprecated setting.", + "message": "The default mechanism for Reporting privilege will work differently in future versions, and this cluster has users who have a deprecated role for this privilege. Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" to adopt the future behavior before upgrading.", "title": "The \\"reporting_user\\" role is deprecated: check user roles", }, ] @@ -25,14 +26,15 @@ Array [ Object { "correctiveActions": Object { "manualSteps": Array [ - "Create a custom role with Kibana privileges to grant access to Reporting.", + "Go to **Management > Security > Roles** to create one or more roles that grant the Kibana application privilege for Reporting.", + "Grant Reporting privileges to users by assigning one of the new roles.", "Remove the \\"reporting_user\\" role from all role mappings and add the custom role. The affected role mappings are: dungeon_master[my_test_reporting_user].", ], }, "deprecationType": "feature", "documentationUrl": "https://www.elastic.co/guide/en/kibana/branch/kibana-privileges.html", "level": "warning", - "message": "Existing roles are mapped to a deprecated role for Reporting privileges", + "message": "The default mechanism for Reporting privileges will work differently in future versions, and this cluster has role mappings that are mapped to a deprecated role for this privilege. Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" to adopt the future behavior before upgrading.", "title": "The \\"reporting_user\\" role is deprecated: check role mappings", }, ] @@ -43,14 +45,15 @@ Array [ Object { "correctiveActions": Object { "manualSteps": Array [ - "Create a custom role with Kibana privileges to grant access to Reporting.", + "Go to **Management > Security > Roles** to create one or more roles that grant the Kibana application privilege for Reporting.", + "Grant Reporting privileges to users by assigning one of the new roles.", "Remove the \\"reporting_user\\" role from all role mappings and add the custom role. The affected role mappings are: dungeon_master[reporting_user].", ], }, "deprecationType": "feature", "documentationUrl": "https://www.elastic.co/guide/en/kibana/branch/kibana-privileges.html", "level": "warning", - "message": "Existing roles are mapped to a deprecated role for Reporting privileges", + "message": "The default mechanism for Reporting privileges will work differently in future versions, and this cluster has role mappings that are mapped to a deprecated role for this privilege. Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" to adopt the future behavior before upgrading.", "title": "The \\"reporting_user\\" role is deprecated: check role mappings", }, ] @@ -61,16 +64,17 @@ Array [ Object { "correctiveActions": Object { "manualSteps": Array [ - "Set \\"xpack.reporting.roles.enabled: false\\" in kibana.yml.", + "Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" in kibana.yml.", "Remove \\"xpack.reporting.roles.allow\\" in kibana.yml, if present.", - "Create a custom role with Kibana privileges to grant access to Reporting.", + "Go to **Management > Security > Roles** to create one or more roles that grant the Kibana application privilege for Reporting.", + "Grant Reporting privileges to users by assigning one of the new roles.", "Remove the \\"reporting_user\\" role from all users and add the custom role. The affected users are: reportron[reporting_user].", ], }, "deprecationType": "feature", "documentationUrl": "https://www.elastic.co/guide/en/kibana/branch/kibana-privileges.html", "level": "warning", - "message": "Existing users have their Reporting privilege granted by a deprecated setting.", + "message": "The default mechanism for Reporting privilege will work differently in future versions, and this cluster has users who have a deprecated role for this privilege. Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" to adopt the future behavior before upgrading.", "title": "The \\"reporting_user\\" role is deprecated: check user roles", }, ] @@ -81,14 +85,15 @@ Array [ Object { "correctiveActions": Object { "manualSteps": Array [ - "Create a custom role with Kibana privileges to grant access to Reporting.", + "Go to **Management > Security > Roles** to create one or more roles that grant the Kibana application privilege for Reporting.", + "Grant Reporting privileges to users by assigning one of the new roles.", "Remove the \\"reporting_user\\" role from all users and add the custom role. The affected users are: reportron[my_test_reporting_user].", ], }, "deprecationType": "feature", "documentationUrl": "https://www.elastic.co/guide/en/kibana/branch/kibana-privileges.html", "level": "warning", - "message": "Existing users have their Reporting privilege granted by a deprecated setting.", + "message": "The default mechanism for Reporting privilege will work differently in future versions, and this cluster has users who have a deprecated role for this privilege. Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" to adopt the future behavior before upgrading.", "title": "The \\"reporting_user\\" role is deprecated: check user roles", }, ] @@ -99,14 +104,15 @@ Array [ Object { "correctiveActions": Object { "manualSteps": Array [ - "Create a custom role with Kibana privileges to grant access to Reporting.", + "Go to **Management > Security > Roles** to create one or more roles that grant the Kibana application privilege for Reporting.", + "Grant Reporting privileges to users by assigning one of the new roles.", "Remove the \\"reporting_user\\" role from all users and add the custom role. The affected users are: reportron[reporting_user].", ], }, "deprecationType": "feature", "documentationUrl": "https://www.elastic.co/guide/en/kibana/branch/kibana-privileges.html", "level": "warning", - "message": "Existing users have their Reporting privilege granted by a deprecated setting.", + "message": "The default mechanism for Reporting privilege will work differently in future versions, and this cluster has users who have a deprecated role for this privilege. Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" to adopt the future behavior before upgrading.", "title": "The \\"reporting_user\\" role is deprecated: check user roles", }, ] From eb92a78f321ccc7dceeed9439c6d6534d9c3f9cd Mon Sep 17 00:00:00 2001 From: Timothy Sullivan Date: Wed, 15 Dec 2021 15:48:20 -0700 Subject: [PATCH 4/6] minor fix --- .../__snapshots__/reporting_role.test.ts.snap | 8 ++++---- .../reporting/server/deprecations/reporting_role.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/x-pack/plugins/reporting/server/deprecations/__snapshots__/reporting_role.test.ts.snap b/x-pack/plugins/reporting/server/deprecations/__snapshots__/reporting_role.test.ts.snap index b3f0bd9a40536..fcc05b1e97cc3 100644 --- a/x-pack/plugins/reporting/server/deprecations/__snapshots__/reporting_role.test.ts.snap +++ b/x-pack/plugins/reporting/server/deprecations/__snapshots__/reporting_role.test.ts.snap @@ -15,7 +15,7 @@ Array [ "deprecationType": "feature", "documentationUrl": "https://www.elastic.co/guide/en/kibana/branch/kibana-privileges.html", "level": "warning", - "message": "The default mechanism for Reporting privilege will work differently in future versions, and this cluster has users who have a deprecated role for this privilege. Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" to adopt the future behavior before upgrading.", + "message": "The default mechanism for Reporting privileges will work differently in future versions, and this cluster has users who have a deprecated role for this privilege. Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" to adopt the future behavior before upgrading.", "title": "The \\"reporting_user\\" role is deprecated: check user roles", }, ] @@ -74,7 +74,7 @@ Array [ "deprecationType": "feature", "documentationUrl": "https://www.elastic.co/guide/en/kibana/branch/kibana-privileges.html", "level": "warning", - "message": "The default mechanism for Reporting privilege will work differently in future versions, and this cluster has users who have a deprecated role for this privilege. Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" to adopt the future behavior before upgrading.", + "message": "The default mechanism for Reporting privileges will work differently in future versions, and this cluster has users who have a deprecated role for this privilege. Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" to adopt the future behavior before upgrading.", "title": "The \\"reporting_user\\" role is deprecated: check user roles", }, ] @@ -93,7 +93,7 @@ Array [ "deprecationType": "feature", "documentationUrl": "https://www.elastic.co/guide/en/kibana/branch/kibana-privileges.html", "level": "warning", - "message": "The default mechanism for Reporting privilege will work differently in future versions, and this cluster has users who have a deprecated role for this privilege. Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" to adopt the future behavior before upgrading.", + "message": "The default mechanism for Reporting privileges will work differently in future versions, and this cluster has users who have a deprecated role for this privilege. Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" to adopt the future behavior before upgrading.", "title": "The \\"reporting_user\\" role is deprecated: check user roles", }, ] @@ -112,7 +112,7 @@ Array [ "deprecationType": "feature", "documentationUrl": "https://www.elastic.co/guide/en/kibana/branch/kibana-privileges.html", "level": "warning", - "message": "The default mechanism for Reporting privilege will work differently in future versions, and this cluster has users who have a deprecated role for this privilege. Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" to adopt the future behavior before upgrading.", + "message": "The default mechanism for Reporting privileges will work differently in future versions, and this cluster has users who have a deprecated role for this privilege. Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" to adopt the future behavior before upgrading.", "title": "The \\"reporting_user\\" role is deprecated: check user roles", }, ] diff --git a/x-pack/plugins/reporting/server/deprecations/reporting_role.ts b/x-pack/plugins/reporting/server/deprecations/reporting_role.ts index 9c4251f98b8ed..c116135897e43 100644 --- a/x-pack/plugins/reporting/server/deprecations/reporting_role.ts +++ b/x-pack/plugins/reporting/server/deprecations/reporting_role.ts @@ -63,7 +63,7 @@ async function getUsersDeprecations( }), message: i18n.translate('xpack.reporting.deprecations.reportingRoleUsers.description', { defaultMessage: - `The default mechanism for Reporting privilege will work differently in future versions, and` + + `The default mechanism for Reporting privileges will work differently in future versions, and` + ` this cluster has users who have a deprecated role for this privilege.` + ` Set "xpack.reporting.roles.enabled" to "false" to adopt the future behavior before upgrading.`, }), From 260b1ee1e9ea3de17178343f670ca2550ed561ad Mon Sep 17 00:00:00 2001 From: Timothy Sullivan Date: Wed, 15 Dec 2021 17:10:42 -0700 Subject: [PATCH 5/6] fix i18n --- x-pack/plugins/translations/translations/ja-JP.json | 8 -------- x-pack/plugins/translations/translations/zh-CN.json | 8 -------- 2 files changed, 16 deletions(-) diff --git a/x-pack/plugins/translations/translations/ja-JP.json b/x-pack/plugins/translations/translations/ja-JP.json index f5262b244266c..5c2f003e4bc27 100644 --- a/x-pack/plugins/translations/translations/ja-JP.json +++ b/x-pack/plugins/translations/translations/ja-JP.json @@ -19949,24 +19949,16 @@ "xpack.reporting.deprecations.reportingRole.forbiddenErrorMessage": "この廃止予定を修正する十分な権限がありません。", "xpack.reporting.deprecations.reportingRole.unknownErrorCorrectiveAction": "詳細については、Kibanaログを確認してください。", "xpack.reporting.deprecations.reportingRole.unknownErrorMessage": "廃止予定チェックを実行できませんでした。詳細については、Kibanaログを確認してください。", - "xpack.reporting.deprecations.reportingRoleMappings.manualStepFour": "すべてのロールマッピングから\"reporting_user\"ロールを削除し、カスタムロールを追加します。影響を受けるロールマッピング:{roleMappings}。", "xpack.reporting.deprecations.reportingRoleMappings.manualStepOne": "kibana.ymlで「xpack.reporting.roles.enabled: false」を設定します。", "xpack.reporting.deprecations.reportingRoleMappings.manualStepThree": "レポートへのアクセス権を付与するには、Kibana権限のあるカスタムロールを作成します。", "xpack.reporting.deprecations.reportingRoleMappings.manualStepTwo": "存在する場合は、kibana.ymlで「xpack.reporting.roles.allow」を削除します。", - "xpack.reporting.deprecations.reportingRoleMappingsMessage": "既存のロールはレポート権限の廃止予定のロールにマッピングされています", - "xpack.reporting.deprecations.reportingRoleMappingsTitle": "\"{reportingUserRoleName}\"ロールは廃止予定です。ロールマッピングを確認してください", - "xpack.reporting.deprecations.reportingRoles.description": "Kibanaアプリケーション権限を使用して、レポート権限を付与します。\"{fromPath}.roles.allow\"を使用したレポート権限の付与は廃止予定です。今後のリリースでは、\"{fromPath}.roles.enabled\"設定のデフォルトはfalseです。", "xpack.reporting.deprecations.reportingRoles.manualStepOne": "kibana.ymlで「xpack.reporting.roles.enabled」をfalseに設定します。", - "xpack.reporting.deprecations.reportingRoles.manualStepOnePartOne": "存在する場合は、kibana.ymlで「xpack.reporting.roles.allow」をfalseに設定します。", "xpack.reporting.deprecations.reportingRoles.manualStepThree": "新しいロールのいずれかを割り当てて、レポート権限をユーザーに付与します。「xpack.reporting.roles.allow」で指定されたレポートロールが割り当てられたユーザーにはレポート権限がなくなります。アプリケーション権限に基づくロールを割り当てる必要があります。", "xpack.reporting.deprecations.reportingRoles.manualStepTwo": "**[管理]>[セキュリティ]>[ロール]**から、レポートのKibanaアプリケーション権限を付与する1つ以上のロールを作成します。", "xpack.reporting.deprecations.reportingRoles.title": "\"{fromPath}.roles\"設定は廃止予定です", - "xpack.reporting.deprecations.reportingRoleUsers.manualStepFour": "すべてのユーザーから「reporting_user」ロールを削除し、カスタムロールを追加します。影響を受けるユーザー:{usersRoles}。", "xpack.reporting.deprecations.reportingRoleUsers.manualStepOne": "kibana.ymlで「xpack.reporting.roles.enabled: false」を設定します。", "xpack.reporting.deprecations.reportingRoleUsers.manualStepThree": "レポートへのアクセス権を付与するには、Kibana権限のあるカスタムロールを作成します。", "xpack.reporting.deprecations.reportingRoleUsers.manualStepTwo": "存在する場合は、kibana.ymlで「xpack.reporting.roles.allow」を削除します。", - "xpack.reporting.deprecations.reportingRoleUsersMessage": "既存のユーザーには廃止予定の設定によって付与されたレポート権限があります。", - "xpack.reporting.deprecations.reportingRoleUsersTitle": "\"{reportingUserRoleName}\"ロールは廃止予定です。ユーザーロールを確認してください", "xpack.reporting.diagnostic.browserMissingDependency": "システム依存関係が不足しているため、ブラウザーを正常に起動できませんでした。{url}を参照してください", "xpack.reporting.diagnostic.browserMissingFonts": "ブラウザーはデフォルトフォントを検索できませんでした。この問題を修正するには、{url}を参照してください。", "xpack.reporting.diagnostic.noUsableSandbox": "Chromiumサンドボックスを使用できません。これは「xpack.reporting.capture.browser.chromium.disableSandbox」で無効にすることができます。この作業はご自身の責任で行ってください。{url}を参照してください", diff --git a/x-pack/plugins/translations/translations/zh-CN.json b/x-pack/plugins/translations/translations/zh-CN.json index 3ade915db4eae..f295149d3d669 100644 --- a/x-pack/plugins/translations/translations/zh-CN.json +++ b/x-pack/plugins/translations/translations/zh-CN.json @@ -20241,24 +20241,16 @@ "xpack.reporting.deprecations.reportingRole.forbiddenErrorMessage": "您没有足够的权限来修复此弃用。", "xpack.reporting.deprecations.reportingRole.unknownErrorCorrectiveAction": "请检查 Kibana 日志了解更多详情。", "xpack.reporting.deprecations.reportingRole.unknownErrorMessage": "无法执行弃用检查。请检查 Kibana 日志了解更多详情。", - "xpack.reporting.deprecations.reportingRoleMappings.manualStepFour": "从所有角色映射中移除“reporting_user”角色,然后添加定制角色。受影响的角色映射为:{roleMappings}。", "xpack.reporting.deprecations.reportingRoleMappings.manualStepOne": "在 kibana.yml 中设置“xpack.reporting.roles.enabled: false”。", "xpack.reporting.deprecations.reportingRoleMappings.manualStepThree": "创建具有 Kibana 权限的定制角色以授予对报告的访问权限。", "xpack.reporting.deprecations.reportingRoleMappings.manualStepTwo": "移除 kibana.yml 中的“xpack.reporting.roles.allow”(如果存在)。", - "xpack.reporting.deprecations.reportingRoleMappingsMessage": "现有角色已映射到用于报告权限的过时角色", - "xpack.reporting.deprecations.reportingRoleMappingsTitle": "“{reportingUserRoleName}”角色已过时:检查角色映射", - "xpack.reporting.deprecations.reportingRoles.description": "使用 Kibana 应用程序权限来授予报告权限。使用“{fromPath}.roles.allow”来授予报告权限已过时。在未来版本中,“{fromPath}.roles.enabled”设置默认为 false。", "xpack.reporting.deprecations.reportingRoles.manualStepOne": "在 kibana.yml 中将“xpack.reporting.roles.enabled”设置为“false”。", - "xpack.reporting.deprecations.reportingRoles.manualStepOnePartOne": "在 kibana.yml 中将“xpack.reporting.roles.allow”移除为“false”(如果存在)。", "xpack.reporting.deprecations.reportingRoles.manualStepThree": "通过分配新角色之一向用户授权报告权限。分配到在“xpack.reporting.roles.allow”中指定的报告角色的用户将不再具有报告权限,必须为他们分配基于应用程序权限的角色。", "xpack.reporting.deprecations.reportingRoles.manualStepTwo": "从**“管理”>“安全性”>“角色”**创建一个或多个针对报告授予 Kibana 应用程序权限的角色。", "xpack.reporting.deprecations.reportingRoles.title": "设置“{fromPath}.roles”已过时", - "xpack.reporting.deprecations.reportingRoleUsers.manualStepFour": "从所有用户中移除“reporting_user”角色,然后添加定制角色。受影响的用户为:{usersRoles}。", "xpack.reporting.deprecations.reportingRoleUsers.manualStepOne": "在 kibana.yml 中设置“xpack.reporting.roles.enabled: false”。", "xpack.reporting.deprecations.reportingRoleUsers.manualStepThree": "创建具有 Kibana 权限的定制角色以授予对 Reporting 的访问权限。", "xpack.reporting.deprecations.reportingRoleUsers.manualStepTwo": "移除 kibana.yml 中的“xpack.reporting.roles.allow”(如果存在)。", - "xpack.reporting.deprecations.reportingRoleUsersMessage": "现有用户具有由过时设置授予的 Reporting 权限。", - "xpack.reporting.deprecations.reportingRoleUsersTitle": "“{reportingUserRoleName}”角色已过时:检查用户角色", "xpack.reporting.diagnostic.browserMissingDependency": "由于缺少系统依赖项,浏览器无法正常启动。请参见 {url}", "xpack.reporting.diagnostic.browserMissingFonts": "浏览器找不到默认字体。请参见 {url} 以解决此问题。", "xpack.reporting.diagnostic.noUsableSandbox": "无法使用 Chromium 沙盒。您自行承担使用“xpack.reporting.capture.browser.chromium.disableSandbox”禁用此项的风险。请参见 {url}", From 7880ec4208f7aa0cfa55ea9e2ea16a6e6c9d4d51 Mon Sep 17 00:00:00 2001 From: Timothy Sullivan Date: Thu, 16 Dec 2021 10:20:10 -0700 Subject: [PATCH 6/6] remove formatting marks --- x-pack/plugins/reporting/server/config/index.ts | 2 +- .../__snapshots__/reporting_role.test.ts.snap | 12 ++++++------ .../reporting/server/deprecations/reporting_role.ts | 4 ++-- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/x-pack/plugins/reporting/server/config/index.ts b/x-pack/plugins/reporting/server/config/index.ts index 59d06716ed233..534b51f9a0f7f 100644 --- a/x-pack/plugins/reporting/server/config/index.ts +++ b/x-pack/plugins/reporting/server/config/index.ts @@ -51,7 +51,7 @@ export const config: PluginConfigDescriptor = { }), i18n.translate('xpack.reporting.deprecations.reportingRoles.manualStepThree', { defaultMessage: - `Go to **Management > Security > Roles** to create one or more roles that grant` + + `Go to Management > Security > Roles to create one or more roles that grant` + ` the Kibana application privilege for Reporting.`, }), i18n.translate('xpack.reporting.deprecations.reportingRoles.manualStepFour', { diff --git a/x-pack/plugins/reporting/server/deprecations/__snapshots__/reporting_role.test.ts.snap b/x-pack/plugins/reporting/server/deprecations/__snapshots__/reporting_role.test.ts.snap index fcc05b1e97cc3..92456f9eec706 100644 --- a/x-pack/plugins/reporting/server/deprecations/__snapshots__/reporting_role.test.ts.snap +++ b/x-pack/plugins/reporting/server/deprecations/__snapshots__/reporting_role.test.ts.snap @@ -7,7 +7,7 @@ Array [ "manualSteps": Array [ "Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" in kibana.yml.", "Remove \\"xpack.reporting.roles.allow\\" in kibana.yml, if present.", - "Go to **Management > Security > Roles** to create one or more roles that grant the Kibana application privilege for Reporting.", + "Go to Management > Security > Roles to create one or more roles that grant the Kibana application privilege for Reporting.", "Grant Reporting privileges to users by assigning one of the new roles.", "Remove the \\"reporting_user\\" role from all users and add the custom role. The affected users are: reportron[reporting_user].", ], @@ -26,7 +26,7 @@ Array [ Object { "correctiveActions": Object { "manualSteps": Array [ - "Go to **Management > Security > Roles** to create one or more roles that grant the Kibana application privilege for Reporting.", + "Go to Management > Security > Roles to create one or more roles that grant the Kibana application privilege for Reporting.", "Grant Reporting privileges to users by assigning one of the new roles.", "Remove the \\"reporting_user\\" role from all role mappings and add the custom role. The affected role mappings are: dungeon_master[my_test_reporting_user].", ], @@ -45,7 +45,7 @@ Array [ Object { "correctiveActions": Object { "manualSteps": Array [ - "Go to **Management > Security > Roles** to create one or more roles that grant the Kibana application privilege for Reporting.", + "Go to Management > Security > Roles to create one or more roles that grant the Kibana application privilege for Reporting.", "Grant Reporting privileges to users by assigning one of the new roles.", "Remove the \\"reporting_user\\" role from all role mappings and add the custom role. The affected role mappings are: dungeon_master[reporting_user].", ], @@ -66,7 +66,7 @@ Array [ "manualSteps": Array [ "Set \\"xpack.reporting.roles.enabled\\" to \\"false\\" in kibana.yml.", "Remove \\"xpack.reporting.roles.allow\\" in kibana.yml, if present.", - "Go to **Management > Security > Roles** to create one or more roles that grant the Kibana application privilege for Reporting.", + "Go to Management > Security > Roles to create one or more roles that grant the Kibana application privilege for Reporting.", "Grant Reporting privileges to users by assigning one of the new roles.", "Remove the \\"reporting_user\\" role from all users and add the custom role. The affected users are: reportron[reporting_user].", ], @@ -85,7 +85,7 @@ Array [ Object { "correctiveActions": Object { "manualSteps": Array [ - "Go to **Management > Security > Roles** to create one or more roles that grant the Kibana application privilege for Reporting.", + "Go to Management > Security > Roles to create one or more roles that grant the Kibana application privilege for Reporting.", "Grant Reporting privileges to users by assigning one of the new roles.", "Remove the \\"reporting_user\\" role from all users and add the custom role. The affected users are: reportron[my_test_reporting_user].", ], @@ -104,7 +104,7 @@ Array [ Object { "correctiveActions": Object { "manualSteps": Array [ - "Go to **Management > Security > Roles** to create one or more roles that grant the Kibana application privilege for Reporting.", + "Go to Management > Security > Roles to create one or more roles that grant the Kibana application privilege for Reporting.", "Grant Reporting privileges to users by assigning one of the new roles.", "Remove the \\"reporting_user\\" role from all users and add the custom role. The affected users are: reportron[reporting_user].", ], diff --git a/x-pack/plugins/reporting/server/deprecations/reporting_role.ts b/x-pack/plugins/reporting/server/deprecations/reporting_role.ts index c116135897e43..6fe40ceb38815 100644 --- a/x-pack/plugins/reporting/server/deprecations/reporting_role.ts +++ b/x-pack/plugins/reporting/server/deprecations/reporting_role.ts @@ -81,7 +81,7 @@ async function getUsersDeprecations( i18n.translate('xpack.reporting.deprecations.reportingRoleUsers.manualStepThree', { defaultMessage: - `Go to **Management > Security > Roles** to create one or more roles that grant` + + `Go to Management > Security > Roles to create one or more roles that grant` + ` the Kibana application privilege for Reporting.`, }), i18n.translate('xpack.reporting.deprecations.reportingRoleUsers.manualStepFour', { @@ -168,7 +168,7 @@ async function getRoleMappingsDeprecations( i18n.translate('xpack.reporting.deprecations.reportingRoleMappings.manualStepThree', { defaultMessage: - `Go to **Management > Security > Roles** to create one or more roles that grant` + + `Go to Management > Security > Roles to create one or more roles that grant` + ` the Kibana application privilege for Reporting.`, }), i18n.translate('xpack.reporting.deprecations.reportingRoleMappings.manualStepFour', {