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

[Reporting] lower roles.enabled deprecation to warning-level #114204

Merged
Merged
Show file tree
Hide file tree
Changes from 9 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion x-pack/plugins/reporting/server/config/index.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ describe('deprecations', () => {
const { messages } = applyReportingDeprecations({ roles: { enabled: true } });
expect(messages).toMatchInlineSnapshot(`
Array [
"Granting reporting privilege through a \\"reporting_user\\" role will not be supported starting in 8.0. Please set \\"xpack.reporting.roles.enabled\\" to \\"false\\" and grant reporting privileges to users using Kibana application privileges **Management > Security > Roles**.",
"Using roles defined by \\"xpack.reporting.roles.allow\\" to grant reporting privileges prevents users from using API Keys to create reports, and prevents admins from using Kibana application privileges to grant reporting privileges.",
]
`);
});
Expand Down
24 changes: 17 additions & 7 deletions x-pack/plugins/reporting/server/config/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,25 +50,35 @@ export const config: PluginConfigDescriptor<ReportingConfigType> = {

if (reporting?.roles?.enabled !== false) {
addDeprecation({
level: 'warning',
title: i18n.translate('xpack.reporting.deprecations.reportingRoles.title', {
defaultMessage: 'Setting "{fromPath}.roles" 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:
`Granting reporting privilege through a "reporting_user" role will not be supported` +
` starting in 8.0. Please set "xpack.reporting.roles.enabled" to "false" and grant reporting privileges to users` +
` using Kibana application privileges **Management > Security > Roles**.`,
`Using roles defined by "{fromPath}.roles.allow" to grant reporting ` +
`privileges prevents users from using API Keys to create reports, and ` +
`prevents admins from using Kibana application privileges to grant reporting privileges.`,
values: { fromPath },
}),
correctiveActions: {
manualSteps: [
i18n.translate('xpack.reporting.deprecations.reportingRoles.manualStepOne', {
defaultMessage: `Set 'xpack.reporting.roles.enabled' to 'false' in your kibana configs.`,
i18n.translate('xpack.reporting.deprecations.reportingRoles.manuakklStepOne', {
defaultMessage: `Set "xpack.reporting.roles.enabled" to "false" in kibana.yml.`,
}),
i18n.translate('xpack.reporting.deprecations.reportingRoles.manualStepTwo', {
defaultMessage:
`Grant reporting privileges to users using Kibana application privileges` +
` under **Management > Security > Roles**.`,
`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.`,
}),
],
},
Expand Down