Creating ESA Credentials
Policy Agent Function requires ESA credentials to be provided as one of the two options:
Note
The username and password of the ESA user requires role with DPS Admin and Export Certificates permissions. Security Administrator is one of the predefined roles which contains the above permissions, however for separation of duties it is recommended to create custom role.Secret Manager
Secret Manager is the recommended option for storing ESA credentials.
Create ESA credentials secrets:
Log in to Google Account and select project where Protegrity service will be installed.
Go to Security > Secret Manager.
Select CREATE SECRET.
Specify the Secret Value:
{ "username": "{esa_username}", "password": "{esa_password}" }Select Create Secret.
Once the secret is created, you should see the secret screen opened. If not click on the secret name to see a screen with secret versions.
Click on Actions, next to the secret version you just created.
Select Copy Resource ID and record the full secret version path, For example, projects/{project-id}/secrets/{secret name}/versions/2.
Secret resource id: ___________________
Custom Cloud Function
If you have the skills to write code, you may provide a custom Cloud Function that returns the ESA credentials to the Policy Agent. One use case is when reading the ESA credentials from a third-party password vault.
Create the Cloud Function:
Create a new 2nd gen Cloud Function using any runtime.
The Policy Agent does not provide an input payload.
The Cloud Function must return a response according to the following schema:
response: type: object properties: username: string password: stringFor example,
example output: {"username": "admin", "password": "Password1234"}Sample GCP Function in Python:
def handler(request): return {"username": "admin", "password": "password1234"}Warning
Protegrity does not recommend hardcoding ESA password in the clear.
Grant the Cloud Run Invoker role to the Policy Agent function service account.
Grant the cloudfunctions.functions.get permission to the Policy Agent function service account role.
Record the Function name:
ESA CREDENTIALS FUNCTION NAME: _______________
Feedback
Was this page helpful?