I’m currently working with environment variables in Postman, specifically aws_access_key_id, X-Amz-Security-Token, and aws_secret_access_key. These credentials are dynamic and refresh every 4 hours.
They are also saved locally on my machine in a file located at: C:\Program Files\Amazon\awstoken.txt
Is there a way to configure Postman to automatically read and update these environment variables directly from this local text file?
Thank you in advance for your support and suggestions!
Short answer is no, as Postman has very limited access to the underlying file system.
Longer answer is maybe depending on your setup.
Confidential information should ideally be in some sort of key vault. Postman has its own local vault that you should be storing this information in. The Postman vault also has the ability to pull information directly from third party vaults like Azure Keyvault. So you can point your local vault to a central vault.
This then keeps these “secrets” fully encrypted at all times.
You could also consider using Newman as a node application. This allows you to use other libraries including the fs library but you will need to have a good knowledge of node.js and JavaScript to consider that option.
Another option is to use a pipeline and pass this information through as an initial step in the pipeline calling either Newman or the New Postman CLI.