My request consists of username and password which I want to keep safely what is best way to do that.
Postman secret Vault works only locally , I want to execute my script in cloud and use Newman CLI for execution.
You use environment variables and you pass the username and password as variables in the Newman command line.
What CI tool are you using for executing the Newman command line, as its the CI capabilities that will determine the best way of doing this.
For example, if you are using Azure Pipelines, you would store the secrets in an Azure key vault, and retrieve them as an early step in the pipeline before calling the Newman command line.
Thanks Mike , I am using AWS, I would like to retrieve it from AWS secret Manager, would you please provide an example so that I can implement likewise.
I don’t use Newman a lot, so I don’t have a ready made example.
All you should need to do is retrieve the username and password from the AWS secret manager, and then pass those details to the Newman command line.
You need to use an Environment for your run, and then pass those details as environment variables.
Customize a collection run using Newman command options | Postman Learning Center
Thanks Mike ,
Hi
Can anyone else provide me an example , I am little confused of how do I retrieve the username and password from the AWS secret manager. It would be very helpful if any insight with example provided.
Secondly can I use postman request to accomplish the same .
What are you using as your continuous integration (CI) tool.
As this is what will be controlling your pipeline.
Are you actually using one?
If not, then I guess you could use something like PowerShell to mimic a pipeline but that adds a whole new level of complexity.
The AWS secret manager will have its own API, that you use to retrieve the secrets. You would need to read the documentation for that service to see all of the authentication options.
With Azure Pipeline and Azure Key vault, it uses service principals to run the job. The service principal has permissions to the key vault, and there is a direct integration between the two so you don’t have to worry about usernames, passwords or client secrets for authentication. You can just consume the API directly (and securely). I don’t know if the AWS secret manager has similar features, and it will rely heavily on what your CI tool can support.
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.