Ask Your Question

Logging into Puppet Enterprise console from script

asked 2013-08-15 16:00:01 -0500

GregLarkin gravatar image

I would like to extract some data from the Puppet Enterprise console, and it appears pretty easy to do once authenticated. For instance, I browsed to the URL (PE running in a VM on my machine):

<a href=""></a>

This printed a JSON response that I want to parse and use in a script. However, I'm not sure how to gain access to the URL from a script because the console implements its own authentication form. Does anyone have any insight about how ... (more)

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted

answered 2013-08-15 17:15:15 -0500

Hunner gravatar image

When curling against the Puppet Enterprise console, you have to auth against the RubyCAS server first. A method of doing this would be

$ curl --insecure --cookie-jar cookies.txt --location --data <a href="mailto:''">''</a> '

Further curl queries would have to include the saved cookie to continue the authenticated session:

$ curl --insecure --cookie cookies.txt --cookie-jar cookies.txt ''

Alternatively you could run all queries from the console machine itself; authentication is ... (more)

edit flag offensive delete link more


I can't seem to remove the `mailto` href anchor tags around the login name. Obviously don't include the html tags.

Hunner gravatar imageHunner ( 2013-08-15 17:25:12 -0500 )edit

Excellent, I will try that!

GregLarkin gravatar imageGregLarkin ( 2013-08-15 20:56:41 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2013-08-15 16:00:01 -0500

Seen: 369 times

Last updated: Aug 15 '13