Skip to content

fix(api): /_xpack reports real auth state instead of hardcoded true - #9

Merged
xerj-team merged 1 commit into
xerj-org:mainfrom
Vinz2168:fix/xpack-security-enabled-reflects-insecure
Jul 24, 2026
Merged

fix(api): /_xpack reports real auth state instead of hardcoded true#9
xerj-team merged 1 commit into
xerj-org:mainfrom
Vinz2168:fix/xpack-security-enabled-reflects-insecure

Conversation

@Vinz2168

Copy link
Copy Markdown
Collaborator

GET /_xpack and GET /_xpack/usage hardcode features.security.enabled = true, regardless of how the server was actually started — including under --insecure.

Why this matters: Kibana decides whether to show its login screen based on this flag, not on _security/_authenticate. So with --insecure (auth genuinely disabled), Kibana still always renders the login form — and worse, login itself then fails with a 500 on user-profile activation, since XERJ is telling Kibana security is on while behaving as if it's off.

Fix: both endpoints now read state.config.auth.enabled instead of a hardcoded true.

Verified: with this change and --insecure, Kibana 8.13 skips the login screen entirely and lands directly on the app — confirmed against a local Kibana instance.

… hardcoded true

Both xpack_info (GET /_xpack) and its usage endpoint hardcoded
features.security.enabled = true regardless of how the server was
actually started, including under --insecure.

Kibana decides whether to show its login screen based on this flag,
not on _security/_authenticate — so with --insecure (auth genuinely
disabled) Kibana still always renders the login form, and the actual
auth state and the state XERJ reports diverge.

Fix: read state.config.auth.enabled instead, so the reported value
matches reality. Verified: Kibana 8.13 skips the login screen entirely
once this reflects false under --insecure.
@xerj-team
xerj-team merged commit e7e25a8 into xerj-org:main Jul 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants