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
  SharePoint Online/365 authentication using .cer file mart79 0 626 Nov-08-2020, 03:31 PM
Last Post: mart79
  unable to generate authentication key lokamaba 0 795 May-14-2020, 12:33 PM
Last Post: lokamaba
  user authentication in python saurabhc 1 1,068 Sep-15-2019, 11:59 AM
Last Post: jefsummers
  authentication required error with urlopen Ranjirock 2 1,286 Sep-11-2019, 01:01 PM
Last Post: Ranjirock
  Finger Vein Authentication Package in Python SudiptaGhosh 1 2,476 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