Skip to content

Fix jboss-cli local authentication for OpenShift arbitrary UIDs - #304

Merged
jmesnil merged 1 commit into
wildfly:mainfrom
Pranaysaha2:fix-openshift-cli-authentication
Nov 12, 2026
Merged

jmesnil merged 1 commit into
wildfly:mainfrom
Pranaysaha2:fix-openshift-cli-authentication

Conversation

@Pranaysaha2

@Pranaysaha2 Pranaysaha2 commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Fixes jboss-cli local authentication failures on OpenShift when containers run with arbitrary UIDs
  • Adds group ownership and permissions for /opt/jboss directory to support OpenShift's root group (GID 0)
  • Allows CLI authentication tokens and configuration files to be written by arbitrary UID users in group 0

Problem

OpenShift runs containers with arbitrary numeric UIDs (e.g., 1006870000) instead of the "jboss" username, but always in the root group (GID 0). The jboss-cli local authentication mechanism requires write access to /opt/jboss for authentication tokens, which was failing.

Solution

Set group ownership of /opt/jboss to group 0 and add group read/write permissions, enabling jboss-cli to work correctly with OpenShift's arbitrary UID assignments.

Test plan

  • Build the Docker image
  • Deploy to OpenShift cluster
  • Verify jboss-cli can connect locally without authentication errors
  • Confirm behavior remains unchanged in Docker and Kubernetes environments

Fixes #210

OpenShift runs containers with arbitrary numeric UIDs (e.g., 1006870000)
but always in the root group (GID 0). The jboss-cli local authentication
mechanism requires write access to the user's home directory (/opt/jboss)
for storing authentication tokens and CLI configuration.

This change ensures /opt/jboss is owned by group 0 and has group read/write
permissions, allowing the jboss-cli to work correctly when the container
runs with OpenShift's arbitrary UID assignments.

Fixes wildfly#210

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
@Pranaysaha2

Copy link
Copy Markdown
Contributor Author

@darranl @bstansberry can you review this pull request?

1 similar comment
@Pranaysaha2

Copy link
Copy Markdown
Contributor Author

@darranl @bstansberry can you review this pull request?

@bstansberry
bstansberry requested a review from jmesnil November 11, 2026 19:39
@jmesnil jmesnil closed this Nov 12, 2026
@jmesnil jmesnil reopened this Nov 12, 2026
@jmesnil

jmesnil commented Nov 12, 2026

Copy link
Copy Markdown
Member

I tested it with local Podman and OpenShift 5.0.1 and was able to connect locally to jboss-cli

@jmesnil
jmesnil merged commit 2f35040 into wildfly:main Nov 12, 2026
4 checks passed
@jmesnil

jmesnil commented Nov 12, 2026

Copy link
Copy Markdown
Member

@Pranaysaha2 thanks for the contribution

@Pranaysaha2

Copy link
Copy Markdown
Contributor Author

@jmesnil Thanks for reviewing.

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.

Unable to connect to jboss-cli on OpenShift

2 participants