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 1138535

Summary: Subscription-Manager should be able to use an API key instead of a password
Product: Red Hat Enterprise Linux 7 Reporter: James (purpleidea) <jshubin>
Component: subscription-managerAssignee: candlepin-bugs
Status: CLOSED WONTFIX QA Contact: John Sefler <jsefler>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.0CC: bkearney, cgoern, jshubin, mmccune, tomckay
Target Milestone: rc   
Target Release: 7.1   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-09-29 19:46:22 UTC Type: Bug
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: 1005618    

Description James (purpleidea) 2014-09-05 06:25:16 UTC
Description of problem:
Subscription-manager should be able to use a --apikey=XXX type of option instead of the --password option. These keys could be generated per account in the RHN webui, and be used by scripts which need a "password". This avoids having your cleartext password in a .yaml configuration file, and gives you the ability to revoke keys if needed. 

Version-Release number of selected component (if applicable):
git master


How reproducible:
100%

Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:
This would be useful to such products that aim to make subscription-manager (and subscribing) easier to use, such as "Oh My Vagrant"...
https://ttboj.wordpress.com/2014/09/03/introducing-oh-my-vagrant/

Comment 3 Tom McKay 2014-09-05 12:30:22 UTC
Isn't this functionality equivalent to activation keys? If the user creates an activation key, naming it like a key (eg. "li0bvekdydeedhmva7rxw7d1"), then that would be equivalent to an api key. In addition, if candlepin implemented features like Satellite-6 has such as a limit to the number of times used, this would add an additional layer of confidence that the activation key could not be abused.

Comment 4 James (purpleidea) 2014-09-05 17:49:53 UTC
(In reply to Tom McKay from comment #3)
> Isn't this functionality equivalent to activation keys? If the user creates
> an activation key, naming it like a key (eg. "li0bvekdydeedhmva7rxw7d1"),
> then that would be equivalent to an api key. In addition, if candlepin
> implemented features like Satellite-6 has such as a limit to the number of
> times used, this would add an additional layer of confidence that the
> activation key could not be abused.

I asked, but was told that it wasn't, and that my proposed feature would be a good one to add. Hence me opening this ticket.

mmccune, can you confirm?

Comment 5 Christoph Görn 2014-09-23 13:23:18 UTC
From my point of view an activation key serves the purpose: we are able to register a system and let it subscribe to repos without providing a username/password. 

From the docs "Activation keys are a way to preconfigure subscriptions for a system before it is registered [...] This grants [...] control to administrators over which subscriptions to attach to new systems, while simplifying the registration process [...]." [1] 

[1] https://access.redhat.com/documentation/en-US/Red_Hat_Subscription_Management/1/html-single/Using_Subscription_Asset_Manager/#sam-activation

Comment 6 James (purpleidea) 2014-09-23 17:59:33 UTC
(In reply to Christoph Görn from comment #5)
> From my point of view an activation key serves the purpose: we are able to
> register a system and let it subscribe to repos without providing a
> username/password. 
> 
> From the docs "Activation keys are a way to preconfigure subscriptions for a
> system before it is registered [...] This grants [...] control to
> administrators over which subscriptions to attach to new systems, while
> simplifying the registration process [...]." [1] 
> 
> [1]
> https://access.redhat.com/documentation/en-US/
> Red_Hat_Subscription_Management/1/html-single/
> Using_Subscription_Asset_Manager/#sam-activation

I didn't know the activation keys can do the equivalent of the username/password, but I'm very unfamiliar with subscription-manager things... If you can POC how this works, I can patch oh-my-vagrant [1] to include this feature.

Cheers
James

[1] https://github.com/purpleidea/oh-my-vagrant

Comment 7 Christoph Görn 2014-09-26 08:25:08 UTC
Implemented a POC at https://github.com/goern/oh-my-vagrant/tree/feature/activation-key-vs-subscription-manager tested against an Satellite 5.6

open issue is unregistering/deleting systems from Sat5

As you have externalized the user/pass from the vagrant.yaml we should reevaluate if we still need the activation key approach.

Comment 8 Bryan Kearney 2014-09-29 17:27:27 UTC
Acking 7.1

Comment 11 Red Hat Bugzilla 2023-09-14 02:46:59 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days