Bug 803773 - Can't register with activation key containing international characters
Can't register with activation key containing international characters
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: python-rhsm (Show other bugs)
6.2
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Chris Duryee
Entitlement Bugs
:
Depends On:
Blocks: 738066
  Show dependency treegraph
 
Reported: 2012-03-15 11:48 EDT by Tomas Strachota
Modified: 2012-06-20 08:58 EDT (History)
4 users (show)

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


Attachments (Terms of Use)
Proposed fix for python-rhsm (822 bytes, patch)
2012-03-15 11:57 EDT, Tomas Strachota
no flags Details | Diff

  None (edit)
Description Tomas Strachota 2012-03-15 11:48:57 EDT
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 11:57:51 EDT
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 09:48:32 EDT
Thanks for the patch!

1c105e6056 master 0.99.7+
Comment 7 John Sefler 2012-04-12 20:36:41 EDT
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-12 21:19:59 EDT
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 12:26:57 EDT
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 12:35:43 EDT
(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 12:45:05 EDT
[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 08:58:05 EDT
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

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