Megosztás a következőn keresztül:


Quickstart: Set and retrieve a secret from Azure Key Vault using the Azure portal

Az Azure Key Vault egy olyan felhőszolgáltatás, amely a titkos kulcsok biztonságos tárolására szolgál. Biztonságosan tárolhatja kulcsait, jelszavait, tanúsítványait és egyéb titkos adatait. Azure key vaults may be created and managed through the Azure portal. In this quickstart, you create a key vault, then use it to store a secret.

For more information, see Key Vault Overview and Secrets Overview.

Előfeltételek

To access Azure Key Vault, you'll need an Azure subscription. Ha még nem rendelkezik előfizetéssel, a kezdés előtt hozzon létre egy ingyenes fiókot .

All access to secrets takes place through Azure Key Vault. For this quickstart, create a key vault using the Azure portal, Azure CLI, or Azure PowerShell.

Bejelentkezés az Azure-ba

Jelentkezzen be a Azure portalra.

Add a secret to Key Vault

To add a secret to the vault, follow the steps:

  1. Navigate to your key vault in the Azure portal:
  2. On the Key Vault left-hand sidebar, select Objects then select Secrets.
  3. Select + Generate/Import.
  4. On the Create a secret screen choose the following values:
    • Upload options: Manual.
    • Name: Type a name for the secret. A titkos kulcs nevének egyedinek kell lennie a Key Vaultban. The name must be a 1-127 character string, starting with a letter and containing only 0-9, a-z, A-Z, and -. For more information on naming, see Key Vault objects, identifiers, and versioning
    • Value: Type a value for the secret. Key Vault APIs accept and return secret values as strings.
    • A többi értéket hagyja az alapértelmezett értéken. Válassza a Create gombot.

Once you receive the message that the secret has been successfully created, you may select on it on the list.

For more information on secrets attributes, see About Azure Key Vault secrets

Retrieve a secret from Key Vault

If you select on the current version, you can see the value you specified in the previous step.

Secret properties

By clicking "Show Secret Value" button in the right pane, you can see the hidden value.

Secret value appeared

You can also use Azure CLI, or Azure PowerShell to retrieve previously created secret.

Erőforrások tisztítása

Other Key Vault quickstarts and tutorials build upon this quickstart. Ha azt tervezi, hogy az ezt követő rövid útmutatókkal és oktatóanyagokkal dolgozik tovább, érdemes lehet ezeket az erőforrásokat megőrizni. When no longer needed, delete the resource group, which deletes the Key Vault and related resources. To delete the resource group through the portal:

  1. Enter the name of your resource group in the Search box at the top of the portal. When you see the resource group used in this quickstart in the search results, select it.
  2. Válassza az Erőforráscsoport törlése elemet.
  3. In the TYPE THE RESOURCE GROUP NAME: box type in the name of the resource group and select Delete.

Megjegyzés:

It is important to notice that once a secret, key, certificate, or key vault is deleted, it will remain recoverable for a configurable period of 7 to 90 calendar days. If no configuration is specified the default recovery period will be set to 90 days. This provides users with sufficient time to notice an accidental secret deletion and respond. For more information about deleting and recovering key vaults and key vault objects, see Azure Key Vault soft-delete overview

Következő lépések

In this quickstart, you created a Key Vault and stored a secret in it. To learn more about Key Vault and how to integrate it with your applications, continue on to these articles.