-
Notifications
You must be signed in to change notification settings - Fork 8.2k
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] Use the deprecations service to advise reporting_user
config changes
#100427
[Reporting] Use the deprecations service to advise reporting_user
config changes
#100427
Conversation
`starting in 8.0. Please set 'xpack.reporting.roles.enabled' to 'false' and grant reporting privilege to users ` + | ||
`through feature controls in Management > Security > Roles`, | ||
`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**.`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated this text to match the new text, which felt more refined.
226ae02
to
b0c2504
Compare
@@ -69,19 +69,17 @@ export class ReportingCore { | |||
private config?: ReportingConfig; // final config, includes dynamic values based on OS type | |||
private executing: Set<string>; | |||
|
|||
public getStartContract: () => ReportingStart; | |||
public getContract: () => ReportingSetup; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Renamed because we can call this from setup as well - ReportingStart and ReportingSetup are the same interface.
@@ -65,6 +64,8 @@ export class ReportingPlugin | |||
logger: this.logger, | |||
}); | |||
|
|||
registerUiSettings(core); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
put all the register*
together for cosmetic purposes
c76d3dd
to
deac77e
Compare
Pinging @elastic/kibana-app-services (Team:AppServices) |
Pinging @elastic/kibana-reporting-services (Team:Reporting Services) |
deac77e
to
d31e5f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code changes LGTM also tested this locally, great job @tsullivan 🍻
@@ -0,0 +1,52 @@ | |||
/* |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
FWIW I am going to be adding a deprecation action soon for migrating existing reporting indices to the new ILM policy - as part of that I'll probably create a depreactions
folder and place this inside a file like reporting_user_role.ts
. Nothing to action now, we can take the discussion further on that PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good to me, as long as we have correct spelling for deprecations
🙂
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indeed 😄
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code LGTM. Did not test locally.
Great to see a team start to use the deprecations service 🎉 . Feel free to let me or the core team know if you have any feedback on it!
correctiveActions: { | ||
manualSteps: [ | ||
...(usingDeprecatedConfig ? [`Set "${upgradableConfig}" in kibana.yml`] : []), | ||
`Create one or more custom roles that provide Kibana application privileges to reporting features in **Management > Security > Roles**.`, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the current position on translations in deprecation manual steps or was the accidentally left out?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While working on this, I referenced this Draft PR to add an FAQ: https://github.com/elastic/kibana/pull/99043/files#r636460961
I asked a similar question, and found that it's currently not recommended to use i18n for deprecations: #99072
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Great job 👍
@elasticmachine merge upstream |
💚 Build SucceededMetrics [docs]Unknown metric groupsReferences to deprecated APIs
History
To update your PR or re-run it, just comment with: |
…anges (elastic#100427) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # x-pack/plugins/reporting/server/core.ts # x-pack/plugins/reporting/server/plugin.ts
@@ -45,7 +45,7 @@ describe('deprecations', () => { | |||
const { messages } = applyReportingDeprecations({ roles: { enabled: true } }); | |||
expect(messages).toMatchInlineSnapshot(` | |||
Array [ | |||
"\\"xpack.reporting.roles\\" is deprecated. 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 privilege to users through feature controls in Management > Security > Roles", | |||
"\\"xpack.reporting.roles\\" is deprecated. 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**.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we don't have the authority to remove support for the reporting_user
role in 8.0. The ability to switch off the support is still very new in Kibana and we've seen plenty of cases where configuring things properly stumps users. This text should be changed to say that the support will be removed "in a future version"
Edit: filed #113014
reporting_user
config changes
Resolves #92485
Follows: #94966
Summary
The reporting_user role is a legacy solution for granting Reporting feature privilege. In 8.0, the role should no longer be automatically created, and users who have that role should not automatically be granted privilege to generate reports in Kibana. Applications will instead use sub-feature control checks to enable Reporting for privileged users.
This PR uses the deprecations service (#94845) provided by core to register this deprecation. All registered deprecations will be displayed in the Upgrade Assistant (to be implemented via #97159).
Screenshots
Call the API with default (deprecated) config and a
reporting_user
enabled user:Call the API with the recommended config change but still with a
reporting_user
enabled user:Calling the API with the recommended config change and no
reporting_user
enabled users will not return any deprecations.Checklist
Delete any items that are not applicable to this PR.
For maintainers