<?xml version="1.0"?>
<rss version="2.0">
<channel>
<title>Thycotic Community - Secret Server - Retriving secrets through command line. - Messages</title>
<link>http://www.thycotic.com/forums/messages.aspx?TopicID=393</link>
<description>Thycotic Community - Secret Server - Retriving secrets through command line. - Messages</description>
<language>en-us</language>
<docs>http://blogs.law.harvard.edu/tech/rss</docs>
<generator>Jitbit AspNetForum</generator>
<pubDate>Thu, 06 Oct 2011 09:25:25 GMT</pubDate>
<lastBuildDate>Thu, 06 Oct 2011 09:25:25 GMT</lastBuildDate>
<item>
<link>http://www.thycotic.com/forums/messages.aspx?TopicID=393</link>
<title>Message from Ameya A</title>
<description><![CDATA[Thanks for that.<br/><br/>I did try and still it is not working.<br/><br/>I am logging in a support ticket as I do not wish to expose the details of server on forums.<br/><br/>Hope that is okay with you.<br/><br/>Regards,<br/>Ameya Agashe.]]></description>
<pubDate>Thu, 06 Oct 2011 09:25:25 GMT</pubDate>
</item>
<item>
<link>http://www.thycotic.com/forums/messages.aspx?TopicID=393</link>
<title>Message from david c</title>
<description><![CDATA[Hi Ameya,<br/><br/>We have just created a KB article covering a couple different ways to interact with Secret Server's web services (installed edition). The article is located at &lt;a href="http://support.thycotic.com/KB/a181/using-curl-with-web-services.aspx"&gt;http://support.thycotic.com/KB/a181/using-curl-with-web-services.aspx&lt;/a&gt;]]></description>
<pubDate>Wed, 05 Oct 2011 10:48:50 GMT</pubDate>
</item>
<item>
<link>http://www.thycotic.com/forums/messages.aspx?TopicID=393</link>
<title>Message from david c</title>
<description><![CDATA[Hi Ameya,<br/><br/>My earlier response was incorrect, commands that work are as follows:<br/><br/>This returns the token:<br/><br/>curl -v -H "Content-Type: application/x-www-form-urlencoded" -d "username={NAME}&password={PASSWORD}&organization=&domain=" --url "&lt;a href="http://{URL"&gt;http://{URL&lt;/a&gt; TO SS}/webservices/sswebservice.asmx/Authenticate"<br/><br/><br/>This uses the token to get the Secret:<br/><br/>curl -v -H "Content-Type: application/x-www-form-urlencoded" -d "secretId=1&token={TOKEN}" --url "&lt;a href="http://{URL"&gt;http://{URL&lt;/a&gt; TO SS}/webservices/sswebservice.asmx/GetSecret"<br/><br/><br/>When testing I used the Win 64 no-ssl version of Curl, obtainable along with its SSL equivalent here: &lt;a href="http://curl.haxx.se/dlwiz/?type=bin&os=Win64"&gt;http://curl.haxx.se/dlwiz/?type=bin&os=Win64&lt;/a&gt;<br/><br/>Please let us know how this works on your end.]]></description>
<pubDate>Wed, 05 Oct 2011 09:38:59 GMT</pubDate>
</item>
<item>
<link>http://www.thycotic.com/forums/messages.aspx?TopicID=393</link>
<title>Message from Ameya A</title>
<description><![CDATA[I can confirm that webservices works, that is first authenticate to get token and then use token to have secretId but I am not sure why it doesn't work via curl?]]></description>
<pubDate>Sat, 01 Oct 2011 01:53:13 GMT</pubDate>
</item>
<item>
<link>http://www.thycotic.com/forums/messages.aspx?TopicID=393</link>
<title>Message from Ameya A</title>
<description><![CDATA[Thanks for that David.<br/>Yes I did saw that perl example but I don't know about perl I kept it aside <img src="images/smilies/smile.gif" border=0 alt="smile" /><br/><br/>Now If I do I am not getting any response.<br/><br/>I redirected the out to be xml file.<br/>The operation was,<br/>curl -v --url "&lt;a href="https://secretserver.transurban.com/ss/webservices/sswebservice.asmx?op=GetSecret&secretId=1835""&gt;https://secretserver.transurban.com/ss/webservices/sswebservice.asmx?op=GetSecret&secretId=1835"&lt;/a&gt; --user "username:password" &gt; 2.xml<br/><br/>[aagashe@tcolpdapp01 ~]$ cat 2.xml <br/><br/><br/><br/><br/>    <br/><br/>    <br/>    <br/>                BODY { color: #000000; background-color: white; font-family: Verdana; margin-left: 0px; margin-top: 0px; }<br/>                #content { margin-left: 30px; font-size: .70em; padding-bottom: 2em; }<br/>                A:link { color: #336699; font-weight: bold; text-decoration: underline; }<br/>                A:visited { color: #6699cc; font-weight: bold; text-decoration: underline; }<br/>                A:active { color: #336699; font-weight: bold; text-decoration: underline; }<br/>                A:hover { color: cc3300; font-weight: bold; text-decoration: underline; }<br/>                P { color: #000000; margin-top: 0px; margin-bottom: 12px; font-family: Verdana; }<br/>                pre { background-color: #e5e5cc; padding: 5px; font-family: Courier New; font-size: x-small; margin-top: -5px; border: 1px #f0f0e0 solid; }<br/>                td { color: #000000; font-family: Verdana; font-size: .7em; }<br/>                h2 { font-size: 1.5em; font-weight: bold; margin-top: 25px; margin-bottom: 10px; border-top: 1px solid #003366; margin-left: -15px; color: #003366; }<br/>                h3 { font-size: 1.1em; color: #000000; margin-left: -15px; margin-top: 10px; margin-bottom: 10px; }<br/>                ul { margin-top: 10px; margin-left: 20px; }<br/>                ol { margin-top: 10px; margin-left: 20px; }<br/>                li { margin-top: 10px; color: #000000; }<br/>                font.value { color: darkblue; font: bold; }<br/>                font.key { color: darkgreen; font: bold; }<br/>                font.error { color: darkred; font: bold; }<br/>                .heading1 { color: #ffffff; font-family: Tahoma; font-size: 26px; font-weight: normal; background-color: #003366; margin-top: 0px; margin-bottom: 0px; margin-left: -30px; padding-top: 10px; padding-bottom: 3px; padding-left: 15px; width: 105%; }<br/>                .button { background-color: #dcdcdc; font-family: Verdana; font-size: 1em; border-top: #cccccc 1px solid; border-bottom: #666666 1px solid; border-left: #cccccc 1px solid; border-right: #666666 1px solid; }<br/>                .frmheader { color: #000000; background: #dcdcdc; font-family: Verdana; font-size: .7em; font-weight: normal; border-bottom: 1px solid #dcdcdc; padding-top: 2px; padding-bottom: 2px; }<br/>                .frmtext { font-family: Verdana; font-size: .7em; margin-top: 8px; margin-bottom: 0px; margin-left: 32px; }<br/>                .frmInput { font-family: Verdana; font-size: 1em; }<br/>                .intro { margin-left: -15px; }<br/>           <br/>    <br/><br/>    <br/>        SSWebService Web Service<br/><br/><br/>  <br/><br/>    <br/><br/>      SSWebService<br/><br/><br/>      <br/><br/>      <br/><br/>      <br/>          Click here for a complete list of operations.<br/>          GetSecret<br/>          <br/><br/>          Test<br/>          <br/>          To test the operation using the HTTP POST protocol, click the 'Invoke' button.<br/><br/><br/><br/>                                            <br/>                        <br/>                          <br/>                          <br/>        Parameter<br/>        Value<br/><br/><br/>                        <br/>                          <br/>                            token:<br/>                            <br/>                          <br/>                        <br/>                          <br/>                            secretId:<br/>                            <br/>                          <br/>                        <br/>                        <br/>                          <br/>                           <br/>                        <br/>                        <br/>                      <br/><br/>                    <br/>                  <br/>              SOAP 1.1<br/>              <br/>The following is a sample SOAP 1.1 request and response.  The placeholders shown need to be replaced with actual values.<br/><br/>              POST /ss/webservices/sswebservice.asmx HTTP/1.1<br/>Host: secretserver.transurban.com<br/>Content-Type: text/xml; charset=utf-8<br/>Content-Length: length<br/>SOAPAction: "urn:thesecretserver.com/GetSecret"<br/><br/>&lt;?xml version="1.0" encoding="utf-8"?&gt;<br/>&lt;soap:Envelope xmlns:xsi="&lt;a href="http://www.w3.org/2001/XMLSchema-instance""&gt;http://www.w3.org/2001/XMLSchema-instance"&lt;/a&gt; xmlns:xsd="&lt;a href="http://www.w3.org/2001/XMLSchema""&gt;http://www.w3.org/2001/XMLSchema"&lt;/a&gt; xmlns:soap="&lt;a href="http://schemas.xmlsoap.org/soap/envelope/"&gt;"&gt;http://schemas.xmlsoap.org/soap/envelope/"&gt;&lt;/a&gt;<br/>  &lt;soap:Body&gt;<br/>    &lt;GetSecret xmlns="urn:thesecretserver.com"&gt;<br/>      &lt;token&gt;string&lt;/token&gt;<br/>      &lt;secretId&gt;int&lt;/secretId&gt;<br/>    &lt;/GetSecret&gt;<br/>  &lt;/soap:Body&gt;<br/>&lt;/soap:Envelope&gt;<br/><br/>              HTTP/1.1 200 OK<br/>Content-Type: text/xml; charset=utf-8<br/>Content-Length: length<br/><br/>&lt;?xml version="1.0" encoding="utf-8"?&gt;<br/>&lt;soap:Envelope xmlns:xsi="&lt;a href="http://www.w3.org/2001/XMLSchema-instance""&gt;http://www.w3.org/2001/XMLSchema-instance"&lt;/a&gt; xmlns:xsd="&lt;a href="http://www.w3.org/2001/XMLSchema""&gt;http://www.w3.org/2001/XMLSchema"&lt;/a&gt; xmlns:soap="&lt;a href="http://schemas.xmlsoap.org/soap/envelope/"&gt;"&gt;http://schemas.xmlsoap.org/soap/envelope/"&gt;&lt;/a&gt;<br/>  &lt;soap:Body&gt;<br/>    &lt;GetSecretResponse xmlns="urn:thesecretserver.com"&gt;<br/>      &lt;GetSecretResult&gt;<br/>        &lt;Errors&gt;<br/>          &lt;string&gt;string&lt;/string&gt;<br/>          &lt;string&gt;string&lt;/string&gt;<br/>        &lt;/Errors&gt;<br/>        &lt;Secret&gt;<br/>          &lt;Name&gt;string&lt;/Name&gt;<br/>          &lt;Items&gt;<br/>            &lt;SecretItem xsi:nil="true" /&gt;<br/>            &lt;SecretItem xsi:nil="true" /&gt;<br/>          &lt;/Items&gt;<br/>          &lt;Id&gt;int&lt;/Id&gt;<br/>          &lt;SecretTypeId&gt;int&lt;/SecretTypeId&gt;<br/>          &lt;FolderId&gt;int&lt;/FolderId&gt;<br/>          &lt;IsWebLauncher&gt;boolean&lt;/IsWebLauncher&gt;<br/>        &lt;/Secret&gt;<br/>      &lt;/GetSecretResult&gt;<br/>    &lt;/GetSecretResponse&gt;<br/>  &lt;/soap:Body&gt;<br/>&lt;/soap:Envelope&gt;<br/>          <br/><br/>          <br/>              SOAP 1.2<br/>              <br/>The following is a sample SOAP 1.2 request and response.  The placeholders shown need to be replaced with actual values.<br/><br/>              POST /ss/webservices/sswebservice.asmx HTTP/1.1<br/>Host: secretserver.transurban.com<br/>Content-Type: application/soap+xml; charset=utf-8<br/>Content-Length: length<br/><br/>&lt;?xml version="1.0" encoding="utf-8"?&gt;<br/>&lt;soap12:Envelope xmlns:xsi="&lt;a href="http://www.w3.org/2001/XMLSchema-instance""&gt;http://www.w3.org/2001/XMLSchema-instance"&lt;/a&gt; xmlns:xsd="&lt;a href="http://www.w3.org/2001/XMLSchema""&gt;http://www.w3.org/2001/XMLSchema"&lt;/a&gt; xmlns:soap12="&lt;a href="http://www.w3.org/2003/05/soap-envelope"&gt;"&gt;http://www.w3.org/2003/05/soap-envelope"&gt;&lt;/a&gt;<br/>  &lt;soap12:Body&gt;<br/>    &lt;GetSecret xmlns="urn:thesecretserver.com"&gt;<br/>      &lt;token&gt;string&lt;/token&gt;<br/>      &lt;secretId&gt;int&lt;/secretId&gt;<br/>    &lt;/GetSecret&gt;<br/>  &lt;/soap12:Body&gt;<br/>&lt;/soap12:Envelope&gt;<br/><br/>              HTTP/1.1 200 OK<br/>Content-Type: application/soap+xml; charset=utf-8<br/>Content-Length: length<br/><br/>&lt;?xml version="1.0" encoding="utf-8"?&gt;<br/>&lt;soap12:Envelope xmlns:xsi="&lt;a href="http://www.w3.org/2001/XMLSchema-instance""&gt;http://www.w3.org/2001/XMLSchema-instance"&lt;/a&gt; xmlns:xsd="&lt;a href="http://www.w3.org/2001/XMLSchema""&gt;http://www.w3.org/2001/XMLSchema"&lt;/a&gt; xmlns:soap12="&lt;a href="http://www.w3.org/2003/05/soap-envelope"&gt;"&gt;http://www.w3.org/2003/05/soap-envelope"&gt;&lt;/a&gt;<br/>  &lt;soap12:Body&gt;<br/>    &lt;GetSecretResponse xmlns="urn:thesecretserver.com"&gt;<br/>      &lt;GetSecretResult&gt;<br/>        &lt;Errors&gt;<br/>          &lt;string&gt;string&lt;/string&gt;<br/>          &lt;string&gt;string&lt;/string&gt;<br/>        &lt;/Errors&gt;<br/>        &lt;Secret&gt;<br/>          &lt;Name&gt;string&lt;/Name&gt;<br/>          &lt;Items&gt;<br/>            &lt;SecretItem xsi:nil="true" /&gt;<br/>            &lt;SecretItem xsi:nil="true" /&gt;<br/>          &lt;/Items&gt;<br/>          &lt;Id&gt;int&lt;/Id&gt;<br/>          &lt;SecretTypeId&gt;int&lt;/SecretTypeId&gt;<br/>          &lt;FolderId&gt;int&lt;/FolderId&gt;<br/>          &lt;IsWebLauncher&gt;boolean&lt;/IsWebLauncher&gt;<br/>        &lt;/Secret&gt;<br/>      &lt;/GetSecretResult&gt;<br/>    &lt;/GetSecretResponse&gt;<br/>  &lt;/soap12:Body&gt;<br/>&lt;/soap12:Envelope&gt;<br/>          <br/><br/>          <br/>              HTTP GET<br/>              <br/>The following is a sample HTTP GET request and response.  The placeholders shown need to be replaced with actual values.<br/><br/>              GET /ss/webservices/sswebservice.asmx/GetSecret?token=string&amp;secretId=string HTTP/1.1<br/>Host: secretserver.transurban.com<br/><br/><br/>              HTTP/1.1 200 OK<br/>Content-Type: text/xml; charset=utf-8<br/>Content-Length: length<br/><br/>&lt;?xml version="1.0" encoding="utf-8"?&gt;<br/>&lt;GetSecretResult xmlns="urn:thesecretserver.com"&gt;<br/>  &lt;Errors&gt;<br/>    &lt;string&gt;string&lt;/string&gt;<br/>    &lt;string&gt;string&lt;/string&gt;<br/>  &lt;/Errors&gt;<br/>  &lt;Secret&gt;<br/>    &lt;Name&gt;string&lt;/Name&gt;<br/>    &lt;Items&gt;<br/>      &lt;SecretItem&gt;<br/>        &lt;Value&gt;string&lt;/Value&gt;<br/>        &lt;Id&gt;int&lt;/Id&gt;<br/>        &lt;FieldId&gt;int&lt;/FieldId&gt;<br/>        &lt;FieldName&gt;string&lt;/FieldName&gt;<br/>        &lt;IsFile&gt;boolean&lt;/IsFile&gt;<br/>        &lt;IsNotes&gt;boolean&lt;/IsNotes&gt;<br/>        &lt;IsPassword&gt;boolean&lt;/IsPassword&gt;<br/>        &lt;FieldDisplayName&gt;string&lt;/FieldDisplayName&gt;<br/>      &lt;/SecretItem&gt;<br/>      &lt;SecretItem&gt;<br/>        &lt;Value&gt;string&lt;/Value&gt;<br/>        &lt;Id&gt;int&lt;/Id&gt;<br/>        &lt;FieldId&gt;int&lt;/FieldId&gt;<br/>        &lt;FieldName&gt;string&lt;/FieldName&gt;<br/>        &lt;IsFile&gt;boolean&lt;/IsFile&gt;<br/>        &lt;IsNotes&gt;boolean&lt;/IsNotes&gt;<br/>        &lt;IsPassword&gt;boolean&lt;/IsPassword&gt;<br/>        &lt;FieldDisplayName&gt;string&lt;/FieldDisplayName&gt;<br/>      &lt;/SecretItem&gt;<br/>    &lt;/Items&gt;<br/>    &lt;Id&gt;int&lt;/Id&gt;<br/>    &lt;SecretTypeId&gt;int&lt;/SecretTypeId&gt;<br/>    &lt;FolderId&gt;int&lt;/FolderId&gt;<br/>    &lt;IsWebLauncher&gt;boolean&lt;/IsWebLauncher&gt;<br/>  &lt;/Secret&gt;<br/>&lt;/GetSecretResult&gt;<br/>          <br/><br/>          <br/>              HTTP POST<br/>              <br/>The following is a sample HTTP POST request and response.  The placeholders shown need to be replaced with actual values.<br/><br/>              POST /ss/webservices/sswebservice.asmx/GetSecret HTTP/1.1<br/>Host: secretserver.transurban.com<br/>Content-Type: application/x-www-form-urlencoded<br/>Content-Length: length<br/><br/>token=string&amp;secretId=string<br/><br/>              HTTP/1.1 200 OK<br/>Content-Type: text/xml; charset=utf-8<br/>Content-Length: length<br/><br/>&lt;?xml version="1.0" encoding="utf-8"?&gt;<br/>&lt;GetSecretResult xmlns="urn:thesecretserver.com"&gt;<br/>  &lt;Errors&gt;<br/>    &lt;string&gt;string&lt;/string&gt;<br/>    &lt;string&gt;string&lt;/string&gt;<br/>  &lt;/Errors&gt;<br/>  &lt;Secret&gt;<br/>    &lt;Name&gt;string&lt;/Name&gt;<br/>    &lt;Items&gt;<br/>      &lt;SecretItem&gt;<br/>        &lt;Value&gt;string&lt;/Value&gt;<br/>        &lt;Id&gt;int&lt;/Id&gt;<br/>        &lt;FieldId&gt;int&lt;/FieldId&gt;<br/>        &lt;FieldName&gt;string&lt;/FieldName&gt;<br/>        &lt;IsFile&gt;boolean&lt;/IsFile&gt;<br/>        &lt;IsNotes&gt;boolean&lt;/IsNotes&gt;<br/>        &lt;IsPassword&gt;boolean&lt;/IsPassword&gt;<br/>        &lt;FieldDisplayName&gt;string&lt;/FieldDisplayName&gt;<br/>      &lt;/SecretItem&gt;<br/>      &lt;SecretItem&gt;<br/>        &lt;Value&gt;string&lt;/Value&gt;<br/>        &lt;Id&gt;int&lt;/Id&gt;<br/>        &lt;FieldId&gt;int&lt;/FieldId&gt;<br/>        &lt;FieldName&gt;string&lt;/FieldName&gt;<br/>        &lt;IsFile&gt;boolean&lt;/IsFile&gt;<br/>        &lt;IsNotes&gt;boolean&lt;/IsNotes&gt;<br/>        &lt;IsPassword&gt;boolean&lt;/IsPassword&gt;<br/>        &lt;FieldDisplayName&gt;string&lt;/FieldDisplayName&gt;<br/>      &lt;/SecretItem&gt;<br/>    &lt;/Items&gt;<br/>    &lt;Id&gt;int&lt;/Id&gt;<br/>    &lt;SecretTypeId&gt;int&lt;/SecretTypeId&gt;<br/>    &lt;FolderId&gt;int&lt;/FolderId&gt;<br/>    &lt;IsWebLauncher&gt;boolean&lt;/IsWebLauncher&gt;<br/>  &lt;/Secret&gt;<br/>&lt;/GetSecretResult&gt;<br/>          <br/><br/>      <br/>      <br/><br/>    <br/>    <br/>      <br/><br/>      <br/><br/>    <br/>  <br/><br/><br/>I tried operation "Authenticate" but same no reponse for node value "token".<br/><br/>Kindly advise.<br/><br/>Many thanks,<br/>Ameya]]></description>
<pubDate>Fri, 30 Sep 2011 17:33:26 GMT</pubDate>
</item>
<item>
<link>http://www.thycotic.com/forums/messages.aspx?TopicID=393</link>
<title>Message from david c</title>
<description><![CDATA[Hi Ameya,<br/><br/>There are many ways of fetching Secret Server data through webservices. Perl, PowerShell, .NET, etc.<br/><br/>Curl can definitely be used.<br/>You pass the secretId like so:<br/><br/>curl -v --url "&lt;a href="http://our-secret-server-url/sswebservices/sswebservice.asmx?op=GetSecret&secretId=1""&gt;http://our-secret-server-url/sswebservices/sswebservice.asmx?op=GetSecret&secretId=1"&lt;/a&gt; --user "username:password"<br/><br/>The result will be XML.<br/><br/>If you want only specific information from the XML you will need to parse it or deserialize it to an object and fetch the value from the object.<br/><br/>You can find various examples in our Knowledge Base. For example, this post uses Perl: &lt;a href="http://support.thycotic.com/KB/a86/accessing-secret-server-programmatically-perl-sample-script.aspx"&gt;http://support.thycotic.com/KB/a86/accessing-secret-server-programmatically-perl-sample-script.aspx&lt;/a&gt;]]></description>
<pubDate>Fri, 30 Sep 2011 11:07:54 GMT</pubDate>
</item>
<item>
<link>http://www.thycotic.com/forums/messages.aspx?TopicID=393</link>
<title>Message from Ameya A</title>
<description><![CDATA[Hi, <br/><br/>Our organization is using seceret server version Version: 7.1.000015.<br/><br/>What I want is to retieve secrets but through command line.<br/><br/>Input secretId, username & password.<br/><br/>Output:*For any template* I want field value of userName and Password*<br/><br/><br/>curl -v --url "&lt;a href="https://our-seceret-server-webservices-url/ss/webservices/sswebservice.asmx?op=GetSecret""&gt;https://our-seceret-server-webservices-url/ss/webservices/sswebservice.asmx?op=GetSecret"&lt;/a&gt; --user "username:password"<br/><br/>Firstly is curl the right way or should I use any other tool?<br/><br/>If curl is right way how can give secret id while passing through url?<br/><br/>Let say I want secretId 0001 to be fetched what should be my input url?<br/>curl -v --url "&lt;a href="https://our-seceret-server-webservices-url/ss/webservices/sswebservice.asmx?op=GetSecret""&gt;https://our-seceret-server-webservices-url/ss/webservices/sswebservice.asmx?op=GetSecret"&lt;/a&gt; --user "username:password"<br/><br/>Please assist here.<br/>Many Thanks,<br/>Ameya]]></description>
<pubDate>Fri, 30 Sep 2011 10:04:09 GMT</pubDate>
</item>
</channel>
</rss>
