So, you’ve gone through the Conjur Quick-Start Tutorials, shutdown your Docker containers, and closed your terminal. Tomorrow morning comes around, and you’re loading up your machine to do more Conjur Tutorials, but oh, no! You realize you never saved the Admin API key that you created last time!
Don’t worry, you don’t have to create a whole new Conjur instance from scratch.
Start up the Conjur Docker containers like normal
Before opening up a shell in the container
Make sure you’re in the directory with Conjur
Run this in your terminal: docker-compose exec conjur conjurctl role retrieve-key {account}:user:{username}
This will output the API key for the account you’re looking for. To prevent this problem in the future, I would recommend setting a password for human user’s, using this or the command conjur [global options] user update_password [-p arg|--password arg]
Thanks Chris! Glad it was helpful. As for your question, the Conjur container and the Conjur CLI container are separate. The conjurctl command is executed into “conjur” which is the default name in the docker-compose for the Conjur container. The default name for the Conjur CLI in the docker-compose is “client”. When you’re using conjur example commands you are executing on the CLI container, but all conjurctl example commands are executed directly into the Conjur server. I hope that clears up any confusion.
Hi Jake, would you update the title to reflect open source then? I lost time on the enterprise assumption as well. Better yet, if the use case of discovering the api key can play out in enterprise DAP, then include that in the how-to.
Thanks! -Andy
Just updated, sorry for the confusion. I only work with OS, but I was actually just working with people to find the DAP equivalent. I’ll add it to this post as soon as I find it.
I’ll be interested in this as well. We’re currently on-boarding PCF apps to our DAP implementation and I like to be able to test which secrets a specific application can see by logging into the conjur CLI as that ‘host’, after I’ve updated the policy to grant that access.
Hi Jake,
I tried to generate a conjur token but getting error " curl (7) : failed to connect to proxy port 443: Connection Refused " . Can you please help me in solving this
Is this related to this guide? This guide uses the CLI, so I’m not sure how it works with the API. If it’s not related to the guide it’d probably benefit you more to make a new topic in the #conjur category.
Yes it is related to that guide (Step 4 : Run the demo app) and i get this error when i trying to run the Botapp which comes as a part conjur oss files from github. I am using docker toolbox and i found that openssl container is not running. Is this openssl creating this curl error ?
@vullipriyanka this seems like you are having problems with the Quick Start Guide rather than this tutorial for recovering a lost API key. I think it’d be best if you started a new topic about this in the #conjur category, and we can help you solve this. Could you also give a list of the containers that are running when you make this post?