Red Hat Satellite engineering is moving the tracking of its product development work on Satellite 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 "Satellite project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs will be migrated starting at the end of May. 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 "Satellite project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/SAT-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 1468541 - Satellite is not allowing recreation of SSH-key in Users
Summary: Satellite is not allowing recreation of SSH-key in Users
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Users & Roles
Version: 6.3.0
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: Unspecified
Assignee: Marek Hulan
QA Contact: Jitendra Yejare
URL:
Whiteboard:
Depends On:
Blocks: 1493109
TreeView+ depends on / blocked
 
Reported: 2017-07-07 11:20 UTC by Jitendra Yejare
Modified: 2019-09-25 21:29 UTC (History)
5 users (show)

Fixed In Version: foreman-1.15.3
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-21 17:03:51 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
Screenshot Attached (57.07 KB, image/png)
2017-07-07 11:20 UTC, Jitendra Yejare
no flags Details


Links
System ID Private Priority Status Summary Last Updated
Foreman Issue Tracker 20306 0 None None None 2017-07-14 08:57:35 UTC

Description Jitendra Yejare 2017-07-07 11:20:10 UTC
Created attachment 1295261 [details]
Screenshot Attached

Description of problem:
Satellite is not allowing the recreation of SSH key after deleting that SSH key once from satellite.
It throws an error notification of 'Fingerprint has already been taken'.

Version-Release number of selected component (if applicable):
Satellite 6.3.0 Snap 5

How reproducible:
Always

Steps to Reproduce:
1. Create SSH key in any users(i tried in Admin) template
2. Delete that SSH key from users template.
3. Attempt to add same SSH key is same user template.

Actual results:
1. Satellite UI throws error notification - Fingerprint has already been taken.
2. SSH key is not added to user template.

Expected results:
Recreation/Re-Addition of SSH key in user template should be successful for any number of times. Error notification should not be displayed for recreation of SSH key.

Additional info:

Comment 3 Jitendra Yejare 2017-07-11 10:20:52 UTC
Hi Marek,

One update is that, I am facing this issue only for Super Admin user.

Production logs:
2017-07-11 06:15:37 57a92fe1 [app] [I] Started GET "/users/3-admin/ssh_keys/new" for 10.65.223.122 at 2017-07-11 06:15:37 -0400
2017-07-11 06:15:37 57a92fe1 [app] [I] Processing by SshKeysController#new as HTML
2017-07-11 06:15:37 57a92fe1 [app] [I]   Parameters: {"user_id"=>"3-admin"}
2017-07-11 06:15:37 57a92fe1 [app] [I] Current user: admin (administrator)
2017-07-11 06:15:37 57a92fe1 [app] [I]   Rendered ssh_keys/_form.html.erb (4.7ms)
2017-07-11 06:15:37 57a92fe1 [app] [I]   Rendered ssh_keys/new.html.erb within layouts/application (7.5ms)
2017-07-11 06:15:37 57a92fe1 [app] [I]   Rendered layouts/_application_content.html.erb (0.3ms)
2017-07-11 06:15:37 57a92fe1 [app] [I]   Rendered home/_submenu.html.erb (2.0ms)
2017-07-11 06:15:37 57a92fe1 [app] [I]   Rendered home/_user_dropdown.html.erb (1.5ms)
2017-07-11 06:15:37 57a92fe1 [app] [I] Read fragment views/tabs_and_title_records-3 (0.1ms)
2017-07-11 06:15:37 57a92fe1 [app] [I]   Rendered home/_topbar.html.erb (5.0ms)
2017-07-11 06:15:37 57a92fe1 [app] [I]   Rendered layouts/base.html.erb (6.9ms)
2017-07-11 06:15:37 57a92fe1 [app] [I] Completed 200 OK in 32ms (Views: 20.6ms | ActiveRecord: 3.3ms)
2017-07-11 06:15:37 3c613444 [app] [I] Started GET "/users/3-admin/ssh_keys/new" for 10.65.223.122 at 2017-07-11 06:15:37 -0400
2017-07-11 06:15:37 3c613444 [app] [I] Processing by SshKeysController#new as HTML
2017-07-11 06:15:37 3c613444 [app] [I]   Parameters: {"user_id"=>"3-admin"}
2017-07-11 06:15:37 3c613444 [app] [I] Current user: admin (administrator)
2017-07-11 06:15:37 3c613444 [app] [I]   Rendered ssh_keys/_form.html.erb (3.2ms)
2017-07-11 06:15:37 3c613444 [app] [I]   Rendered ssh_keys/new.html.erb within layouts/application (6.1ms)
2017-07-11 06:15:37 3c613444 [app] [I]   Rendered layouts/_application_content.html.erb (0.3ms)
2017-07-11 06:15:37 3c613444 [app] [I]   Rendered home/_submenu.html.erb (2.0ms)
2017-07-11 06:15:37 3c613444 [app] [I]   Rendered home/_user_dropdown.html.erb (1.5ms)
2017-07-11 06:15:37 3c613444 [app] [I] Read fragment views/tabs_and_title_records-3 (0.1ms)
2017-07-11 06:15:37 3c613444 [app] [I]   Rendered home/_topbar.html.erb (4.8ms)
2017-07-11 06:15:37 3c613444 [app] [I]   Rendered layouts/base.html.erb (6.8ms)
2017-07-11 06:15:37 3c613444 [app] [I] Completed 200 OK in 25ms (Views: 14.7ms | ActiveRecord: 2.8ms)
2017-07-11 06:15:38 2d7dd4b5 [app] [I] Started GET "/notification_recipients" for 10.65.223.122 at 2017-07-11 06:15:38 -0400
2017-07-11 06:15:38 2d7dd4b5 [app] [I] Processing by NotificationRecipientsController#index as JSON
2017-07-11 06:15:38 2d7dd4b5 [app] [I] Current user: admin (administrator)
2017-07-11 06:15:38 2d7dd4b5 [app] [I] Completed 200 OK in 4ms (Views: 0.1ms | ActiveRecord: 0.7ms)
2017-07-11 06:15:41 70f68e46 [app] [I] Started POST "/users/3-admin/ssh_keys" for 10.65.223.122 at 2017-07-11 06:15:41 -0400
2017-07-11 06:15:41 70f68e46 [app] [I] Processing by SshKeysController#create as HTML
2017-07-11 06:15:41 70f68e46 [app] [I]   Parameters: {"utf8"=>"✓", "authenticity_token"=>"kofFJNQ0NX8ihQIIAA4ipij1DJ+NQwfhurTmwILpTfNXej8zVexu5tYnRMfYMz9hsDAprh1rUlqp/rzN0K31jA==", "ssh_key"=>{"key"=>"ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDXb0vgvmYwAeZ1SMMGBHK/+Mv0gx17URhnU26FBwb3PqDr1+KVzrs1lkeFWFVqSEQmWSANfb9QgEJ5xXUwuB0CjgURdpYQTj98C7wTwDcUw5lMxDaMYb1VES8hhG2ORDk1H1mb5pNNby5ghYEORkI43VOzOu6SsZpPuWkxJbhj7pRo++xiMCDsfnsktOXyeWoes0Ig1dLj2mlZe3HP5BtPhJLwrzO1bd3POSsJFuEwALUF0mWQ6TEqzA8vqID/dcjpzMnaiFl6IOswjrLboF1SMhk4/2qLFYMDkSHYjGQC0GvxuSA7Vvsk1J19UG9Hs5HAyGzHImNEw9ptzzOQcKut root.lab.eng.bos.redhat.com", "name"=>"root.lab.eng.bos.redhat.com"}, "commit"=>"Submit", "user_id"=>"3-admin"}
2017-07-11 06:15:41 70f68e46 [app] [I] Current user: admin (administrator)
2017-07-11 06:15:42 70f68e46 [app] [I] Failed to save: Fingerprint has already been taken
2017-07-11 06:15:42 70f68e46 [app] [I]   Rendered ssh_keys/_form.html.erb (3.0ms)
2017-07-11 06:15:42 70f68e46 [app] [I]   Rendered ssh_keys/new.html.erb within layouts/application (5.0ms)
2017-07-11 06:15:42 70f68e46 [app] [I]   Rendered layouts/_application_content.html.erb (0.3ms)
2017-07-11 06:15:42 70f68e46 [app] [I]   Rendered home/_submenu.html.erb (1.9ms)
2017-07-11 06:15:42 70f68e46 [app] [I]   Rendered home/_user_dropdown.html.erb (1.5ms)
2017-07-11 06:15:42 70f68e46 [app] [I] Read fragment views/tabs_and_title_records-3 (0.1ms)
2017-07-11 06:15:42 70f68e46 [app] [I]   Rendered home/_topbar.html.erb (4.8ms)
2017-07-11 06:15:42 70f68e46 [app] [I]   Rendered layouts/base.html.erb (6.8ms)
2017-07-11 06:15:42 70f68e46 [app] [I] Completed 200 OK in 30ms (Views: 13.2ms | ActiveRecord: 3.7ms)
2017-07-11 06:15:42 5b991f4c [app] [I] Started GET "/notification_recipients" for 10.65.223.122 at 2017-07-11 06:15:42 -0400
2017-07-11 06:15:42 5b991f4c [app] [I] Processing by NotificationRecipientsController#index as JSON
2017-07-11 06:15:42 5b991f4c [app] [I] Current user: admin (administrator)
2017-07-11 06:15:42 5b991f4c [app] [I] Completed 200 OK in 4ms (Views: 0.1ms | ActiveRecord: 0.8ms)
2017-07-11 06:15:53 0bca123e [app] [I] Started GET "/notification_recipients" for 10.65.223.122 at 2017-07-11 06:15:53 -0400
2017-07-11 06:15:53 0bca123e [app] [I] Processing by NotificationRecipientsController#index as JSON
2017-07-11 06:15:53 0bca123e [app] [I] Current user: admin (administrator)
2017-07-11 06:15:53 0bca123e [app] [I] Completed 200 OK in 4ms (Views: 0.1ms | ActiveRecord: 0.8ms)


Why I consider this as blocker ?
Answer - Because Once the ssh key is deleted from Admin user then there is no another way to add it, neither from CLI and nor from API. 
I know customer can copy paste the SSH key but thats really hectic for customer if he has tomes of host to copy ssh key.

Comment 4 Marek Hulan 2017-07-14 08:57:32 UTC
Created redmine issue http://projects.theforeman.org/issues/20306 from this bug

Comment 5 Satellite Program 2017-07-14 10:11:38 UTC
Upstream bug assigned to mhulan

Comment 6 Satellite Program 2017-07-14 10:11:41 UTC
Upstream bug assigned to mhulan

Comment 7 Satellite Program 2017-07-19 20:11:28 UTC
Moving this bug to POST for triage into Satellite 6 since the upstream issue http://projects.theforeman.org/issues/20306 has been resolved.

Comment 8 Jitendra Yejare 2017-08-28 11:53:35 UTC
Verified!

Satelite 6.3.0 Snap 13

Steps:
1. Create SSH key in any Admin user
2. Delete that SSH key from Admin user
3. Attempt to add same SSH key Admin user

Actual results:
Satellite is now allowing to recreate the SSH-key

Comment 9 Bryan Kearney 2018-02-21 17:03:51 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.

https://access.redhat.com/errata/RHSA-2018:0336


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