Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.

Bug 803773

Summary: Can't register with activation key containing international characters
Product: Red Hat Enterprise Linux 6 Reporter: Tomas Strachota <tstrachota>
Component: python-rhsmAssignee: Chris Duryee <cduryee>
Status: CLOSED ERRATA QA Contact: Entitlement Bugs <entitlement-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2CC: bkearney, cduryee, esammons, jsefler
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-06-20 12:58:05 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 738066    
Attachments:
Description Flags
Proposed fix for python-rhsm none

Description Tomas Strachota 2012-03-15 15:48:57 UTC
Description of problem:
Can't register with activation key containing international characters. Every attempt ends with "Network error".


Version-Release number of selected component (if applicable):
python-rhsm-0.99.5-1
subscription-manager-0.99.9-1


Steps to Reproduce:
1. create AK with some international characters
2. try register a machine using that AK


Actual results:
#subscription-manager register --org ACME_Corporation --name test --activationkey ak_na_testování
Network error. Please check the connection details, or see /var/log/rhsm/rhsm.log for more information.

Comment 2 Tomas Strachota 2012-03-15 15:57:51 UTC
Created attachment 570338 [details]
Proposed fix for python-rhsm

Problem is in names of activation keys going to url unquoted.

Comment 3 Chris Duryee 2012-03-23 13:48:32 UTC
Thanks for the patch!

1c105e6056 master 0.99.7+

Comment 7 John Sefler 2012-04-13 00:36:41 UTC
Need some info here...

Are we just testing the upload of an international character through subscription-manager to candlepin?

The creation of an activation key in candlepin is actually blocked gracefully to not allow international characters....

[root@jsefler-r63-server ~]# curl --stderr /dev/null --insecure --user testuser1:password --request POST --data '{"name":"ak_na_testování"}' --header 'accept: application/json' --header 'content-type: application/json' https://jsefler-f14-candlepin.usersys.redhat.com:8443/candlepin/owners/admin/activation_keys | python -m simplejson/tool
{
    "displayMessage": "Activation key names must be alphanumeric or the characters '-' or '_'. [ak_na_testov\u00e1n\u00ed]"
}

^^^ NOTE: Candlepin is not allowing international characters in the activation key anyway.

Comment 8 Chris Duryee 2012-04-13 01:19:59 UTC
John,

Correct, the fix was in python-rhsm to ensure that the character is passed up to candlepin, where a better error can be sent back down.

Comment 10 John Sefler 2012-04-13 16:26:57 UTC
Re-creation of defect...
[root@rhsm-compat-rhel62 ~]# rpm -q subscription-manager
subscription-manager-0.96.17-1.el6.x86_64
[root@rhsm-compat-rhel62 ~]# subscription-manager register --org admin --activationkey ak_na_testování
Invalid username or password. To create a login, please visit https://www.redhat.com/wapps/ugc/register.html
[root@rhsm-compat-rhel62 ~]# 

Verification of fix...
[root@jsefler-r63-server ~]# rpm -q subscription-manager
subscription-manager-0.99.14-1.el6.x86_64
[root@jsefler-r63-server ~]# subscription-manager register --org admin --activationkey ak_na_testování
Activation key 'ak_na_testování' not found for organization 'admin'.
[root@jsefler-r63-server ~]# subscription-manager register --org admin --activationkey "使 용 Ф ব্ ಬ ഉ ବ୍ டு వా Й Ó"
Activation key '使 용 Ф ব্ ಬ ഉ ବ୍ டு వా Й Ó' not found for organization 'admin'.
[root@jsefler-r63-server ~]# 


^^^ VERIFIED: The international characters are successfully passed to candlepin, processed by candlepin, and returned from candlepin in the form of a graceful error message.

Comment 11 John Sefler 2012-04-13 16:35:43 UTC
(In reply to comment #10)
oops.  I forgot the include the verified versions of python-rhsm; inserted below...

> Re-creation of defect...
> [root@rhsm-compat-rhel62 ~]# rpm -q subscription-manager
> subscription-manager-0.96.17-1.el6.x86_64
[root@rhsm-compat-rhel62 ~]# rpm -q python-rhsm
python-rhsm-0.96.15-1.el6.noarch
> [root@rhsm-compat-rhel62 ~]# subscription-manager register --org admin
> --activationkey ak_na_testování
> Invalid username or password. To create a login, please visit
> https://www.redhat.com/wapps/ugc/register.html
> [root@rhsm-compat-rhel62 ~]# 
> 
> Verification of fix...
> [root@jsefler-r63-server ~]# rpm -q subscription-manager
> subscription-manager-0.99.14-1.el6.x86_64
[root@jsefler-r63-server ~]# rpm -q python-rhsm
python-rhsm-0.99.8-1.el6.noarch
> [root@jsefler-r63-server ~]# subscription-manager register --org admin
> --activationkey ak_na_testování
> Activation key 'ak_na_testování' not found for organization 'admin'.
> [root@jsefler-r63-server ~]# subscription-manager register --org admin
> --activationkey "使 용 Ф ব্ ಬ ഉ ବ୍ டு వా Й Ó"
> Activation key '使 용 Ф ব্ ಬ ഉ ବ୍ டு వా Й Ó' not found for organization 'admin'.
> [root@jsefler-r63-server ~]# 
> 
> 
> ^^^ VERIFIED: The international characters are successfully passed to
> candlepin, processed by candlepin, and returned from candlepin in the form of a
> graceful error message.

Comment 12 Eric Sammons 2012-04-13 16:45:05 UTC
[root@brain ~]# rpm -q python-rhsm
python-rhsm-0.99.8-1.el6.noarch
[root@brain ~]# rpm -q subscription-manager
subscription-manager-0.99.14-1.el6.x86_64

katello-headpin-all-0.1.145-1.el6.noarch

[root@brain ~]# subscription-manager register --org ACME_Corporation --activationkey ak_na_testování
The system has been registered with id: f53ef976-e641-4e68-bba2-48d1ec58824e 
[root@brain ~]# subscription-manager unregister
System has been un-registered.
[root@brain ~]# subscription-manager register --org ACME_Corporation --activationkey "使 용 Ф ব্ ಬ ഉ ବ୍ டு వా Й Ó"
The system has been registered with id: 0609126c-d347-4edb-9d25-3fc9827f66a5 

VERIFIED

Comment 14 errata-xmlrpc 2012-06-20 12:58:05 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

http://rhn.redhat.com/errata/RHBA-2012-0805.html