Listing Secrets in a Vault

Learn how to get a list of secrets stored in an OCI vault.

    1. Open the navigation menu , select Identity & Security, and then select Vault.
    2. Under List scope, select a compartment that contains the secrets that you have created in a vault.
    3. From the list of secrets, select a secret name.
      The Console displays the following information:
      • Name: The unique, Oracle-assigned ID of the secret.
      • Status: The lifecycle management state of the secret. For example, Active, Creating, Updating, Pending deletion.
      • Created: The date and time when you initially created the secret.
      • Auto generation enabled: Specifies whether the automatic generation of secret was turned ON or OFF at the time of creation.
      • Auto rotation enabled: Specifies whether the automatic rotation of secret was turned ON or OFF at the time of creation.
  • Use the list command to list all the secrets in a specified vault and compartment.

    Open a command prompt and run oci vault secret list to list secrets in a vault:

    oci vault secret list --compartment-id <target_compartment_id>

    For example:

    
    oci vault secret list --compartment-id ocid1.compartment.oc1..example1example25qrlpo4agcmothkbgqgmuz2zzum45ibplooqtabwk3zz

    For a complete list of parameters and values for CLI commands, see the CLI Command Reference.

  • Use the ListSecrets API with the Management Endpoint to list secrets.

    Note

    The Management Endpoint is used for management operations including Create, Update, List, Get, and Delete. The Management Endpoint is also called the control plane URL or the KMSMANAGMENT endpoint.

    The Cryptographic Endpoint is used for cryptographic operations including Encrypt, Decrypt, Generate Data Encryption Key, Sign, and Verify. The Cryptographic Endpoint is also called the data plane URL or the KMSCRYPTO endpoint.

    You can find the management and cryptographic endpoints in a vault's details metadata. See Getting a Vault's Details for instructions.

    For regional endpoints for the Key Management, Secret Management, and Secret Retrieval APIs, see API Reference and Endpoints.

    For information about using the API and signing requests, see REST API documentation and Security Credentials. For information about SDKs, see SDKs and the CLI.