Description of problem: Caught this bug in production... After creating a valid single sign-on username created at https://www.redhat.com/wapps/sso/login.html with a login of the form user, we navigated through the entitlement beta enrolment app and went to kingpin to "Create a person consumer". Upon clicking the create person consumer we got a 500 error. It appears that the 500 was caused by candlepin using the user's login (user) which contains an @ character that candlepin rejected. Candlepin uses the login name as the value for --name when registering the person consumer. Referencing https://bugzilla.redhat.com/show_bug.cgi?id=672233 which was implemented to restrict the acceptable name characters to Alphanumeric, period, dash, and underscore. Also referencing: https://bugzilla.redhat.com/show_bug.cgi?id=661130 Important: it appears that this issue requires that candlepin must now tolerate at least all valid Red Hat login characters in register --name option. Version-Release number of selected component (if applicable): # curl -k -u foo:bar --request GET https://subscription.rhn.redhat.com:443/subscription/status {"version":"0.1.35","result":true,"release":"1%{?dist}"} How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Note from msechrest on login character restrictions in Red Hat login usernames: <msechrest> zeus, jsefler, bkearney: Login cannot contain the following special characters (") ($) (^) (<) (>) (|) (+) (%) (/) (;) (:) (,) (\) (*) (=) (~) <msechrest> Anything else is valid.
Note to development... remember when increasing the space of tolerable name characters, you will also need to update the user feedback message: # subscription-manager register --username=mylogin --name foo@#bar --password=redhat System name must consist of only alphanumeric characters, periods, dashes and underscores. ^^^ That message must also reflect the new tolerable characters
What if I change the message to read: System name cannot contain the following special characters (") ($) (^) (<) (>) (|) (+) (%) (/) (;) (:) (,) (\) (*) (=) (~). thoughts?
message changed to: System name cannot contain most special characters.
Testing against the candlepin master branch (0.2.X).... [root@jsefler-onprem03 ~]# grep hostname /etc/rhsm/rhsm.conf # Server hostname: hostname=jsefler-f14-candlepin.usersys.redhat.com proxy_hostname= [root@jsefler-onprem03 ~]# curl -u foo:bar -k https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/status {"version":"0.2.6","result":true,"release":"1%{?dist}"} [root@jsefler-onprem03 ~]# subscription-manager register --username=testuser1 --password=password --force --name="shadowman-(){}[]9?" fff154c7-c19c-449b-8f33-4eae189ca342 shadowman-(){}[]9? ^^^ PASSED... the @ character as well as some other new characters are now accepted name characters [root@jsefler-onprem03 ~]# subscription-manager register --username=testuser1 --password=password --force --name='(") ($) (^) (<) (>) (|) (+) (%) (/) (;) (:) (,) (\) (*) (=) (~)' The system with UUID 5919e514-5606-436b-be94-bb7792316857 has been unregistered System name cannot contain most special characters. ^^^ PASSED... this generic message blocks me from using an invalid character, but which one(s)?
Testing against the candlepin BETA branch (0.1.X).... [root@jsefler-onprem01 ~]# grep hostname /etc/rhsm/rhsm.conf # Server hostname: hostname=jsefler-f12-candlepin.usersys.redhat.com proxy_hostname= [root@jsefler-onprem01 ~]# curl -u foo:bar -k https://jsefler-f12-candlepin.usersys.redhat.com:8443/candlepin/status { "version" : "0.1.38", "result" : true, "release" : "1%{?dist}" } [root@jsefler-onprem01 ~]# subscription-manager register --username=testuser1 --password=password --force --name="shadowman-(){}[]9?" f1f8c750-5c3b-4b1d-ba03-c78314988e2c shadowman-(){}[]9? ^^^ PASSED... the @ character as well as some other new characters are now accepted name characters [root@jsefler-onprem01 ~]# subscription-manager register --username=testuser1 --password=password --force --name='(") ($) (^) (<) (>) (|) (+) (%) (/) (;) (:) (,) (\) (*) (=) (~)' The system with UUID bb28437f-d3bb-41d7-ab5f-818824ef9fc6 has been unregistered System name must consist of only alphanumeric characters, periods, dashes and underscores. ^^^ FAILED... looks like message from comment #4 was not yet updated on the BETA branch
Moving bug back to ASSIGNED for comment #4 to be included in candlepin BETA branch
it is available in the tip of BETA now. commit bbef85fc641dd1ec1a6fcb3527ad20108fe802f3
[root@jsefler-f12-candlepin candlepin]# git branch ALPHA * BETA master [root@jsefler-f12-candlepin candlepin]# git show-ref BETA bbef85fc641dd1ec1a6fcb3527ad20108fe802f3 refs/heads/BETA 3b0042c82f8277ef3cc1e81771b0c19181721fa7 refs/remotes/origin/BETA [root@jsefler-onprem01 ~]# curl -u foo:bar -k https://jsefler-f12-candlepin.usersys.redhat.com:8443/candlepin/status { "version" : "0.1.38", "result" : true, "release" : "1%{?dist}" } [root@jsefler-onprem01 ~]# subscription-manager register --username=testuser1 --password=password --force --name='(") ($) (^) (<) (>) (|) (+) (%) (/) (;) (:) (,) (\) (*) (=) (~)' System name cannot contain most special characters. ^^^ PASSED... this generic message blocks me from using an invalid character, but which one(s)? Moving bug to VERIFIED
Group move of VERIFIED Candlepin component bugs to RELEASE_PENDING