HOTSPOT - You need to ensure that security policies are met. What code should you add at line PC26? To answer, select the appropriate options in the answer area. NOTE: Each correct selection is worth one point. Hot Area:
Suggested Answer:Explanation
Box 1: var key = await Resolver.ResolveKeyAsyn(keyBundle,KeyIdentifier.CancellationToken.None); Box 2: var x = new BlobEncryptionPolicy(key,resolver); Example: // We begin with cloudKey1, and a resolver capable of resolving and caching Key Vault secrets. BlobEncryptionPolicy encryptionPolicy = new BlobEncryptionPolicy(cloudKey1, cachingResolver); client.DefaultRequestOptions.EncryptionPolicy = encryptionPolicy; Box 3: cloudblobClient. DefaultRequestOptions.EncryptionPolicy = x; References: https://github.com/Azure/azure-storage-net/blob/master/Samples/GettingStarted/EncryptionSamples/KeyRotation/Program.cs
Answer is correct.
Box 1: var key = await Resolver.ResolveKeyAsyn(keyBundle,KeyIdentifier.CancellationToken.None);
Box 2: var x = new BlobEncryptionPolicy(key,resolver);
Box 3: cloudblobClient. DefaultRequestOptions.EncryptionPolicy = x;
Reference:
https://github.com/Azure/azure-storage-net/blob/b0d47bfd4c1c0dcbe60eaf373e2977cd7405aa5f/Samples/GettingStarted/EncryptionSamples/KeyRotation/Program.cs#L48
Line Numbers: [48,52,57,60,64,65]
Edit: Typo with comma and dot which makes
Box 1: var key = await Resolver.ResolveKeyAsyn(keyBundle.KeyIdentifier, CancellationToken.None);
https://vceguide.com/wp-content/uploads/2020/05/Microsoft-AZ-203-date-05-08-2020_Page_165_Image_0001.jpg
First should be KeyBundle.key as GetKeyAsync(IKeyVaultClient, String, CancellationToken) retrieves the public portion of a key plus its attributes.
https://docs.microsoft.com/en-us/dotnet/api/microsoft.azure.keyvault.keyvaultclientextensions.getkeyasync?view=azure-dotnet-legacy
Wrong on 1. Given answer is correct.
1. You are adding the keyID [ https://csharp.hotexamples.com/examples/Microsoft.Azure.KeyVault/CachingKeyResolver/ResolveKeyAsync/php-cachingkeyresolver-resolvekeyasync-method-examples.html ]
2. Setting the BlobEncryption
3. Setting the EncryptionPolicy
- ResolveKeyAsync part has typo with comma and dot which makes it hard to read.
Should be :
await Resolver.ResolveKeyAsyn(keyBundle.KeyIdentifier , CancellationToken.None);
because parameters of method are:
ResolveKeyAsync (string kid, System.Threading.CancellationToken token);
This section is not available anymore. Please use the main Exam Page.AZ-203 Exam Questions
Log in to ExamTopics
Sign in:
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.
Upvoting a comment with a selected answer will also increase the vote count towards that answer by one.
So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.
Daltonic75
Highly Voted 5 years, 1 month agot8203
Highly Voted 4 years, 9 months agogunencali
Most Recent 4 years, 4 months agogunencali
4 years, 4 months agoaroravibhu
4 years, 5 months agoahadjithoma
4 years, 4 months agoTEMPKAKAM
4 years, 5 months agoCornholioz
4 years, 4 months agoJunsui
5 years, 1 month agoAvadhut01
4 years, 10 months agopurav1009
5 years, 2 months ago