AnsweredAssumed Answered

How do you find the ID's for Shared Credentials?

Question asked by Tony Hamil on Jul 14, 2017
Latest reply on Jul 14, 2017 by Tony Hamil

So I have a quick issue.   I have a script setup to checkout a password from out Identity Management Software and then passes that password to a Ruby script to replace the password on a 'Shared Credential'.  I have loaded the Nexpose Gem 6.1.0 so it is on the latest iteration of the gem.


My issue is that when you call the Shared Credential using the .load Method, it wants the 'id' of the Share Credential and not the name itself.  I looked at the following post and tried using 'nsc.shared_credentials' to grab the output but I just get 'gibberish' back and not the id's for the Credential Names.


Using the Gem for Shared Credentials


I even offloaded the Database to a SQL Server Database so I could look through the tables and did not find anything that referenced the Shared Credentials or their id's.


My question is: "Is there a command in Ruby, SQL Export Report, or other means for finding out the Shared Credential name to id correlation?" 


Once I know what credential I am changing, I can finish my script and start changing the Shared Credentials' Passwords on the fly with no user interaction.


Thank you for your help in advance and if you need to see any code I am using (which is very similar to the post I referenced above) please let me know.