All Apps and Add-ons

How to retrieve password from storage/passwords?

mohitthapar
New Member

I've created a setup page for my app. Code is below:

<setup>
<block title="Enter the credentials for your app" endpoint="storage/passwords" entity="_new">
<input field="name">
    <label>Username</label>
    <type>text</type>
  </input>

  <input field="password">
    <label>Password</label>
    <type>password</type>
  </input>
</block>
</setup>

Through this code I'm able to store the password in encrypted format and I can see the passwords.conf in local folder. But whenever I'm opening the setup page again it's coming as blank and If I'm entering a new credentials it stores the new credential in passwords.conf. I want that after entering and saving the credentials whenever a user opens the setup page again it should display the saved username and password(password as *******).

0 Karma

kurdbahr
Path Finder

I had the same problem with my modular alert action and the best solution I could find so far is to add a second block for changing the existing stored credentials:

  <block title="Change credentials" endpoint="storage/passwords"  entity="*" mode="iter">
        <input field="password">
            <label>Password for $name$</label>
            <type>password</type>
        </input>
  </block>

See also: https://docs.splunk.com/Documentation/Splunk/latest/Admin/Setup.xmlconf

0 Karma
Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...