> For the complete documentation index, see [llms.txt](https://docs.realmjoin.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.realmjoin.com/pt/agente-realmjoin/realmjoin-client/local-admin-password-solution-laps/keyvault.md).

# KeyVault

Criar um Azure Key Vault e uma política de acesso para armazenar em segurança as palavras-passe da conta local geradas pelo RealmJoin LAPS.

Aplicações e serviços na nuvem usam chaves criptográficas e segredos para ajudar a manter a informação segura. O Azure Key Vault protege estas chaves e segredos. Quando usa o Key Vault, pode encriptar chaves de autenticação, chaves da Storage Account, chaves de encriptação de dados, ficheiros .pfx e palavras-passe usando chaves protegidas por módulos de segurança de hardware.

## Criar KeyVault

A seguinte tabela mostra os passos para a criação do Azure KeyVault e a configuração da Access Policy para o RealmJoin LAPS:

| Tarefa                                                                                                                                                                                                                                                                                                                              | Imagem                                                                                                                                                                                                                                                   |
| ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| 1. Abrir [Azure Portal](https://portal.azure.com)                                                                                                                                                                                                                                                                                   |                                                                                                                                                                                                                                                          |
| 2. Comece com **Criar um recurso**                                                                                                                                                                                                                                                                                                  | ![](https://686519968-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2FIXKOOIliqE3Kxs5cd1N5%2Fimage.png?alt=media\&token=608b2c0e-6df6-4f43-9dcf-ddb1b8954eba)                                       |
| 3. Escreva em **Key Vault** no campo de pesquisa                                                                                                                                                                                                                                                                                    | ![](https://686519968-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2FaCVEJXsrIA0QXik9U52T%2Fimage.png?alt=media\&token=0cd2bac4-e17d-4d5f-9612-4e074782c8c5)                                       |
| 4. Na página de detalhes, clique em **Criar**                                                                                                                                                                                                                                                                                       |                                                                                                                                                                                                                                                          |
| <p>5. Preencha os campos obrigatórios no separador Básico.<br><br>Certifique-se de usar um esquema de nomenclatura distinto para o URL do KeyVault.<br><br>Por exemplo: <em>rj-\[tenant]-\[service]</em></p><p>Nota: Este é um nome DNS, por isso é globalmente único<br><br>Prima <strong>Seguinte</strong>.</p>                   | ![](https://686519968-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2FlZ1NGF0QA2tudFFLarFX%2Fimage.png?alt=media\&token=5fb9a2ed-e492-4840-bbca-157568b5901c)                                       |
| <p>6. Configuração de acesso<br><br>Escolha <strong>"Vault access policy"</strong> para o modelo de permissão.</p>                                                                                                                                                                                                                  | <img src="https://686519968-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2F3Uw8zlepxTFlZ1IMVaL8%2Fimage.png?alt=media&amp;token=4313ba65-f0b5-4658-a9b1-9b5e16d55209" alt="" data-size="original"> |
| <p>7. Crie uma Access Policy para o RealmJoin<br><br>Prima <em><strong>Criar</strong></em> e escolha <strong>"Key, Secret & Certificate Management"</strong> como modelo.<br><br>Adicione também <em><strong>"Select all"</strong></em> para <strong>Operações criptográficas.</strong><br><br>Prima <strong>Seguinte</strong>.</p> | <img src="https://686519968-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2Fr5bOENNN6X97UeR9GKPf%2Fimage.png?alt=media&amp;token=72df2f9e-432d-4860-87e9-81b3ad52b96e" alt="" data-size="original"> |
| <p>8. Adicione "RealmJoin" como Principal<br><br>Prima <strong>Seguinte</strong>.</p>                                                                                                                                                                                                                                               |                                                                                                                                                                                                                                                          |
| 9. Clique em **Criar**                                                                                                                                                                                                                                                                                                              |                                                                                                                                                                                                                                                          |
| 10. Revise as suas definições e configurações e clique em **Rever + Criar**                                                                                                                                                                                                                                                         |                                                                                                                                                                                                                                                          |
| 11. Aguarde a conclusão bem-sucedida da implementação                                                                                                                                                                                                                                                                               |                                                                                                                                                                                                                                                          |
| 12. Clique em **Ir para o recurso**                                                                                                                                                                                                                                                                                                 |                                                                                                                                                                                                                                                          |
| 13. Por fim, vá para **Visão geral** e partilhe o **Nome DNS** com o [Suporte da RealmJoin](mailto:support@realmjoin.com)                                                                                                                                                                                                           | ![](https://686519968-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2FbZ6vZZXjMNHfwlumh8HQ%2Fimage.png?alt=media\&token=00c4b87a-63c7-4019-bc20-4fcf2316e46a)                                       |

## Armazenamento de segredos do Key Vault

O RealmJoin não armazenará o segredo em qualquer armazenamento proprietário, mas criará um **segredo do Azure Key Vault** para o armazenar de forma segura e auditável. A API do Key Vault está documentada aqui:

<https://docs.microsoft.com/en-us/rest/api/keyvault/secrets/set-secret/set-secret>

A entrada no Key Vault será adicionada com o ID do dispositivo Azure como chave e o GUID em texto simples como valor secreto. Veja o seguinte exemplo:

![](https://686519968-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2FcCIa696ogL29y9hJ9F1r%2Fimage.png?alt=media\&token=81ee6a2e-368a-4590-aaba-e3c64f6e25b7)

![](https://686519968-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F-MkrcM7cKOpXKri1kVrh%2Fuploads%2FdDif4wpuLTvhjkLSTbae%2Fimage.png?alt=media\&token=51e97aca-983d-4498-aeaa-c3e53fc03e8a)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.realmjoin.com/pt/agente-realmjoin/realmjoin-client/local-admin-password-solution-laps/keyvault.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
