Implement Azure Key Vault Flashcards

(12 cards)

1
Q

What types of containers does key vault (KV) support

A
  • vaults
  • managed hardware security module (HSM) pools
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What are the two service tiers of KV?

A
  • Standard - encrypts with a software key
  • Premium - includes HSM-protected keys
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are the benefits of KV?

A
  • Centralised Application secrets = can control their distribution
  • Secure storage = requires proper auth and authorization through Entra or RBAC before a caller can access
  • Monitor access and use = logging for vaults which can also be set to restricted access, can archive to storage account, stream to event hub or sent to azure monitor
  • Simplified admin of app secret = removes need for In-house knowledge of HSMs, quickly scales, geo-redundancy, accessed via portal CLI and PS, automates certain tasks from public purchases certs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are the three ways to authenticate KV?

A
  • Managed IDs for AZ resources = Best practice, app/service isnt managing rotation, azure auto rotates service principal client secret associated with ID
  • Service principal and cert = use service principal and an associated cert that has access to KV, not recommended because app owner must rotate cert
  • Service principal and secret = not recommended, hard to auto rotate secret that’s used to auth to the vault
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

How does KV enforce Transport Layer Security (TLS) protocol to protect data when its traveling between KV and clients?

A
  • Clients negotiate a TLS connection with KV providing strong auth, message privacy and integrity with detection of message tampering
  • Perfect Forward Secrecy (PFS) protects connections between customer client system and MS cloud services by unique keys
  • Connections use RSA 2048 bit encryption key lengths
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are best practices for KV?

A
  • Use separate KVs per app per environment, reducing a threat if breached
  • control access to vault to only authorised apps and suers
  • backup
  • logging
  • recovery options
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are the 2 ways apps can use to obtain a service principal that entra ID uses to authenticate to KV?

A
  • System assigned managed ID = Azure internally manages the apps service principal and auto auths the app with other services, recomended
  • Registration with Entra tenant = creates a second app object that IDs the app across all tenants
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is the KV SDK?

A
  • uses the azure ID client library which allows seamless auth to KV across envs with same code
  • Identity SDK available for .NET/Python/Java/JS
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

How do we authenticate to KV with REST?

A
  • Access tokens must be sent to the service using HTTP authorization header
  • PUT /keys/MYKEY?api-version=<api_version>HTTP/1.1</api_version>
  • Authorization: Bearer <access_token></access_token>
  • 401 with a WWW-Authenticate header will be sent back if no token supplied/token isnt accepted
  • params on this header are…
    + Authorisation = address of the OAuth2 authorization service that may be used to obtain access token for the request
    + Resource = the name of the resource to use in the authorization request
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What cmd is used to create kv?

A

az keyvault create –name <name> --resource-group <rgName> --location <location></location></rgName></name>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What cmd is used to add a secret to KV?

A

az keyvault secret set –vault-name <vaultName> --name <secretName> --value <secretValue></secretValue></secretName></vaultName>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What cmd is used to get a secret from KV?

A

az keyvault secret show –name <secretName> --vault-name <vaultName></vaultName></secretName>

How well did you know this?
1
Not at all
2
3
4
5
Perfectly