CLI Reference

This section describes the available CLI commands that you can use when working with Akeyless.
If you need help in context, check out the help from the terminal:

General Flags:

--profile, --token: Use a specific profile (located at $HOME/.akeyless/profiles) or a temp access token

--uid-token: The universal identity token, Required only for universal_identity authentication

-h, --help: Display help information

--json[=false]: Set output format to JSON

--jq-expression: JQ expression to filter result output

--no-creds-cleanup[=false]: Do not clean local temporary expired creds

akeyless -h
akeyless <command> -h, --help
akeyless <command> --debug

Update Akeyless CLI

akeyless update

Update to the latest Akeyless CLI version

Usage
Akeyless update 
Flags

-v, --version[=latest]: The CLI version

-s, --show-changelog: Show the changelog between the current version and the latest one and exit (update will not be performed)

-r, --artifact-repository: Alternative CLI repository url. e.g. https://artifacts.site2.akeyless.io

describe-item

Gets the item details

Flags

-n, --name: Item name

-d, --display-id: The display ID of the item

-I, --item-id: Item ID of the item

--show-versions[=false]: Include all item versions in reply

--gateway-details[=false]: Output will include additional gateway details (e.g cluster URL)

--bastion-details[=false]: Output will include additional bastion details

--services-details[=false]: Include all associated services details

--accessibility[=regular]: In case of an item in a user's personal folder [regular/personal]

Output

With only --name specified, the command returns all details about the specified item except for its version.

When a version number is specified, the command returns all details about the specified item for the specified version.

When --show-versions is specified, the command returns all details about the specified item including a full list of versions, their creation dates, and their encryption keys for any version for which a key other than the default was used.

update-item

Update item name and description

❗️

Critical

Secret versioning

No updates made with update-item can be saved as part of new versions, which means that these changes override existing data. If you wish to track these updates as part of secret versioning, first create a new version with update-version-val. You can create a new version value using the same value for the current version if you don't want to actually change the value. Thereafter, run update-item.

Usage
akeyless update-item --name <Item name> \
--new-name <New item name>
Flags

[block:Flags]

-n, --name: Required, Current item name

--new-name: New item name

--description[=default_metadata]: Description of the object

--add-tag: List of the new tags that will be attached to this item. \nTo specify multiple tags use argument multiple times: --add-tag Tag1 --add-tag Tag2

--rm-tag: List of the existent tags that will be removed from this item. \nTo specify multiple tags use argument multiple times: --rm-tag Tag1 --rm-tag Tag2

--secure-access-enable: Enable/Disable secure remote access, "0-1": "\\(M

--secure-access-bastion-issuer: Path to the SSH Certificate Issuer for your Akeyless Bastion

--secure-access-bastion-api: Bastion's SSH control API endpoint. E.g. https://my.bastion:9900 \n(relevant only for ssh cert issuer)

--secure-access-bastion-ssh: Bastion's SSH server. E.g. my.bastion:22 \n(relevant only for ssh cert issuer)

--secure-access-ssh-creds-user: SSH username to connect to target server, must be in 'Allowed Users' list (relevant only for ssh cert issuer)

--secure-access-use-internal-bastion: Use internal SSH Bastion

--secure-access-ssh-creds: Secret values contains SSH Credentials, either Private Key or Password em name\ "h-0": " (relevant only for Static-Secret or Rotated-secret)

--secure-access-host: Target servers for connections, For multiple values repeat this flag

--secure-access-add-host: List of the new hosts that will be attached to SRA servers host. \nTo specify multiple tags use argument multiple times: --secure-access-add-host host1 --secure-access-add-host host2

--secure-access-rm-host: List of the existent hosts that will be removed from SRA servers host. \nTo specify multiple tags use argument multiple times: --secure-access-rm-host host1 --secure-access-rm-host host2

--secure-access-url: Destination URL to inject secrets

--secure-access-web-browsing: Secure browser via Akeyless Web Access Bastion

--secure-access-web-proxy: Web-Proxy via Akeyless Web Access Bastion

--secure-access-rdp-domain: Required when the Dynamic Secret is used for a domain user \n(relevant only for RDP Dynamic-Secret)

--secure-access-rdp-user: Override the RDP Domain username

--secure-access-rdp-domain: Required when the Dynamic Secret is used for a domain user \n(relevant only for RDP Dynamic-Secret)

--secure-access-rdp-user: Override the RDP Domain username

--secure-access-allow-external-user: Allow providing external user for a domain users (Mandatory)\\

--secure-access-db-schema: The DB schema (relevant only for DB Dynamic-Secret)

--secure-access-db-name: "The DB name (relevant only for DB Dynamic-Secret)

--secure-access-aws-account-id: The AWS account id (relevant only for AWS Dynamic-Secret)

--secure-access-aws-region: The AWS region (relevant only for AWS Dynamic-Secret)

--secure-access-aws-native-cli: The AWS native cli (relevant only for AWS Dynamic-Secret)

--secure-access-cluster-endpoint: The K8s cluster endpoint URL \n(relevant only for EKS/GKE/K8s Dynamic-Secret)

--secure-access-dashboard-url: The K8s dashboard url (relevant only for K8s Dynamic-Secret)

--secure-access-allow-port-forwading: Enable Port forwarding while using CLI access \n(relevant only for EKS/GKE/K8s Dynamic-Secret)

--rotate-after-disconnect[=false]: Rotate the value of the secret after SRA session ends (Mandatory)\\ Curre \n(relevant only for Rotated-secret on SRA)

--delete-protection: Protection from accidental deletion of this item

-c, --cert-file-path: Path to a file that contain the certificate in a PEM format. \nUsed for updating RSA keys' certificates

--cert-file-data: PEM Certificate in a Base64 format. Used for updating RSA keys' certificates.

--accessibility \"data\": In case of an item in a user's personal folder

set-item-state

Set an item's state (Enabled, Disabled)

Usage
akeyless set-item-state --name <Current item name> \
--desired-state <Desired item state [Enabled, Disabled]>
Flags

-n, --name: Required, Current item name

-s, --desired-state: Required, Desired item state

--version[=0]: The specific version you want to update: 0=item level state (default)

get-tags

Gets tags of the selected item

Usage
akeyless get-tags --name <Item Name>

Flags

-n, --name: Required, The item name

update-account-settings

Updates account settings.

Note: The operation is allowed only for admin user

Flags

--company-name: Update Company Name of account

--phone: Update Phone number of account

--address: Update Address of account

--city: Update City of account

--country: Update Country of account

--postal-code: Update Postal Code of account

--jwt-ttl-default: default jwt ttl for auth method authentication (in minutes)

--jwt-ttl-min: minimum allowed jwt ttl for auth method authentication (in minutes)

--jwt-ttl-max: maximum allowed jwt ttl for auth method authentication (in minutes)

--item-type: Associated with max-versions

--max-versions: Maximum versions of a given item-type, valid range ter\ \n . When item version exceeds this number, the oldest versions will be deleted

--default-versioning: If set to true, new item version will be created on each update

--dp-enable-classic-key-protection: Set to update protection with classic keys state meter

--password-policy-password-length: "13-1": "Password length between 5 - to 50 characters

--password-policy-contains-capital-letters: Password must contain capital letters

--password-policy-contains-lower-letters: Password must contain lower case letters

--password-policy-contains-numbers: Password must contain numbers

--password-policy-contains-special-characters: Password must contain special characters

--items-deletion-protection: Set to update the default behaviour of new items creations deletion protection attribute [true/false]

--default-key-name: Set the account default key based on the DFC key item name. Use "set-original-akeyless-default-key" to revert to using the original default key of the account. Empty string will change nothing

--invalid-characters[=notReceivedInvalidCharacter]: Characters that cannot be used for items/targets/roles/auths/event_forwarder names

--lock-default-key: Lock the account's default protection key, if set - users will not be able to use a different protection key, relevant only if default-key-name is configured [true/false]

--usage-event-enable: Enable event for objects that have not been used or changed [true/false]

--usage-event-object-type: Usage event is supported for auth method or secrets-and-keys [auth/item]

--usage-event-interval: Interval by days for unused objects. Default and minimum interval is 90 days

--dynamic-secret-max-ttl-enable: Set a maximum ttl for dynamic secrets [true/false]

--dynamic-secret-max-ttl: Set the maximum ttl for dynamic secrets

--max-rotation-interval-enable: Set a maximum rotation interval for rotated secrets auto rotation settings [true/false]

--max-rotation-interval: Set the maximum rotation interval for rotated secrets auto rotation settings

get-account-settings

Get the settings of the account

delete-item

Delete an item or an item version

Usage
akeyless delete-item -n <Item name>
Flags

-n, --name: Required, Item name

--version[=-1]: The specific version you want to delete - 0=last version, -1=entire item with all versions (default)

--delete-in-days "day: The number of days to wait before deleting the item (relevant for keys only)

--delete-immediately[=false]: When delete-in-days=-1, must be set

--accessibility[=regular]: In case of an item in a user's personal folder [regular/personal]

delete-items

Deletes multiple items from a given path

Usage
akeyless delete-items -p <Path\do\delete\items>

Flags

-p, --path: Required, Path to delete the items from

list-items

List of all accessible items

Flags

-t, --type: The item types list of the requested items. In case it is empty, all types of items will be returned, options: [key, static-secret, dynamic-secret, rotated-secret, ssh-cert-issuer, pki-cert-issuer, classic-key]

--sub-types: Optional the items sub types

--filter: Filter by item name or part of it

--tag: Filter by item tag

--sra-only[=false]: Filter by items with SRA functionality enabled

--path: Path to folder

--pagination-token: Next page reference

--auto-pagination[=enabled]: Retrieve all items using pagination, when disabled retrieving only first 1000 items

--minimal-view: Show only basic information of the items

--accessibility[=regular]: In case of an item in a user's personal folder, options: [regular/personal]

list-sra-bastions

List of all Secure Remote Access (SRA) Bastions in the account

Flags

--only-allowed-urls[=false]: Filter the response to show only bastions allowed URLs

move-objects

Moves/Renames objects

Usage
akeyless move-objects --source <Source path to move the objects from> \
--target <Target path to move the objects to> \
--objects-type <The objects type to move (item/auth_method/role)>
Flags

-s, --source: Required, Source path to move the objects from

--t, --target: Required, Target path to move the objects to

-o, --objects-type[=item]: The objects type to move (item/auth_method/role)

configure

Configure client profile

Usage
akeyless configure
Flags

--profile[=default]: The profile name to be configure

--access-id: Access ID

--access-key: Access Key

--access-type[=access_key]: Access Type, options: (access_key/password/azure_ad/saml/oidc/aws_iam/gcp/k8s)

--admin-password: Password (relevant only for access-type=password)

--admin-email: Email (relevant only for access-type=password)

--oidc-sp: OIDC Service Provider (relevant only for access-type=oidc, inferred if empty), supported SPs: google, github

--azure_ad_object_id: Azure Active Directory ObjectId \n(relevant only for access-type=azure_ad)

`--gcp-audience "data": GCP audience to use in signed JWT \n(relevant only for access-type=gcp)

--gateway-url: Gateway URL for the K8S authenticated \n(relevant only for access-type=k8s)

--k8s-auth-config-name: The K8S Auth config name \n(relevant only for access-type=k8s)

--k8s-token-path[=/var/run/secrets/kubernetes.io/serviceaccount/token]: An optional path to a projected service account token inside the pod, for use instead of the default service account token (relevant only for access-type=k8s)

--cert-file-name: Name of the certificate file to use \n(relevant only for access-type=cert)

--cert-data: Certificate data encoded in base64. Used if file was not provided. (relevant only for access-type=cert in Curl Context)

--key-file-name: Name of the private key file to use \n(relevant only for access-type=cert)

--key-data: Private key data encoded in base64. Used if file was not provided (relevant only for access-type=cert in Curl Context)

unconfigure

Remove configuration of client profile

Usage

akeyless unconfigure --profile <Profile name>

Gateway configuration

gateway-create-allowed-access

Creates Allowed Access

Usage
akeyless gateway-create-allowed-access \
--name <Allowed Access Name> \
--access-id <Access-ID> \
--gateway-url <API Gateway URL:8000> \
--description <Allowed Access description> \
--sub-claims <key/val of sub claims> \
--permissions <permissions for this allowed access> 
Flags

\-n, --name: Required, Allowed access name

--access-id: Required, The access id to be attached to this allowed access

\--description: Allowed access description

\-s, --sub-claims: key/val of sub claims, e.g group=admins,developers

\-p, --permissions: Comma-seperated list of permissions for this allowed access. Available permissions: [defaults,targets,classic_keys,automatic_migration,ldap_auth,dynamic_secret,k8s_auth,log_forwarding,zero_knowledge_encryption,rotated_secret,caching,event_forwarding,admin,kmip,general]

\-c, --case-sensitive[=true]: Treat sub claims as case-sensitive

\-u, --gateway-url[=http://localhost:8000]: API Gateway URL (Configuration Management port)

gateway-update-allowed-access

Update Allowed Access

Usage
akeyless gateway-update-allowed-access \
--name <Allowed Access Name> \
--access-id <Access-ID> \
--new-name <New allowed access name> \
--gateway-url <API Gateway URL:8000> \
--description <Allowed Access description> \
--sub-claims <key/val of sub claims> \
--permissions <permissions for this allowed access> 
Flags

\-n, --name: Required, Allowed access name

--access-id: Required, The access id to be attached to this allowed access

\--new-name: New allowed access name

\--description: Allowed access description

\-s, --sub-claims: key/val of sub claims, e.g group=admins,developers

\-p, --permissions: Comma-seperated list of permissions for this allowed access. Available permissions: [defaults,targets,classic_keys,automatic_migration,ldap_auth,dynamic_secret,k8s_auth,log_forwarding,zero_knowledge_encryption,rotated_secret,caching,event_forwarding,admin,kmip,general]

\-c, --case-sensitive[=true]: Treat sub claims as case-sensitive

\-u, --gateway-url[=http://localhost:8000]: API Gateway URL (Configuration Management port)

gateway-get-config

Gets gateway configuration details

Flags

-u, --gateway-url[=http://localhost:8000]: API Gateway URL (Configuration Management port)

gateway-list-allowed-management-access

Returns available allowed-management-access

Flags

-u, --gateway-url[=http://localhost:8000]: API Gateway URL (Configuration Management port)

gateway-migrate-personal-items

Migrates personal items from external vault

Flags

-u, --gateway-url[=http://localhost:18888]: API Gateway URL (Akeyless UI port)

-t, --type[=1password]: Migration provider type, Current supported options: [1password]

-k, --protection-key: The name of a key that used to encrypt the secret value

-l, --target-location: Target location in your Akeyless personal folder for migrated secrets

--1password-url: 1Password sign-in address for your account

--1password-email: 1Password user email

--1password-password: 1Password password for the given user's email

--1password-secret-key: User's 1Password Secret Key

--1password-vaults: Optional list of 1Password vaults to migrate items from; can be used multiple times (--1password-vaults vault1 --1password-vaults vault2), If not provided, all non-private vaults will be migrated

gateway-migration-status

Gets migration Status

Flags

-n, --name: Migration name to display

-i, --id: Optional, instead of migration name, set a Migration ID \n(Can be retrieve with gateway-list-migration command)

-u, --gateway-url[=http://localhost:8000]: API Gateway URL (Configuration Management port)

akeyless list-gateways

List of all Gateways in the account

Flags

gateway-update-tls-cert

Updates Gateway TLS certificate

Flags

--cert-data: TLS Certificate (base64 encoded), this flag is ignored if --cert-file-name is supplied

--cert-file-name: Path to the file containing the TLS Certificate, this flag is ignored if --cert-data is supplied

--key-data: TLS Private Key (base64 encoded), this flag is ignored if --key-file-name is supplied

--key-file-name: Path to the file containing the TLS Private Key, this flag is ignored if --key-data is supplied

-u, --gateway-url[=http://localhost:8000]: API Gateway URL (Configuration Management port)

add-gw-access-id

Adds Sub-Admins to the list of who can access Gateway

Flags

-c, --cluster-name: Required, The name of the updated cluster

-a, --access-id: Required, The access id to be able to access the gateway

-s, --sub-claims: key/val of sub claims, e.g group=admins,developers

delete-gw-access-id

Deletes Sub-Admins from the list of who can access Gateway

Flags
  • -c, --cluster-name: Required, The name of the updated cluster

-a, --access-id: Required, The access id to be able to access the gateway

delete-gateway-cluster

Deletes gateway cluster

Flags

[block:Flags]

-c, --cluster-name: Required, Gateway Cluster, e.g. acc-abcd12345678/p-123456789012/defaultCluster
--force: Deletes cluster even if there is an active gateway or associated secrets. \nAll Gateway secrets will be deleted

Event Center

The following commands have to do with the Akeyless platform's Event Center functionality.

create-event-forwarder

Creates a forwarder that will send you notifications of selected events

Flags

-u, --gateway-url[=http://localhost:8000]: API Gateway URL (Configuration Management port)

-n, --name: Required, Unique event forwarder name

--forwarder-type: Required, Event Forwarder type [servicenow, email]

--runner-type[=immediate]: Required, Event Forwarder runner type [immediate, periodic]

--every: Rate of periodic runner repetition in hours

-s, --event-source-locations: A comma-separated list of event sources to forward event about, for example: /abc/def, /abc/qqq/*

--event-source-type[=item]: Event source type [item, target]

--event-types: A comma-separated list of types of events to notify about [request-access, certificate-pending-expiration, certificate-expired, certificate-provisioning-success, certificate-provisioning-failure, auth-method-pending-expiration, auth-method-expired, rotated-secret-success, rotated-secret-failure, dynamic-secret-failure, multi-auth-failure, uid-rotation-failure, apply-justification, email-auth-method-approved, usage, rotation-usage, gateway-inactive, static-secret-updated]

--host: Host (relevant only for "servicenow" Event Forwarder)

--admin-name: Admin name (relevant only for "servicenow" Event Forwarder)

--auth-type[=user-pass]: The authentication type to use (user-pass / jwt) (relevant only for "servicenow" Event Forwarder)

--user-email: The user email to identify with when connecting with jwt authentication (relevant only for "servicenow" Event Forwarder)

--client-id: The client ID to use when connecting with jwt authentication (relevant only for "servicenow" Event Forwarder)

--email-to: A comma seperated list of email addresses to send event to (relevant only for "email" Event Forwarder)

--admin-pwd: Admin Password (relevant only for "servicenow" Event Forwarder)

--client-secret: The client secret to use when connecting with jwt authentication (relevant only for "servicenow" Event Forwarder)

--app-private-key-file-path: Path to the RSA Private Key to use when connecting with jwt authentication (relevant only for "servicenow" Event Forwarder)

--app-private-key-base64: The RSA Private Key to use when connecting with jwt authentication (relevant only for "servicenow" Event Forwarder)

-k, --key: Key name. The key will be used to encrypt the Event Forwarder secret value. If key name is not specified, the account default protection key is used

--description: Description of the Event Forwarder

update-event-forwarder

Updates an existing forwarder

Flags

-n, --name: Reqiored, Unique event forwarder name

--new-name: New Event Forwarder name

--event-source-locations: New comma-separated list of event sources to forward event about, for example: /abc/def,/abc/qqq/\*

--event-types: New comma-separated list of types of events to notify about [request-access, certificate-pending-expiration, certificate-expired]

--host: Host (relevant only for "servicenow" Event Forwarder)

--admin-name: Admin name (relevant only for "servicenow" Event Forwarder)

--auth-type[=user-pass]: The authentication type to use (user-pass / jwt) (relevant only for "servicenow" Event Forwarder)

--user-email: The user email to identify with when connecting with jwt authentication (relevant only for "servicenow" Event Forwarder)

--client-id: The client ID to use when connecting with jwt authentication (relevant only for "servicenow" Event Forwarder)

--email-to: A comma separated list of email addresses to send event to \n(relevant only for "email" Event Forwarder)

--enable[=true]: Enable/Disable Event Forwarder [true/false]

--description[=default_description]: Description of the object

get-event-forwarder

Fetches info on an existing forwarder

Flags

-n, --name: Required, Unique event forwarder name

delete-event-forwarder

Deletes an existing forwarder

Flags

-n, --name: Required, Unique event forwarder name