Creating an approval email template using the CLI
To create an approval email template:
- In the CLI console, use the following commands:
config secret approval-email-template edit "test-template" set subject "User %%USER%% has requested access to secret %%SECRET_ID%%" set content "TEST EMAIL Approval url: %%APPROVAL_URL%% Request id: %%REQUEST_ID%% Secret url: %%SECRET_URL%% Secret id: %%SECRET_ID%% Secret name: %%SECRET_NAME%% Job name: %%JOB_NAME%% Start time: %%START_TIME%% End time: %%END_TIME%% Hostname: %%HOSTNAME%% User: %%USER%% " next end
Variable
Description
%%TYPE%%
launcher
orjob
depending on the type of the request.%%APPROVAL_URL%%
The URL to access the secret approval page to approve/deny the request.
%%REQUEST_ID%%
The request ID in the configuration management database.
%%SECRET_URL%%
The URL to access secret information.
%%SECRET_ID%%
The secret ID in the configuration management database.
%%SECRET_NAME%%
The name of the secret.
%%JOB_NAME%%
The name of the job (empty for a secret request).
%%START_TIME%%
The time allowed to begin launching the secret or the earliest execution time for the job request.
%%END_TIME%%
The time after which you cannot launch the secret or the request approval expiration time for the job request.
%%HOSTNAME%%
FortiPAM name/ID.
%%COMMENTS%%
Comments by the requester.
%%USER%%
User name.
%%IMAGE:
Custom image.