Configure Secrets Management
Some configuration is needed to set up the Akeyless Gateway before you can manage secrets.
Prerequisites
Install the ksctl CLI on a remote workstation to issue these commands.
Ensure that there is public network connectivity to Akeyless SaaS Core Services.
Configure Akeyless Gateway
Sign up for an Akeyless account with administrative level permissions.
This provides you with a 90 day free trial to Akeyless Vault Platform, with settings that are suitable for CipherTrust Manager integration.
Navigate to
https://<ciphertrust_manager_hostname>/akeyless-console/
.The Akeyless Vault Platform interface is displayed.
Click the Sign up link in the upper right.
Enter an email address.
Open the confirmation email and click Activate your account.
The account credentials are displayed in a browser window.
Capture the Access ID and Access Key. There is an option to save these values to CSV, if desired. These are required for necessary Akeyless Gateway configuration.
As a CipherTrust Manager Application Administrator, such as
admin
, rotate the CipherTrust Manager authentication key to an ECSDA key.ksctl tokens rotate-auth-key --type ecdsa --curve p256
This key is used to sign and verify external JWTs.
Isolate the public key value and reformat for Akeyless console.
In CipherTrust Manager, the you can view the public key value with
ksctl tokens list-auth-keys
command. The public key value is displayed in a JSON attribute calledpublic_key_jwk
. Akeyless console needs this value in an array calledkeys
.Akeyless Console Syntax
{ "keys": [ <value of `public_key_jwk` attribute> ] }
Example Reformatting
In this example, the
public_key_jwk
attribute is obtained with ksctl, and then reformatted in a text editor.## Obtain the public key value ksctl tokens list-auth-keys { "skip": 0, "limit": 10, "total": 1, "resources": [ { "id": "7e99444d-f511-4a75-908f-f3cc90801e4e", "type": "ecdsa", "public_key_pem": "-----BEGIN PUBLIC KEY-----\nMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEb5y6sdqZpB5HcciwP/Fl0K4s3czQ\nFG6tZwmXLAJxGH44qsjYaDTGQE3WElM7UCLu5EGZeJhubXyqBYkfDXNb5w==\n-----END PUBLIC KEY-----\n", "public_key_jwk": { "crv": "P-256", "kty": "EC", "x": "b5y6sdqZpB5HcciwP_Fl0K4s3czQFG6tZwmXLAJxGH4", "y": "OKrI2Gg0xkBN1hJTO1Ai7uRBmXiYbm18qgWJHw1zW-c" }, "createdAt": "2023-06-21T12:53:40.23849Z", "updatedAt": "2023-06-21T13:01:24.872168Z" } ] } ## Example reformatting { "keys": [ { "crv": "P-256", "kty": "EC", "x": "b5y6sdqZpB5HcciwP_Fl0K4s3czQFG6tZwmXLAJxGH4", "y": "OKrI2Gg0xkBN1hJTO1Ai7uRBmXiYbm18qgWJHw1zW-c" } ] }
Register the ECDSA signing key with Akeyless and create objects to authenticate CipherTrust Manager users to Akeyless console.
Login with your Akeyless administrative account at
https://<ciphertrust_manager_hostname>/akeyless-console/
.Navigate to Users & Auth Methods > New > Oauth2.0/JWT.
Note
We recommend deleting the User-Admin role, as it is not needed. The new Oauth 2.0/JWT method controls Akeyless permissions for CipherTrust Manager users.
Create an OAuth2.0/JWT authentication method. The following settings are required:
A Name must be provided.
The JSON option must be selected.
The JWKs JSON field must contain the ECDSA public key value. Copy and paste the
keys
array created in step 3.Set a value for Unique Identifier and it should be unique. For example, "sub".
You can optionally change the default JWT TTL (in minutes) from the default value. This controls the expiry time for an Akeyless token issued for CipherTrust Manager users.
Click Save.
Retain the Access ID value of this authentication method, as this is needed to edit the Akeyless configuration on CipherTrust Manager.
Navigate to Access Roles.
Note
You must associate the new auth method to at least one Access Role, to determine the Akeyless console permissions of CipherTrust Manager users. These steps set up permissions for all CipherTrust Manager users to manage secrets. You can adjust settings on both CipherTrust Manager UI and Akeyless console to restrict secrets management to fewer CipherTrust Manager users, if desired.
Click New to create a new role, provide a Name, and click Create Role.
Select the tabs for Secrets & Keys, Access Roles, Auth Methods, and Targets, and click + Add to add rules. Add recursive rules to allow create, read, update, delete and list operations. Click Add.
Caution
Do not allow the 'Deny' operation. This overrides all other operations permissions, and breaks the CipherTrust Manager integration.
Associate the new auth method to the new access role. Click + Associate, select the auth method name from the Auth Method dropdown. Click save.
Obtain the Gateway-Admin access key.
Navigate to Users & Auth Methods and click the pre-created Gateway-Admin auth method.
Click Reset Access Key.
Type
Gateway-Admin
and click Reset Access Key to confirm.Save the Access ID and Access Key credentials which are returned. These are needed to create the CipherTrust Manager connection, and for future Gateway configuration tasks.
As a CipherTrust Manager user with permissions to manage connections, such as
admin
, create the CipherTrust Manager connection to the Akeyless Vault Platform. Provide the Access ID and the Access Key values obtained in the previous step, associated with the Gateway-Admin authentication method.ksctl connectionmgmt akeyless create --name <name> --akeyless-key-id <akeyless_gateway_admin_access_id> --akeyless-key <akeyless_gateway_admin_access_key>
Retain the connection
id
value which is returned.Test the connection.
ksctl connectionmgmt akeyless test --id <connection_id>
Edit the Akeyless configuration. Set the the
gateway-connection-id
to the ID of the connection created in step 6. Set thesso-access-id
to the Akeyless access ID associated with the OAuth2.0/JWT authentication method created in step 4.ksctl akeyless config modify --gateway-connection-id <connection-id> --sso-access-id <sso_access_id>
Restart the CipherTrust Manager services. Type
y
to confirm the action.ksctl services restart
Once CipherTrust Manager GUI is available again, login as any user.
Ensure that the Secrets Management tile is enabled.
If you click the tile, single sign-on takes place silently as CipherTrust Manager issues a token for Akeyless to verify with the ECSDA signing key. You are logged into the Akeyless console.
Allow CipherTrust Manager users to use the CipherTrust Manager generated customer fragment to protect Akeyless secrets.
Login to the Akeyless console
https://<ciphertrust_manager_hostname>/akeyless-console/
with the Gateway-Admin account. Supply the Access ID and Access Key obtained in step 5.Navigate to Gateways and select the defaultCluster.
In the Gateway URL (Configuration) field, enter the CipherTrust Manager URL preceded by
https://
. For example, enterhttps://ciphertrust.mycompany.com
. Click the checkmark to confirm.Click the Access Permissions tab.
Click New.
Enter a meaningful Name, select the OAuth2.0/JWT authentication method created in step 4 for the Auth Method, and click Next.
Note
These steps set up permissions for all CipherTrust Manager users to use the customer fragment. You can adjust settings on both CipherTrust Manager UI and Akeyless console to restrict customer fragment usage to fewer CipherTrust Manager users, if desired.
Select Custom Permissions Settings, enable Zero Knowledge Encryption, and click Finish.
CipherTrust Manager users can now manage secrets, including protecting them with the CipherTrust Manager generated customer fragment.
Caution
To ensure static secrets, dynamic secrets, rotated secrets, and certificates are protected in the CipherTrust Manager root of trust hierarchy, we strongly recommend configuring a default protection key using the CipherTrust Manager generated customer fragment before beginning to create secrets.
You can perform additional configuration if needed:
Configure a Default Encryption Key
Note
This configuration can also be performed through the Akeyless CLI, if [set up for Gateway Admin access](#configuring-akeyless-cli-access-for-the-gateway-admin).
As a CipherTrust Manager Application Administrator, such as
admin
, obtain the CipherTrust Manager customer fragment by viewing the Akeyless configuration on CipherTrust Manager.ksctl akeyless config get
Retain the
customer_fragment_ids
value in the response.Example Response:
{ "gateway_connection_id": "aaeea264-e713-4075-b455-54e33a1a4518", "sso_access_id": "p-lx4mgbad23is", "customer_fragment_ids": [ "bbb34a30-7ca4-4717-a802-956b677f2a3d" ] }
Login as any user with secrets management permissions to the CipherTrust Manager UI, and click the Secrets Management tile to access the Akeyless console.
Create an encryption key associated with the customer fragment.
Navigate to Secrets & Keys.
Click New > Encryption Key > DFC.
Configure the following settings:
Provide a Name for the encryption key.
In the Type dropdown, select AES256GCM.
In the Customer Fragment dropdown, select the ID of the CipherTrust Manager Generated Fragment, obtained in step 1.
Click Finish.
Navigate to the Akeyless Gateway Configuration Manager, located at
https://<ciphertrust_manager_hostname>/akeyless
.Select Defaults.
In the Default Encryption Key dropdown list, select the newly created encryption key.
Click Save Changes.
Control Which CipherTrust Manager Users Have Secrets Management and Customer Fragment Access
By default, any CipherTrust Manager user has access to Akeyless secrets management and can protect keys with the CipherTrust Manager generated customer fragment. If you want only a subset of users to access secrets this can be controlled with CipherTrust Manager groups, CipherTrust Manager domains and Akeyless Access Roles. If you want only a subset of users to use the CipherTrust Manager generated customer fragment, this can be controlled with CipherTrust Manager groups, CipherTrust Manager domains, and Akeyless Access Permissions.
Limit Secrets Management Access to a Group
Login to CipherTrust Manager as a user in the
Users Admins
oradmin
group.Create a group for secrets management.
Associate desired users to that group.
Login with your Akeyless administrative account at
https://<ciphertrust_manager_hostname>/akeyless-console/
.Navigate to Access Roles. Select the Access Role you initially created, or create a new one with rules to allow create, read, update, delete and list operations for Secrets & Keys.
Edit the associated Method in the first table. Add a Sub Claim corresponding to the CipherTrust Manager group,
cust.groups=<ciphertrust_manager_group_name>
. Click the checkmark to save.
Limit Customer Fragment Access to a Group
Note
This configuration can also be performed through the Akeyless CLI, if [set up for Gateway Admin access](#configuring-akeyless-cli-access-for-the-gateway-admin).
Login to CipherTrust Manager as a user in the
Users Admins
oradmin
group.Create a group for secrets management.
Associate desired users to that group.
Login to the Akeyless console
https://<ciphertrust_manager_hostname>/akeyless-console/
with the Gateway-Admin account. Supply the Access ID and Access Key.Note
This account was used to create the CipherTrust Manager Akeyless connection during initial Akeyless Gateway configuration.
Navigate to Gateways and click the Access Permissions tab.
In the relevant Access Permission actions column, select Edit.
Note
This access permission was created as part of initial Gateway configuration and should display as Custom Permissions.
In the Allowed Users tab, add in a Claim corresponding to the CipherTrust Manager group,
cust.groups=<ciphertrust_manager_group_name>
. Click Save to confirm.
Limit Secrets Management Access to a Domain
Login to CipherTrust Manager as a user in the
Domain Admins
oradmin
group.Create a new domain or identify an existing domain for secrets management. Copy the ID of that domain.
Note
You can only use the domain ID for Akeyless Access Role configuration. You cannot use the domain name.
Add desired users to that domain.
Login with your Akeyless administrative account at
https://<ciphertrust_manager_hostname>/akeyless-console/
.Navigate to Access Roles. Select the Access Role you initially created, or create a new one with rules to allow create, read, update, delete and list operations for Secrets & Keys.
Edit the associated Method in the first table. Add a Sub Claim corresponding to the CipherTrust Manager domain,
cust.domain_id=<domain_id_value>
. Click the checkmark to save.
Limit Customer Fragment Access to a Domain
Note
This configuration can also be performed through the Akeyless CLI, if [set up for Gateway Admin access](#configuring-akeyless-cli-access-for-the-gateway-admin).
Login to CipherTrust Manager as a user in the
Domain Admins
oradmin
group.Create a new domain or identify an existing domain for secrets management. Copy the ID of that domain.
Note
You can only use the domain ID for Akeyless Access Role configuration. You cannot use the domain name.
Add desired users to that domain.
Login to the Akeyless console
https://<ciphertrust_manager_hostname>/akeyless-console/
with the Gateway-Admin account. Supply the Access ID and Access Key.Note
This account was used to create the CipherTrust Manager Akeyless connection during initial Akeyless Gateway configuration.
Navigate to Gateways and click the Access Permissions tab.
In the relevant Access Permission actions column, select Edit.
Note
This access permission was created as part of initial Gateway configuration and should display as Custom Permissions.
In the Allowed Users tab, add in a Claim corresponding to the CipherTrust Manager domain,
domain_id=<domain_id_value>
. Click Save to confirm.
Allow Other Users Access to the Customer Fragment
In some cases, applications or users require access to the CipherTrust Manager customer fragment, without also requiring CipherTrust Manager user credentials. In these cases an application only needs to manage Akeyless secrets with Zero-Knowledge encryption, but doesn't need to access any other CipherTrust Manager functionality.
Prerequisites
A dedicated API key authentication method.
An Access Role associated to the authentication method, with Secrets & Keys rules to allow create, read, update, delete, and list operations.
Allow Access to the Customer Fragment
Login to the Akeyless console
https://<ciphertrust_manager_hostname>/akeyless-console/
with the Gateway-Admin account. Supply the Gateway Admin Access ID and Access Key.Navigate to Gateways and select the defaultCluster.
In the Gateway URL (Configuration) field, enter the CipherTrust Manager URL preceded by
https://
. For example, enterhttps://ciphertrust.mycompany.com
. Click the checkmark to confirm.Click the Access Permissions tab.
Click New.
Enter a meaningful Name, select the desired authentication method for the Auth Method, and click Next.
Select Custom Permissions Settings, enable Zero Knowledge Encryption, and click Finish.
View CipherTrust Manager Generated Customer Fragment
The CipherTrust Manager generated customer fragment ID is visible in both the CipherTrust Manager CLI and the Akeyless Gateway Configuration Manager.
Viewing in CipherTrust Manager CLI
As a CipherTrust Manager Application Administrator, such as admin
, view the Akeyless configuration on CipherTrust Manager.
ksctl akeyless config get
Retain the customer_fragment_ids
value in the response.
Example Response:
{
"gateway_connection_id": "aaeea264-e713-4075-b455-54e33a1a4518",
"sso_access_id": "p-lx4mgbad23is",
"customer_fragment_ids": [
"bbb34a30-7ca4-4717-a802-956b677f2a3d"
]
}
Viewing in Akeyless Gateway Configuration Manager
Login to
https://<ciphertrust_manager_hostname>/akeyless/
with an Akeyless account with administrative level permissions. Supply the Access ID and Access Key.Note
An account with these permissions was created as part of initial Akeyless Gateway configuration.
Navigate to Zero Knowledge Encryption.
The CipherTrust Manager generated fragment is listed first in the table, with the description "CipherTrust Manager generated fragment".
Warning
Do not create additional customer fragments. If you have created additional customer fragments, do not allow users to protect secrets with them. Any additional customer fragments are not protected with the CipherTrust Manager root-of-trust hierarchy or stored in the CipherTrust Manager database, and are lost when CipherTrust Manager restarts. Additionally, these additional fragments are not replicated in cluster.
Configuring Akeyless CLI Access for the Gateway Admin
Gateway Admins can use the Akeyless CLI on a client computer to do follow-on configuration of the Akeyless Gateway, such as adding a default protection key that uses the CipherTrust Manager-generated customer fragment.
The required steps depend on the CipherTrust Manager web interface certificate.
In a production configuration, the CipherTrust Manager web interface certificate would be signed by an certificate authority (CA) external to the CipherTrust Manager. As well, a hostname consistent with the web interface certificate would be allocated for the CipherTrust Manager in your organization's DNS server. For these setups, you can proceed directly to steps for all web interface configurations.
By default, a local CipherTrust Manager CA issues the web interface's server certificate, and the certificate values are not suitable to register a hostname in a DNS server. This interface configuration is recommended for testing purposes only. For these setups, there are additional steps needed to install the Akeyless CLI.
Steps for Default Test Web Server Certificate Configuration
As a CipherTrust Manager user in the
admin
group, download the web interface certificate chain for the web interface to a file.ksctl interfaces certificate get --name web --icertfile web-ciphertrustmanager-local.pem
Set an environment variable
AKEYLESS_TRUSTED_TLS_CERTIFICATE_FILE
to define the downloaded certificate file as trusted for the Akeyless CLI connection.set AKEYLESS_TRUSTED_TLS_CERTIFICATE_FILE=<path_to_certificate_chain_file>
Example:
set AKEYLESS_TRUSTED_TLS_CERTIFICATE_FILE=web-ciphertrustmanager-local.pem
export AKEYLESS_TRUSTED_TLS_CERTIFICATE_FILE=<path_to_certificate_chain_file>
Example:
export AKEYLESS_TRUSTED_TLS_CERTIFICATE_FILE=web-ciphertrustmanager-local.pem
Resolve the hostname to the subject alternative name on the local operating system.
Add an entry to
C:\Windows\System32\drivers\etc\hosts
file with the CipherTrust Manager IP address and the subject alternative name.Example
172.31.21.55 web.ciphertrustmanager.local
Syntax
cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 <ciphertrust_IP_address> <certificate_subject_alternative_name>
Example
cat /etc/hosts 127.0.0.1 localhost localhost.localdomain localhost4 localhost4.localdomain4 ::1 localhost localhost.localdomain localhost6 localhost6.localdomain6 172.31.21.55 web.ciphertrustmanager.local
Proceed to steps for all web interface configurations.
Steps for All Web Interface Configurations
Set an environment variable
AKEYLESS_GATEWAY_URL
to define the CipherTrust Manager Akeyless Gateway URL in relation to the server certificate. The variable depends on whether the client is hosted on Windows or Linux. You require the Subject Alternative Name in the web interface server certificate. For the default web interface configuration, this value isweb.ciphertrustmanager.local
.Caution
Always include the trailing slash in the environment variable.
set AKEYLESS_GATEWAY_URL=https://<subject_alternative_name>/akeyless-api/
Default web interface server certificate:
set AKEYLESS_GATEWAY_URL=https://web.ciphertrustmanager.local/akeyless-api/
export AKEYLESS_GATEWAY_URL=https://<subject_alternative_name>/akeyless-api/
Default web interface server certificate:
export AKEYLESS_GATEWAY_URL=https://web.ciphertrustmanager.local/akeyless-api/
Create a profile when prompted using the Gateway Admin's Access ID and Access Key.
Tip
If you use a CA specific to your organization to sign the web interface certificate, and the Akeyless CLI doesn't connect to the gateway, this could indicate that the CA is at a nonstandard location that the Akeyless CLI can't find. Try setting the AKEYLESS_TRUSTED_TLS_CERTIFICATE_FILE
environment variable as the path to your organization CA.