<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How to access encrypted credentials (API: storage/passwords) from modular input script in Getting Data In</title>
    <link>https://community.splunk.com/t5/Getting-Data-In/How-to-access-encrypted-credentials-API-storage-passwords-from/m-p/145690#M29700</link>
    <description>&lt;P&gt;Currently you would need to write some custom code in the Modular Input to access the stored credentials as per the link Hal posted as the encryption/decryption of password fields is not handled within the Modular Inputs framework currently (but it would be a nice feature to have)&lt;/P&gt;</description>
    <pubDate>Mon, 30 Mar 2015 10:09:13 GMT</pubDate>
    <dc:creator>Damien_Dallimor</dc:creator>
    <dc:date>2015-03-30T10:09:13Z</dc:date>
    <item>
      <title>How to access encrypted credentials (API: storage/passwords) from modular input script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-access-encrypted-credentials-API-storage-passwords-from/m-p/145684#M29694</link>
      <description>&lt;P&gt;I am writing a modular input Python script, and need to access encrypted credentials.&lt;BR /&gt;
How to do it?&lt;/P&gt;

&lt;P&gt;If I have a cherrypy sessionkey (and other API data), I could do an REST API request.&lt;BR /&gt;
I tried to understand how it was done in DBConnect app, but I didn't get the idea.&lt;/P&gt;</description>
      <pubDate>Tue, 30 Sep 2014 13:08:00 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-access-encrypted-credentials-API-storage-passwords-from/m-p/145684#M29694</guid>
      <dc:creator>lukasz92</dc:creator>
      <dc:date>2014-09-30T13:08:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to access encrypted credentials (API: storage/passwords) from modular input script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-access-encrypted-credentials-API-storage-passwords-from/m-p/145685#M29695</link>
      <description>&lt;P&gt;The REST session key is passed to the Mod Input runtime at invocation via STDIN in an XML document in the session_key element :&lt;/P&gt;

&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="alt text"&gt;&lt;img src="https://community.splunk.com/t5/image/serverpage/image-id/95iC329270D84786162/image-size/large?v=v2&amp;amp;px=999" role="button" title="alt text" alt="alt text" /&gt;&lt;/span&gt;&lt;/P&gt;

&lt;P&gt;&lt;A href="https://github.com/damiendallimore/SplunkModularInputsPythonFramework/blob/master/implementations/rest/bin/rest.py"&gt;Have a look at this code&lt;/A&gt; to see how I obtained the session key and used it to do a rest callback (Just search the source for "session_key" and follow the logic).&lt;/P&gt;</description>
      <pubDate>Wed, 01 Oct 2014 09:41:58 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-access-encrypted-credentials-API-storage-passwords-from/m-p/145685#M29695</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2014-10-01T09:41:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to access encrypted credentials (API: storage/passwords) from modular input script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-access-encrypted-credentials-API-storage-passwords-from/m-p/145686#M29696</link>
      <description>&lt;P&gt;Damien - &lt;/P&gt;

&lt;P&gt;two follow up questions to this...&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;how do you encrypt the credentials in the first place (using python)?&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;i've got password (among other vars) stored in a local/input.conf in the clear which i'd like to encrypt using splunk's server key.  i have my .xml setup page, custom input.conf.spec written, and modular input script all working - just need to encrypt the password now.&lt;/P&gt;

&lt;OL&gt;
&lt;LI&gt;how do i force the "inputs.conf" to be written into my local app once created in modular inputs instead of going to the default search/local directory?&lt;/LI&gt;
&lt;/OL&gt;</description>
      <pubDate>Thu, 26 Mar 2015 06:41:18 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-access-encrypted-credentials-API-storage-passwords-from/m-p/145686#M29696</guid>
      <dc:creator>awurster</dc:creator>
      <dc:date>2015-03-26T06:41:18Z</dc:date>
    </item>
    <item>
      <title>Re: How to access encrypted credentials (API: storage/passwords) from modular input script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-access-encrypted-credentials-API-storage-passwords-from/m-p/145687#M29697</link>
      <description>&lt;OL&gt;
&lt;LI&gt;You can use setup.xml w/input field type "password" to have Splunk do the encryption (&lt;A href="http://blogs.splunk.com/2011/03/15/storing-encrypted-credentials/"&gt;see this old example&lt;/A&gt;). &lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;Note that this technique does not work across systems, as the splunk server key is unique per system. So, in a SHC for example, this might be a problem. Otherwise, you could use Python or whatever to do the encryption using another technique, but then you have to do more work yourself. &lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2015 17:46:53 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-access-encrypted-credentials-API-storage-passwords-from/m-p/145687#M29697</guid>
      <dc:creator>halr9000</dc:creator>
      <dc:date>2015-03-26T17:46:53Z</dc:date>
    </item>
    <item>
      <title>Re: How to access encrypted credentials (API: storage/passwords) from modular input script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-access-encrypted-credentials-API-storage-passwords-from/m-p/145688#M29698</link>
      <description>&lt;P&gt;thanks hal.  is it possible to combine this approach with modular inputs however?&lt;/P&gt;

&lt;P&gt;i am using inputs.conf.spec and modinput.xml to control setup and config values, rather than the setup.xml you mentioned.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/ModInputsSpec"&gt;http://docs.splunk.com/Documentation/Splunk/latest/AdvancedDev/ModInputsSpec&lt;/A&gt;&lt;/P&gt;

&lt;P&gt;i have the following in my modinput.xml:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&amp;lt;element name="password" type="password" label="Password"&amp;gt;
  &amp;lt;view name="edit"/&amp;gt;
  &amp;lt;view name="create"/&amp;gt;
  &amp;lt;key name="exampleText"&amp;gt;Password of the account to authenticate with (i.e. 'Abc123!').  This gets obfuscated using the built-in Splunk auth facilities. No Defaults.&amp;lt;/key&amp;gt;
&amp;lt;/element&amp;gt;
&lt;/CODE&gt;&lt;/PRE&gt;

&lt;P&gt;can i make it work with the modular inputs config approach??&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2015 23:12:07 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-access-encrypted-credentials-API-storage-passwords-from/m-p/145688#M29698</guid>
      <dc:creator>awurster</dc:creator>
      <dc:date>2015-03-26T23:12:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to access encrypted credentials (API: storage/passwords) from modular input script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-access-encrypted-credentials-API-storage-passwords-from/m-p/145689#M29699</link>
      <description>&lt;P&gt;Regarding the inputs.conf directory...ensure that you browse to the "Data Inputs" page within the context of your target app , and not the search app.&lt;/P&gt;

&lt;P&gt;ie:&lt;/P&gt;

&lt;PRE&gt;&lt;CODE&gt;&lt;A href="http://localhost:8000/en-US/manager/YOURAPPNAME/datainputstats" target="test_blank"&gt;http://localhost:8000/en-US/manager/YOURAPPNAME/datainputstats&lt;/A&gt;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 30 Mar 2015 10:05:03 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-access-encrypted-credentials-API-storage-passwords-from/m-p/145689#M29699</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2015-03-30T10:05:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to access encrypted credentials (API: storage/passwords) from modular input script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-access-encrypted-credentials-API-storage-passwords-from/m-p/145690#M29700</link>
      <description>&lt;P&gt;Currently you would need to write some custom code in the Modular Input to access the stored credentials as per the link Hal posted as the encryption/decryption of password fields is not handled within the Modular Inputs framework currently (but it would be a nice feature to have)&lt;/P&gt;</description>
      <pubDate>Mon, 30 Mar 2015 10:09:13 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-access-encrypted-credentials-API-storage-passwords-from/m-p/145690#M29700</guid>
      <dc:creator>Damien_Dallimor</dc:creator>
      <dc:date>2015-03-30T10:09:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to access encrypted credentials (API: storage/passwords) from modular input script</title>
      <link>https://community.splunk.com/t5/Getting-Data-In/How-to-access-encrypted-credentials-API-storage-passwords-from/m-p/145691#M29701</link>
      <description>&lt;P&gt;hey @Damien Dallimore - similar question.. but this time for a django-based app.  anyway we can easily save credentials in encrypted if using django?&lt;/P&gt;

&lt;P&gt;the following example discussed masking the passwords to the end-user for display, but does not encrypt in-file.&lt;/P&gt;

&lt;P&gt;&lt;A href="http://dev.splunk.com/view/webframework-djangobindings/SP-CAAAETW"&gt;http://dev.splunk.com/view/webframework-djangobindings/SP-CAAAETW&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 15 Apr 2015 02:57:02 GMT</pubDate>
      <guid>https://community.splunk.com/t5/Getting-Data-In/How-to-access-encrypted-credentials-API-storage-passwords-from/m-p/145691#M29701</guid>
      <dc:creator>awurster</dc:creator>
      <dc:date>2015-04-15T02:57:02Z</dc:date>
    </item>
  </channel>
</rss>

