-
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
[SLOs] remove manage_transform and manage_ingest_pipeline privilege requirements #190572
[SLOs] remove manage_transform and manage_ingest_pipeline privilege requirements #190572
Conversation
…quirement by using secondary auth
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
Note: I have not implemented the SLO health API yet. That will need to be done before this is merged. |
/ci |
/ci |
c4f7651
to
501b9ba
Compare
/ci |
…ion result when HTTP authentication is used
/ci |
/ci |
Pinging @elastic/obs-ux-management-team (Team:obs-ux-management) |
…est-pipeline-privilege-requirements
const repository = new KibanaSavedObjectsSLORepository(soClient, logger); | ||
|
||
const getSLOHealth = new GetSLOHealth(esClient, repository); | ||
const getSLOHealth = new GetSLOHealth(esClient, scopedClusterClient, repository); |
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.
@dominiqueclarke I was checking all the routes in this file and I was wondering if we need to pass the scopedClusterClient
to the getSloBurnRates
route as well. I noticed that you didn't change the GET requests, but getSloBurnRates is POST
request, so I thought we might need to pass the scopedClusterClient there as well. What do you think?
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.
There aren't any transform or ingest pipeline actions in that code path.
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 Kibana Security is only tagged for a review here because the changes from #190998 are not merged to this PR yet. If that is untrue please let me know.
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 finished with manual testing and everything works well!
@dominiqueclarke This screenshot is not directly related to your PR, it is related to something similar I was working on regarding SLO permissions through SLO integrations. So below screenshot is from another PR I'm playing around with user roles in your PR and trying to reproduce this Transform error message. Do you know what role and privileges I need to use to be able to get this Transform error message? The reason I am asking is because I am thinking we could display a |
…e-privilege-requirements' of github.com:dominiqueclarke/kibana into feat/slo-transforms-remove-transform-and-ingest-pipeline-privilege-requirements
I am reading through the SLO permissions email thread and I found this linked issue. Do I understand correctly that we want to move away from explicit opt-ins and make it more back-box to the user? If that's the case, what I suggest above regarding a reauthorization flow is not the right way. |
…est-pipeline-privilege-requirements
@@ -33,14 +37,18 @@ export function TransformSecurityCommonProvider({ getService }: FtrProviderConte | |||
{ | |||
name: 'transform_dest', | |||
elasticsearch: { | |||
indices: [{ names: ['.slo-*'], privileges: ['read', 'index', 'manage', 'delete'] }], | |||
indices: [ | |||
{ names: ['.slo-observability.*'], privileges: TOTAL_INDEX_PRIVILEGE_SET_EDITOR }, |
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 wanted to align this with the actual index pattern and privileges we specify for the SLO product, but I'm not sure if that's even the purpose of this test/service because it seems like it's intended to just test transforms and doesn't actually really relate to SLOs at all?
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 believe best person to answer is @mgiota , she added the service
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.
@mgiota If this is SLO related then I think this change is fine. The tests are indeed passing.
…est-pipeline-privilege-requirements
|
|
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.
x-pack/test_serverless/api_integration/services/transform/security_common.ts
changes LGTM
…est-pipeline-privilege-requirements
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.
…e-privilege-requirements' of github.com:dominiqueclarke/kibana into feat/slo-transforms-remove-transform-and-ingest-pipeline-privilege-requirements
…est-pipeline-privilege-requirements
…e-privilege-requirements' of github.com:dominiqueclarke/kibana into feat/slo-transforms-remove-transform-and-ingest-pipeline-privilege-requirements
…est-pipeline-privilege-requirements
…e-privilege-requirements' of github.com:dominiqueclarke/kibana into feat/slo-transforms-remove-transform-and-ingest-pipeline-privilege-requirements
💛 Build succeeded, but was flaky
Failed CI StepsTest Failures
Metrics [docs]Async chunks
History
To update your PR or re-run it, just comment with: |
Summary
Resolves https://github.com/elastic/observability-dev/issues/3845
Removes the
manage_transform
andmanage_ingest_pipeline
privilege requirements from the SLO app.This accomplished by replacing the existing ES client with
asSecondaryAuthUser
client.The
asSecondaryAuthUser
client passeses-secondary-authorization
headers to the related APIs. When supported, the API will use the primary auth (the kibana system user) to handle primary actions such as creating the transforms and ingest pipelines, while using secondary auth to check against index privileges. The result is the ability to for Kibana to create transforms and pipelines on behalf of the user, while respecting the users index privileges.Testing
To test, be sure to use a less privileged user without
manage_transform
ormanage_pipeline
privileges. Begin by creating two new roles,slo_editor
andslo_viewer
Index privileges for
slo_editor
userIndex privileges for
slo_viewer
userThen create two new users,
slo_editor
andslo_viewer
and give them the following roles:An overall regression testing of the SLO app is desired, including:
Editor user
Viewer user