Listing Secrets

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.

      The vault list page opens. All vaults in the selected compartment are displayed in a table.

    2. Select the name of the vault containing the secrets you want to list.

      The vault's details page opens.

    3. Select Secrets to see a list of the secrets in the selected vault.
    4. To view the secrets in a different compartment, use the Compartment filter to switch compartments.

      You must have permission to work in a compartment to see the resources in it. If you're not sure which compartment to use, contact an administrator. For more information, see Understanding Compartments.

    Filtering List Results

    Use filters to limit the secrets in the list. Perform one of the following actions depending on the options that you see:

    • From the Search and Filter box above the list table, select one or more filters and specify the values that you want to use to narrow the list. In general, the filters correspond to the columns shown in the list table, although some filters represent attributes that aren't shown in the table. The Compartment filter is always displayed next to Applied filters.
    • On the left side of the list page, select a value from one of the available filters, such as compartment, state, or tags.

    Change the order of the items in the list table by using the sort icons next to the column names.

    For information about searching for resources and managing the columns in the list table, if those features are available, see Listing Resources.

    Actions

    In the list table, select the name of a secret to open its details page, where you can view its status and perform other tasks.

    To perform an action on a secret directly from the list table, select any of the following options from the Actions menu Actions Menu in the row for that secret:

    To create a secret, select Create Secret. See Creating a Secret for more information.

  • Use the oci vault secret list command 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 KMSMANAGEMENT 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.