<?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 Exception : clear_password in All Apps and Add-ons</title>
    <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Exception-clear-password/m-p/564405#M74987</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am using the Storage Password mechanism to store important keys and passwords used in App. password.conf file generated properly from sdk.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;While decrypting passwords to use in the app, not getting a clear_password by the Splunk Storage Password mechanism, Just getting an error &lt;STRONG&gt;clear_password&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Piece of code which is not working is given below, using app on 8.0.8 version of Splunk&amp;nbsp;Enterprise:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;def get_passwords(app):
    '''Retrieve the user's API keys from Storage/Passwords'''
    pwd_dict = {}
    try:
        sessionKey = sys.stdin.readline().strip()
        # list all credentials
        entities = entity.getEntities(['storage', 'passwords'], namespace=app,
                                     owner='nobody', sessionKey=sessionKey)
        # # return set of credentials
        
        for i, c in entities.items():
            pwd_dict[c['username']] = c['clear_password']

        
    except Exception as e:
        #Here got Exception clear_password
        raise Exception("Could not get %s passwords from storage. Error: %s" % (app, str(e)))
    
    return pwd_dict&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 23 Aug 2021 18:35:25 GMT</pubDate>
    <dc:creator>gate6splunk</dc:creator>
    <dc:date>2021-08-23T18:35:25Z</dc:date>
    <item>
      <title>Exception : clear_password</title>
      <link>https://community.splunk.com/t5/All-Apps-and-Add-ons/Exception-clear-password/m-p/564405#M74987</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I am using the Storage Password mechanism to store important keys and passwords used in App. password.conf file generated properly from sdk.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;While decrypting passwords to use in the app, not getting a clear_password by the Splunk Storage Password mechanism, Just getting an error &lt;STRONG&gt;clear_password&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Piece of code which is not working is given below, using app on 8.0.8 version of Splunk&amp;nbsp;Enterprise:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;def get_passwords(app):
    '''Retrieve the user's API keys from Storage/Passwords'''
    pwd_dict = {}
    try:
        sessionKey = sys.stdin.readline().strip()
        # list all credentials
        entities = entity.getEntities(['storage', 'passwords'], namespace=app,
                                     owner='nobody', sessionKey=sessionKey)
        # # return set of credentials
        
        for i, c in entities.items():
            pwd_dict[c['username']] = c['clear_password']

        
    except Exception as e:
        #Here got Exception clear_password
        raise Exception("Could not get %s passwords from storage. Error: %s" % (app, str(e)))
    
    return pwd_dict&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Any suggestions&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 23 Aug 2021 18:35:25 GMT</pubDate>
      <guid>https://community.splunk.com/t5/All-Apps-and-Add-ons/Exception-clear-password/m-p/564405#M74987</guid>
      <dc:creator>gate6splunk</dc:creator>
      <dc:date>2021-08-23T18:35:25Z</dc:date>
    </item>
  </channel>
</rss>

