Closed
Description
Hi,
I know it's more likely a feature and not a bug. But I was wondering why is StoragePasswords is protected from access with wildcard apps or namespace, when the same action using rest is not protected ?
The first snippet will generate an error because app & owner are set to be wildcards
s = client.connect(username="<user>", password="<redacted>",host="<ip>",port="<port>",app="-",owner="-")
try:
for pw in s.storage_passwords:
print(pw.username)
except ValueError as ve:
print(ve)
The following snippet will not generate an error with the wildcards :
req = requests.get(f"https://<host>:<port>/servicesNS/-/-/storage/passwords/", verify=False, headers={'Authorization': s.token},data={'output_mode':"json"})
req.raise_for_status()
for pw in req.json().get("entry"):
print(pw.get("content").get("username"))
In our workflow with Splunk, we might not know where is stored the password so we need to be able to use wildcard on the app level of the namespace.
Is there any solution with splunklib or should we stick with our basic requests ?
Metadata
Metadata
Assignees
Labels
No labels