To get the config.xml of a job via REST api

51 views
Skip to first unread message

vinodhi...@gmail.com

unread,
Mar 2, 2015, 12:09:31 AM3/2/15
to jenkins...@googlegroups.com
Hello All,

My Jenkins is running in Windows 7 and I have enabled LDAP authentication for it.

I would like to use the REST api of Jenkins via my Java program to get some job config.xml.

I am using HttpURLConnection to connect to REST api of Jenkins and read the xml.

The problem is that as I am using Basic Authentication like this , conn.setRequestProperty("Authorization", "Basic " + authStringEnc); , I feel it is not safe to send via internet.

Also, I will not know the username and password of the user who will be using my application. (And I cannot ask for them as well)

User may or maynot have logged into Jenkins atleast once.

So , is there any way to get the config.xml using Jenkins REST api  either without using credentials of the user or using something like NTLM?


Kindly help me.

Thank you in advance!!


Thanks
Vinodhini

Baptiste Mathus

unread,
Mar 2, 2015, 1:20:14 AM3/2/15
to jenkins...@googlegroups.com
I *think* the CLI is encrypting communication, since it's using your SSH keys. So I would search there. 

And if you can't, then the right solution would seem just to put an HTTPS pipe in your case.

Cheers

--
You received this message because you are subscribed to the Google Groups "Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/ab2e4537-4e3b-4f13-8f6a-7aa0f1af8e54%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Baptiste <Batmat> MATHUS - http://batmat.net
Sauvez un arbre,
Mangez un castor !

vinodhi...@gmail.com

unread,
Mar 7, 2015, 12:03:18 PM3/7/15
to jenkins...@googlegroups.com, bma...@batmat.net
Thank you!!.. I couldnt find an option with Jenkins CLI.. So I opted for HTTPS.

Thanks again:)

Regards
Vinodhini
Reply all
Reply to author
Forward
0 new messages