-
Notifications
You must be signed in to change notification settings - Fork 24.9k
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
Add read permissions for apm_user
role to APM fleet indices
#68749
Conversation
Pinging @elastic/es-security (Team:Security) |
...core/src/main/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStore.java
Outdated
Show resolved
Hide resolved
jenkins test this please |
...core/src/main/java/org/elasticsearch/xpack/core/security/authz/store/ReservedRolesStore.java
Outdated
Show resolved
Hide resolved
a45309d
to
c94086d
Compare
c94086d
to
aac7957
Compare
There are some risks to this PR, even though it only changes the end-user's Do we need this change to go into 7.12? Is it possible to delay it until 8.0? |
Unfortunately, APM Server will be released under Fleet as experimental in 7.12 and GA (ish) in 7.13. So waiting until 8.0 is not possible afaict. |
@kobelb Discussing this with people on the fleet side I was made aware that the indices I added (logs-apm*, metrics-apm*, traces-apm*) are already "reserved" to elastic data streams, and using them for other purposes is recommended against. There's obviously still a risk that users might be using those but I think it's less likely. |
I understand @kobelb concerns about security implications for this change, but on the other side the user experience would be very impacted if they will move to the new approach and a user with a role called This is probably a problem we have to face in the near future when we'll introduce predefined roles and Solutions may need to modify their index permissions in a minor, for example because of a new feature. I'm wondering if we can mitigate the security risk, for example using Another option could be to send warnings (or even prevent upgrades) if you have indices that match the pattern and are not "because of APM". Not sure how we can make them visible enough, but it could be a compromise. If you already have the conflict with existing indices, I suppose it would be a wider problem as Fleet installs templates and will start ingesting data to those indices regardless of the permissions of What do you think? |
Can you or the fleet people elaborate on this? The only official documentation that I've found about the Additionally, the creation of these index-templates has caused issues for customers and they can currently be disabled. This confirms my suspicion that actual users are using these indices for purposes other than how we anticipated. Even if the user has turned off the stack installed index templates, we're still going to be changing the definition of the
Agreed. That's why I was originally asking the reasoning for making this change in 7.x and whether we could wait until 8.0. Otherwise, I think we need to be honest with ourselves and our users and document this as a new breaking change that has security implications. |
This is my understanding but I will track this down.
Agree that this change should be communicated clearly. |
@kobelb The datastreams are mentioned here: https://www.elastic.co/guide/en/elasticsearch/reference/7.11/set-up-a-data-stream.html#create-a-data-stream-template I don't know if that's enough. We don't clearly state that they are reserved and should not be used for custom purposes. |
@sqren and I had a quick synchronous chat about this, please keep me honest on the following. Given the fact that the APM team planned to deprecate the
Long-term, we should figure out what changes are necessary to allow people to more easily only grant users to access to APM. This required further thought about how it'd work with the new indexing strategy. |
jenkins test this please |
498e26a
to
6bc0696
Compare
jenkins test this please |
./gradlew :x-pack:plugin:core:checkstyleMain
ffc8ea1
to
f83be80
Compare
…#200163) Related to: elastic/elasticsearch#116712 Meta issue: #116760 The apm_user role was elastic/elasticsearch#68749 in 7.13 and was supposed to be removed in 8.0. All mentions of apm_user role were finally removed in #132790. This PR adds some deprecation steps for users are using the `apm_user`. <img width="494" alt="Screenshot 2024-11-18 at 14 10 08" src="https://github.com/user-attachments/assets/e04fff63-b56e-4a74-93ad-a87884f9a8a6"> <img width="1128" alt="Screenshot 2024-11-18 at 14 10 18" src="https://github.com/user-attachments/assets/de67afcf-8bd5-4896-815a-4e1adc730681"> <img width="1241" alt="Screenshot 2024-11-14 at 13 12 01" src="https://github.com/user-attachments/assets/e94b0367-b459-45b4-923e-1de7a095b6b8">
…elastic#200163) Related to: elastic/elasticsearch#116712 Meta issue: elastic#116760 The apm_user role was elastic/elasticsearch#68749 in 7.13 and was supposed to be removed in 8.0. All mentions of apm_user role were finally removed in elastic#132790. This PR adds some deprecation steps for users are using the `apm_user`. <img width="494" alt="Screenshot 2024-11-18 at 14 10 08" src="https://github.com/user-attachments/assets/e04fff63-b56e-4a74-93ad-a87884f9a8a6"> <img width="1128" alt="Screenshot 2024-11-18 at 14 10 18" src="https://github.com/user-attachments/assets/de67afcf-8bd5-4896-815a-4e1adc730681"> <img width="1241" alt="Screenshot 2024-11-14 at 13 12 01" src="https://github.com/user-attachments/assets/e94b0367-b459-45b4-923e-1de7a095b6b8">
…elastic#200163) Related to: elastic/elasticsearch#116712 Meta issue: elastic#116760 The apm_user role was elastic/elasticsearch#68749 in 7.13 and was supposed to be removed in 8.0. All mentions of apm_user role were finally removed in elastic#132790. This PR adds some deprecation steps for users are using the `apm_user`. <img width="494" alt="Screenshot 2024-11-18 at 14 10 08" src="https://github.com/user-attachments/assets/e04fff63-b56e-4a74-93ad-a87884f9a8a6"> <img width="1128" alt="Screenshot 2024-11-18 at 14 10 18" src="https://github.com/user-attachments/assets/de67afcf-8bd5-4896-815a-4e1adc730681"> <img width="1241" alt="Screenshot 2024-11-14 at 13 12 01" src="https://github.com/user-attachments/assets/e94b0367-b459-45b4-923e-1de7a095b6b8">
Related: elastic/kibana#87501
Permissions to
apm_user
Starting in 7.12 APM Server will be available under fleet. In this mode data will no longer be ingested to
apm-*
indices but tologs-apm*, metrics-apm*, traces-apm*
.This PR ensures that users upgrading to APM Server under fleet can still access APM data.
Permissions tokibana_user
In Kibana there is a background task that collects telemetry. We want ensure that this background task can access APM indices and upload telemetry based on this.
Note to self:
cc @elastic/apm-ui