Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

improv: only allow pm.vault.get and pm.vault.set to access vault secrets in scripts #1038

Conversation

Pranav2612000
Copy link
Contributor

What does this change do?

  • Updates the pm.vault export to only support get and set methods in scripts in sandbox
  • Remove the layer of vaultSecrets from pm.variables

How is this done?

  • For only supporting get and set options, instead of exporting pm.vault as the VariableScope of vault secrets, we export pm.vault as a new object which only supports the get and set method. These methods internally call the VariableScope methods.
  • For removing vault secrets from variables, we simply remove the line adding vault secrets to the variable layer

How is this change tested

  • Added/Updated unit tests for the following scenarios
    • pm.vault only has get and set methods
    • pm.variables does not include vault secrets

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant