From the course: Python: Pen Testing AWS
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Managing secrets using Python - Python Tutorial
From the course: Python: Pen Testing AWS
Managing secrets using Python
- [Instructor] We've already seen how we can access the IAM service in Python. So now let's see how we can programmatically interact with the secrets manager. We can see here the range of methods available through the secrets manager API. We'll start with our standard program frame, nano starter dot py minus L and I'll add a session handle using boto 3 dot session and I'll use the default profile and we don't need a region. I'll request to client of the secrets manager service. Let's start by listing the secrets in the account. I haven't added any so this will be an empty list, print secrets and then S E C L I S T set list equals S M dot list secrets. And we'll pretty print dot pretty print seclist. Okay, now let's get a randomly constructed password and list out the Jason structure which we get back. P W D equals S M dot get random password and we'll requested password length of 16. We'll print random, we'll do a…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
(Locked)
Taking a first look at the Python boto3 AWS library3m 19s
-
(Locked)
Enumerating policies2m 4s
-
(Locked)
Adding sessions to your Python scripts2m 6s
-
(Locked)
Checking for guards2m 38s
-
(Locked)
Managing IAM programmatically2m 44s
-
(Locked)
Creating users programmatically2m 28s
-
(Locked)
Managing secrets using Python3m 42s
-
(Locked)
Listing all EC2 instances7m 6s
-
(Locked)
Listing all RDS instances3m 36s
-
(Locked)
Challenge1m 15s
-
(Locked)
Solution42s
-
(Locked)
-
-
-