All Apps and Add-ons

Exception : clear_password

gate6splunk
Observer

Hello, 

I am using the Storage Password mechanism to store important keys and passwords used in App. password.conf file generated properly from sdk.

While decrypting passwords to use in the app, not getting a clear_password by the Splunk Storage Password mechanism, Just getting an error clear_password
Piece of code which is not working is given below, using app on 8.0.8 version of Splunk Enterprise:

 

 

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

 

 

 

 

Any suggestions 

Labels (2)
0 Karma
Get Updates on the Splunk Community!

Unlock New Opportunities with Splunk Education: Explore Our Latest Courses!

At Splunk Education, we’re dedicated to providing top-tier learning experiences that cater to every skill ...

Technical Workshop Series: Splunk Data Management and SPL2 | Register here!

Hey, Splunk Community! Ready to take your data management skills to the next level? Join us for a 3-part ...

Spotting Financial Fraud in the Haystack: A Guide to Behavioral Analytics with Splunk

In today's digital financial ecosystem, security teams face an unprecedented challenge. The sheer volume of ...