Dieser Inhalt ist in der von Ihnen ausgewählten Sprache nicht verfügbar.

Chapter 2. Using IdM user vaults: storing and retrieving secrets


Store and retrieve secrets in Identity Management (IdM) user vaults using the IdM CLI, enabling users to securely manage sensitive data from different IdM clients.

2.1. Prerequisites

2.2. Storing a secret in a user vault

Store sensitive data in your personal vault using the Identity Management (IdM) CLI to securely archive files containing passwords or other secrets.

In the example used below, the standard vault type ensures that idm_user is not required to authenticate when accessing the file. idm_user is able to retrieve the file from any IdM client to which the user is logged in.

In the procedure:

  • idm_user is the user that creates the vault.
  • my_vault is the vault used to store the idm_user's certificate.
  • The vault type is standard, so that accessing the archived certificate does not require idm_user to provide a vault password.
  • secret.txt is the file containing the certificate that idm_user wants to store in the vault.

Prerequisites

  • You know the password of idm_user.
  • You are logged in to a host that is an IdM client.

Procedure

  1. Obtain the Kerberos ticket granting ticket (TGT) for idm_user:

    $ kinit idm_user
  2. Use the ipa vault-add command with the --type standard option to create a standard vault:

    $ ipa vault-add my_vault --type standard
    ----------------------
    Added vault "my_vault"
    ----------------------
      Vault name: my_vault
      Type: standard
      Owner users: idm_user
      Vault user: idm_user
    Important

    Make sure the first user vault for a user is created by the same user. Creating the first vault for a user also creates the user’s vault container. The agent of the creation becomes the owner of the vault container.

    For example, if another user, such as admin, creates the first user vault for user1, the owner of the user’s vault container will also be admin, and user1 will be unable to access the user vault or create new user vaults.

  3. Use the ipa vault-archive command with the --in option to archive the secret.txt file into the vault:

    $ ipa vault-archive my_vault --in secret.txt
    -----------------------------------
    Archived data into vault "my_vault"
    -----------------------------------

2.3. Retrieving a secret from a user vault

Use the Identity Management (IdM) CLI to retrieve a secret from your personal vault onto any IdM client to which you are logged in.

In the example below, you retrieve, as an IdM user named idm_user, a secret from your user private vault named my_vault onto idm_client.idm.example.com.

Prerequisites

  • idm_user is the owner of my_vault.
  • idm_user has archived a secret in the vault.
  • my_vault is a standard vault, which means that idm_user does not have to enter any password to access the contents of the vault.

Procedure

  1. SSH to idm_client as idm_user:

    $ ssh idm_user@idm_client.idm.example.com
  2. Log in as idm_user:

    $ kinit user
  3. Use the ipa vault-retrieve command with the --out option to retrieve the contents of the vault and save them into the secret_exported.txt file.

    $ ipa vault-retrieve my_vault --out secret_exported.txt
    --------------------------------------
    Retrieved data from vault "my_vault"
    --------------------------------------
Red Hat logoGithubredditYoutubeTwitter

Lernen

Testen, kaufen und verkaufen

Communitys

Über Red Hat Dokumentation

Wir helfen Red Hat Benutzern, mit unseren Produkten und Diensten innovativ zu sein und ihre Ziele zu erreichen – mit Inhalten, denen sie vertrauen können. Entdecken Sie unsere neuesten Updates.

Mehr Inklusion in Open Source

Red Hat hat sich verpflichtet, problematische Sprache in unserem Code, unserer Dokumentation und unseren Web-Eigenschaften zu ersetzen. Weitere Einzelheiten finden Sie in Red Hat Blog.

Über Red Hat

Wir liefern gehärtete Lösungen, die es Unternehmen leichter machen, plattform- und umgebungsübergreifend zu arbeiten, vom zentralen Rechenzentrum bis zum Netzwerkrand.

Theme

© 2026 Red Hat
Nach oben