Python Forum
need some help to do Vault authentication using python
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
need some help to do Vault authentication using python
#1
My code is working good if hardcode username, password. But i have to use Vault getmysecret authentication. Can anyone advise how i can use in python.

def call_api_get_total_record_count(url, username, password):
response = requests.get(url, auth=(username, password), headers=headers, params=parameters)

Following is the response i am getting from vault:
{{\"request_id\":\"dbfea663-af74-15d1-60e3-41289f53be00\",\"lease_id\":\"\",\"renewable\":false,\"lease_duration\":28800,\"data\":{\"APPNAME_PASSWORD\":\"XXXXXXX\",\"APPNAME_USERNAME\":\"XXXXX\"},\"wrap_info\":null,\"warnings\":null,\"auth\":null}\n\r\n}
Please let me know if i can use any python library to accumaulate request_id vault_token instead username and password.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  REST API x.509 authentication crossover 1 2,355 Feb-15-2022, 12:21 AM
Last Post: snippsat
  user authentication in python saurabhc 1 19,183 Sep-15-2019, 11:59 AM
Last Post: jefsummers
  Finger Vein Authentication Package in Python SudiptaGhosh 1 3,423 Sep-20-2017, 12:01 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020