Secrets Manager

(1 review)

Getting Started

Prerequisite

User needs to have secrets manager specific roles and permissions from access management to access this service.

Example

Lets consider the flow of events when user wants to add a shared secret of type username/password.

Create secret group

curl -k -X POST -H "Authorization:Bearer ${user_access_token}" https://anypoint.mulesoft.com/secrets-manager/api/v1/organizations/{orgId}/environments/{envId}/secretGroups --data '{ "name": "test-stateā€ }' -H "Content-Type: application/json"

Get lock

curl -k -X PUT -H "Authorization:Bearer ${user_access_token}" https://anypoint.mulesoft.com/secrets-manager/api/v1/organizations/{orgId}/environments/{envId}/secretGroups/{secretGpId}/lock -H "Content-Type: application/jsonā€

Add new secret

curl -v -k -X POST -H "Authorization:Bearer ${user_access_token}" https://anypoint.mulesoft.com/secrets-manager/api/v1/organizations/{orgId}/environments/{envId}/secretGroups/{secretGpId}/sharedSecrets --data @shared_secret.json -H "Content-Type: application/jsonā€

shared_secret.json

{ "name": ā€œtest-ss","type": "UsernamePassword","username": "testuser","password": "passwdā€, "expirationDate": "2020-12-12ā€ }

Release lock

curl -k -X DELETE -H "Authorization:Bearer ${user_access_token}" https://anypoint.mulesoft.com/secrets-manager/api/v1/organizations/{orgId}/environments/{envId}/secretGroups/{secretGpId}/lock -H "Content-Type: application/jsonā€

Reviews