Skip to content

[FSH] Removed kibana user from root group#244798

Merged
elena-shostak merged 16 commits intoelastic:mainfrom
elena-shostak:2333-kibana-route-group
Dec 22, 2025
Merged

[FSH] Removed kibana user from root group#244798
elena-shostak merged 16 commits intoelastic:mainfrom
elena-shostak:2333-kibana-route-group

Conversation

@elena-shostak
Copy link
Contributor

@elena-shostak elena-shostak commented Dec 1, 2025

Summary

We initially added Kibana to the root group as part of this issue https://discuss.elastic.co/t/group-permission-inconsistency-between-kibana-and-elasticsearch-docker-images/261051

I seems to be excessive to add kibana to the group for this specific self-hosted case (if even relevant anymore). User is also added to the group with GID 1000 and you can use GID 1000 for bind-mounted directories.

If there is anything I'm missing, please let me know.

Release Note

Kibana user is removed from the root group (GID 0) on serverless. The Kibana user (UID 1000) remains in the primary group (GID 1000), which can be used for bind-mounted directories. OpenShift deployments will continue to work correctly, docker image sets up files and directories with GID 0 ownership and group write permissions, which allows containers to function properly regardless of the Kibana user's group membership.

@elena-shostak elena-shostak added Feature:Hardening Harding of Kibana from a security perspective ci:build-all-platforms ci:build-serverless-image Team:Security Platform Security: Auth, Users, Roles, Spaces, Audit Logging, etc t// release_note:skip Skip the PR/issue when compiling release notes backport:skip This PR does not require backporting ci:build-os-packages and removed ci:build-all-platforms labels Dec 1, 2025
@elena-shostak elena-shostak added ci:cloud-deploy Create or update a Cloud deployment and removed ci:build-os-packages labels Dec 2, 2025
@elena-shostak
Copy link
Contributor Author

/ci

@kibanamachine
Copy link
Contributor

@elena-shostak elena-shostak marked this pull request as ready for review December 4, 2025 13:35
@elena-shostak elena-shostak requested a review from a team as a code owner December 4, 2025 13:35
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-security (Team:Security)

@jbudz
Copy link
Contributor

jbudz commented Dec 4, 2025

A few considerations for self managed Kibana:

  1. We'll be less consistent with Elasticsearch
  2. We'll be be less consistent with OpenShift, which runs as a random UID with group 0.
    https://docs.redhat.com/en/documentation/openshift_container_platform/4.20/html/images/creating-images#use-uid_create-images. It won't break anything, folder permissions are still setup to support this.
  3. We may break some users relying on this

If we're okay with these tradeoffs I think it would good to make sure there's a release note on the change and what to do if effected.

@elena-shostak elena-shostak added release_note:deprecation and removed release_note:skip Skip the PR/issue when compiling release notes labels Dec 8, 2025
@elena-shostak
Copy link
Contributor Author

cc @legrego / @azasypkin to confirm on release note and consistency adjustment (I've put release note as deprecation)

@elena-shostak
Copy link
Contributor Author

@jbudz what is the best way to roll it out for us first?

@jbudz
Copy link
Contributor

jbudz commented Dec 9, 2025

@jbudz what is the best way to roll it out for us first?

The Dockerfile is templated using handlebars, there's a few variables available: cloud, fips, serverless, depending on how we want to define it. In the context of us, are you thinking everything except self managed artifacts?

@elena-shostak
Copy link
Contributor Author

In the context of us, are you thinking everything except self managed artifacts?

yep

@elena-shostak elena-shostak requested a review from jbudz December 18, 2025 10:14
@jbudz
Copy link
Contributor

jbudz commented Dec 18, 2025

Small note on the cloud variable because it's confusing: cloud is true when we make the kibana-cloud image for ECH, but not true for the kibana-serverless image. So if we want to cover everything Elastic hosted we'll need to run the conditional for cloud or serverless. It's due for a refactor probably.

@elasticmachine
Copy link
Contributor

elasticmachine commented Dec 22, 2025

💚 Build Succeeded

Metrics [docs]

✅ unchanged

History

@elena-shostak elena-shostak merged commit 0ed56bd into elastic:main Dec 22, 2025
13 checks passed
CAWilson94 pushed a commit to CAWilson94/kibana that referenced this pull request Jan 6, 2026
## Summary

We initially added Kibana to the root group as part of this issue
https://discuss.elastic.co/t/group-permission-inconsistency-between-kibana-and-elasticsearch-docker-images/261051

I seems to be excessive to add kibana to the group for this specific
self-hosted case (if even relevant anymore). User is also added to the
group with GID 1000 and you can use GID 1000 for bind-mounted
directories.

If there is anything I'm missing, please let me know.

## Release Note
Kibana user is removed from the root group (GID 0) on cloud. The Kibana
user (UID 1000) remains in the primary group (GID 1000), which can be
used for bind-mounted directories. OpenShift deployments will continue
to work correctly, docker image sets up files and directories with GID 0
ownership and group write permissions, which allows containers to
function properly regardless of the Kibana user's group membership.
dej611 pushed a commit to dej611/kibana that referenced this pull request Jan 8, 2026
## Summary

We initially added Kibana to the root group as part of this issue
https://discuss.elastic.co/t/group-permission-inconsistency-between-kibana-and-elasticsearch-docker-images/261051

I seems to be excessive to add kibana to the group for this specific
self-hosted case (if even relevant anymore). User is also added to the
group with GID 1000 and you can use GID 1000 for bind-mounted
directories.

If there is anything I'm missing, please let me know.

## Release Note
Kibana user is removed from the root group (GID 0) on cloud. The Kibana
user (UID 1000) remains in the primary group (GID 1000), which can be
used for bind-mounted directories. OpenShift deployments will continue
to work correctly, docker image sets up files and directories with GID 0
ownership and group write permissions, which allows containers to
function properly regardless of the Kibana user's group membership.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting ci:build-serverless-image ci:project-deploy-security Create a Security Serverless Project Feature:Hardening Harding of Kibana from a security perspective release_note:deprecation Team:Security Platform Security: Auth, Users, Roles, Spaces, Audit Logging, etc t// v9.4.0

4 participants