Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1192088 - Reserve static gid/uid for jboss user
Reserve static gid/uid for jboss user
Status: VERIFIED
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: distribution (Show other bugs)
6.4.0
Unspecified Unspecified
urgent Severity unspecified
: CR1
: EAP 6.4.0
Assigned To: David Walluck
Katerina Odabasi
:
Depends On: 1192412 1192413
Blocks:
  Show dependency treegraph
 
Reported: 2015-02-12 10:32 EST by Marek Goldmann
Modified: 2018-03-06 15:40 EST (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marek Goldmann 2015-02-12 10:32:48 EST
Description of problem:

Currently then the EAP product is being installed in the RPM version a jboss user and jboss group is being created, although it does not use static uid/gids:

JBOSS_SHELL=/sbin/nologin
%{_sbindir}/groupadd -r jboss 2>/dev/null || :
%{_sbindir}/useradd -c JBossAS -r -s $JBOSS_SHELL -d %{_localstatedir}/lib/jbossas -g jboss jboss 2>/dev/null || :

This is a problem, because the generated uid can conflict with some services. A static user and group id should be used.

Additionally, in the Cloud Enablement team we are preparing initial Docker images for JBoss products. Every product will be used launched as a regular jboss user. We need to base on a registered uid/gid to not choose an ID that could possibly conflict with some other service. Using static uid/gid in Docker is crucial, because the system administrator need to know upfront the id's to set up the volumes permissions for the selected user.
Comment 2 Marek Goldmann 2015-02-12 10:41:11 EST
In Fedora a static uid/gid 185 was registered for JBoss AS and later reused by WildFly: https://git.fedorahosted.org/cgit/setup.git/tree/uidgid?id=fb80b722656989461f8a8d5001d22a05abe28890#n151
Comment 3 John Doyle 2015-02-12 10:52:05 EST
I presume the current behavior is the behavior of 6.3 when installed via RPMs?  What's the effect for someone upgrading if we make this change?
Comment 4 Marek Goldmann 2015-02-12 11:11:54 EST
From what I know there is no change, since the user ID's are assigned only when the RPM is installed for the first time. For upgrades - the already existing ID's will be reused.
Comment 5 Marek Goldmann 2015-02-12 12:11:47 EST
Ondrej, could you please confirm that ID 185 is registered for 'jboss-as' user in the setup package?

I have two questions around this:

1. Is it save to use uid/gid for all supported RHEL versions now (5, 6, 7)?
2. Is there a chance the 'jboss-as' user could be renamed to 'jboss' so it could match the EAP user?
Comment 6 Ondrej Vasik 2015-02-13 04:19:01 EST
RHEL 5 definitely not - threshold for static allocations is just 100 (and there are no free uidgid pairs under threshold). RHEL 6 and RHEL 7 contain jboss-as reservation, if you want to update them, please file bugzillas against them.

In addition, actually current Fedora Rawhide has following entry for "former jboss-as" - as rename to wildfly was requested by https://bugzilla.redhat.com/show_bug.cgi?id=995045#c4 :
wildfly	185	185	/usr/share/wildfly		/sbin/nologin	wildfly	#was jboss-as

So yes, rename in registration for successor is possible - it is just guidance reservation file, it will just make the comment even more confusing - as I would have to mention wildfly as well to prevent confusion.

Please use soft-static allocation approach ( https://fedoraproject.org/wiki/Packaging:UsersAndGroups#Soft_static_allocation ) when using the static reserved id - and you should probably be safe even on RHEL 5 - worst case you can get is dynamic system id, if the 185 is already occupied.
Comment 7 Vaclav Tunka 2015-02-13 05:04:17 EST
Ondrej, thanks for the update. We are not interested in RHEL5 much - given we can't change it anymore. This is for John to ACK.

I will file a BZ against RHEL6 and RHEL7. We will triage this BZ today, so hopefully this gets to RHEL PM as well.
Comment 8 Vaclav Tunka 2015-02-13 05:15:12 EST
Created two blocker BZs for RHEL6 & RHEL7 and set appropriate flags reflecting severity of this for layered products.
Comment 10 Vaclav Tunka 2015-02-13 06:30:33 EST
Acking per dicsussion with Kabir on blocker triage.
Comment 13 Vaclav Tunka 2015-02-13 06:47:56 EST
Adding pmuir to CC per discussion with Marek, so devexp team is aware.
Comment 14 John Doyle 2015-02-13 09:48:01 EST
ack'd
Comment 16 John Doyle 2015-02-17 11:22:49 EST
I've informed the RHEL PM, is there anything remaining to be done on this issue?
Comment 18 Fernando Nasser 2015-02-17 11:51:38 EST
Can someone please link the BZ# for the RHEL-6 and 7 number allocations?
Comment 19 Vaclav Tunka 2015-02-19 06:01:37 EST
John, that's all, thank you very much.
Comment 20 Vaclav Tunka 2015-02-19 06:02:56 EST
Fernando, the RHEL BZs are linked in "depends on": BZ1192412, BZ1192413. I assigned this BZ to you, it that OK?
Comment 21 Carlo de Wolf 2015-02-19 06:48:00 EST
Fedora/Rawhide has wildfly
RHEL has jboss-as

Now the proposal is to rename it to 'jboss' in an undetermined timeframe.
Comment 22 Dmitri Pal 2015-02-24 11:15:51 EST
OK, so now we have a static user with predefined UID/GID.
This is fine however would be nice to understand the following:
- Can this user be managed remotely (some people put users like this into central LDAP and manage them centrally). In this case we need to understand whether it is a preferred or recommended option
- What is a group membership of this user? Can he be a member of the central or local groups?
- What are other policies around this user? SELinux, sudo, host based access control? 
- Any policy kit policies that need to be developed? 

The fact that JBOSS needs a static user makes me think that there are more opportunities for EAP to leverage platform identity capabilities in future.
Comment 24 Katerina Odabasi 2015-03-26 04:53:50 EDT
For RHEL6 and 7 verified that default uid/gid for jboss group/user after fresh EAP installation is 185 (For rhel6 and 7), if the uid/gid already exists it is chosen dynamically.
RHEL5 doesn't have default uid/gid.

Note You need to log in before you can comment on or make changes to this bug.