Implement Azure Security
203 soru
You are developing a C# console application that needs to authenticate users using the Microsoft Identity Platform. The application must support signing in users from any Microsoft Entra ID tenant, but must explicitly prevent users with personal Microsoft accounts (such as Xbox, Outlook.com, or Skype accounts) from signing in.
You have the following C# code to build the public client application:
csharp
var app = PublicClientApplicationBuilder.Create(clientId)
.WithAuthority(authority)
.WithRedirectUri(redirectUri)
.Build();
Which value should you assign to the `authority` variable?
You are developing a secure C# application using the Azure.Storage.Blobs SDK (v12) to generate a User Delegation SAS token. An external client requires temporary, read-only access to a specific blob named "backup.bak" in a container named "db-backups".
The security requirements are as follows:
- Access must be restricted to HTTPS only.
- Access must be restricted to the client's IP address "203.0.113.88".
- The token must account for potential client-server clock desynchronization (clock skew).
- The token must grant only the minimum necessary permissions.
You write the following code:
csharp
var sasBuilder = new BlobSasBuilder
{
BlobContainerName = "db-backups",
BlobName = "backup.bak",
Resource = [PLACEHOLDER_RESOURCE],
StartsOn = [PLACEHOLDER_START],
ExpiresOn = DateTimeOffset.UtcNow.AddHours(2),
Protocol = [PLACEHOLDER_PROTOCOL],
IPRange = [PLACEHOLDER_IP]
};
sasBuilder.SetPermissions([PLACEHOLDER_PERMISSIONS]);
Which set of properties correctly configures the BlobSasBuilder to meet the security requirements?
You are developing a containerized API that will run on Azure Container Instances. The container groups are frequently created, destroyed, and recreated via automated workflows. The API must authenticate to the Microsoft Identity Platform to retrieve configuration keys from Azure App Configuration. You must ensure that recreating the Container Instances does not require updating permission grants in Azure App Configuration. Which two configurations should you implement? (Select two.)
Geçerli olan tümünü seçin
You are developing a solution that stores sensitive media files in an Azure Blob Storage container named mediafiles. You need to grant a partner application temporary access to read and list the blobs in this container. The security requirements state that you must be able to revoke this access immediately if a compromise occurs, without rotating the storage account keys or affecting other SAS tokens.
Which two actions should you perform to implement this security requirement?
Geçerli olan tümünü seçin
Your company is configuring SSL/TLS certificates for a web application and wants to automate the certificate renewal lifecycle using an integrated Certificate Authority (CA) partner, DigiCert. You need to configure Azure Key Vault to automatically request and renew certificates from DigiCert. Which sequence of actions must you perform to configure the integrated certificate auto-renewal?
Öğeleri doğru sıraya koymak için sürükleyin
You are designing an ASP.NET Core Web API that is called by a web-based front-end client application. The Web API needs to request data from a downstream reporting database service. To comply with data privacy policies, the requests to the downstream service must execute under the security context of the specific user who logged into the front-end application, allowing the reporting service to audit access by individual user accounts. Which authentication flow and client application type should you implement in the Web API to meet these requirements?
A developer is configuring a C# ASP.NET Core web application hosted on an Azure App Service. The application must retrieve a database connection string stored in an Azure Key Vault named kv-prod using a Key Vault reference in the App Service configuration. The App Service is configured with a system-assigned managed identity. Which configuration should the developer apply to retrieve the secret value successfully?
You are developing a C# background worker service that runs on an on-premises server. The service must periodically query a secured downstream web API without any user interaction. You register the service in Microsoft Entra ID as a daemon application. You need to write code using MSAL.NET to acquire an access token for the downstream API.
Which two code segments should you use to instantiate the application client and acquire the token? (Select two.)
Geçerli olan tümünü seçin
You are developing a C# console application that runs on an Azure Virtual Machine. The application must perform key wrapping and unwrapping operations using an RSA key stored in an Azure Key Vault named kv-prod-keys. The Key Vault is configured to use the Azure Role-Based Access Control (Azure RBAC) permission model. The virtual machine has a system-assigned managed identity enabled. You need to grant the application the minimum necessary permissions to perform the operations and configure the application code using the latest Azure SDK for .NET. Which two actions should you perform? (Select TWO.)
Geçerli olan tümünü seçin
You are developing a secure .NET web API hosted on an Azure App Service. The API needs to programmatically retrieve an X.509 certificate, including its private key, from an Azure Key Vault named `kv-prod` to sign outgoing requests.
The App Service is configured with a system-assigned managed identity and has been assigned only the 'Key Vault Secrets User' Azure RBAC role on `kv-prod`.
Which C# code segment should you use to retrieve the certificate along with its private key?
KeyVaultSecret secret = await client.GetSecretAsync("SigningCert");
var certificate = new X509Certificate2(Convert.FromBase64String(secret.Value));
KeyVaultCertificateWithPolicy cert = await client.GetCertificateAsync("SigningCert");
var certificate = new X509Certificate2(cert.Cer);
KeyVaultKey key = await client.GetKeyAsync("SigningCert");
var certificate = new X509Certificate2(key.Key.N);
var client = new SecretClient(new Uri("https://kv-prod.vault.azure.net/"), credential);
KeyVaultSecret secret = await client.GetSecretAsync("SigningCert");
var certificate = new X509Certificate2(Convert.FromBase64String(secret.Value));
You need to create a new SSL/TLS certificate in Azure Key Vault using a non-integrated Certificate Authority (CA). Which sequence of steps should you perform to generate the Certificate Signing Request (CSR) and complete the certificate creation in Key Vault?
Öğeleri doğru sıraya koymak için sürükleyin
You are developing an ASP.NET Core Web API that must secure its endpoints using the Microsoft Identity Platform. The Web API will accept JWT access tokens sent by client applications in the HTTP Authorization header. You need to configure the Web API to validate these tokens using the `Microsoft.Identity.Web` library. Which two actions should you perform to complete the configuration? (Select two.)
Geçerli olan tümünü seçin
Your company is migrating an Azure App Service web application to a new security model. The web application must retrieve database connection strings stored as secrets in an Azure Key Vault. The Key Vault is configured to use the Azure role-based access control (Azure RBAC) authorization model. You need to configure the minimum permissions required for the web application's system-assigned managed identity to read the secrets. Which configuration should you apply?
A C# background service runs on an Azure Virtual Machine that is configured with a user-assigned managed identity. The service must decrypt sensitive application data using an asymmetric key named `app-decrypt-key` stored in an Azure Key Vault named `contoso-vault`. The Key Vault has Azure role-based access control (Azure RBAC) enabled as its authorization model. You need to grant the minimum necessary permissions to the managed identity and implement the decryption logic in the service's C# code using the Azure SDK for .NET. Which two actions should you perform? (Choose two.)
Geçerli olan tümünü seçin
You are developing a command-line interface (CLI) tool in C# that developers will run on Linux servers without a graphical user interface (GUI). The CLI tool must authenticate users against Microsoft Entra ID to access a secure downstream API on their behalf. You need to configure the Microsoft Entra ID application registration and implement the token acquisition logic in the C# code. Which two actions should you perform? (Select two.)
Geçerli olan tümünü seçin
A developer deploys a C# API to an Azure App Service named api-prod. The API retrieves its database password from an Azure Key Vault named kv-prod. The Key Vault's permission model is configured to use Azure role-based access control (Azure RBAC).
To configure the App Service, the developer creates an application setting named DbPassword with the following value:
@Microsoft.KeyVault(SecretUri=https://kv-prod.vault.azure.net/secrets/DbPassword)
After enabling the system-assigned managed identity on api-prod, the developer observes that the API receives a 403 Forbidden error when trying to retrieve the secret.
Which of the following actions should you perform to resolve the secret retrieval failure?
You are developing a C# desktop application that will run on employee workstations. The application needs to retrieve user-specific records from an Azure SQL Database. You want to authenticate users via the Microsoft Identity Platform and access the database using the signed-in user's identity. Which authentication configuration should you implement?
You are developing a secure C# web API that retrieves a database credential secret from Azure Key Vault. You need to automate the rotation of this secret using Azure Event Grid and a custom Azure Function. Which sequence of steps should you perform to configure the automated rotation?
Öğeleri doğru sıraya koymak için sürükleyin
You are developing a C# background daemon service that will run on an on-premises server. The service must periodically authenticate to the Microsoft Identity Platform without user interaction and retrieve files from a protected web API. You decide to use a client certificate stored in Azure Key Vault for authentication. The daemon service has an application registration in Microsoft Entra ID. Which two actions must you perform to configure the authentication flow and permissions? (Select two.)
Geçerli olan tümünü seçin
A development team is building a native C# client application that runs on domain-joined user workstations. The application needs to request an access token from the Microsoft Identity Platform to query a secure downstream Web API. The solution must support user accounts from any Microsoft Entra ID tenant as well as personal Microsoft accounts. Which approach should the team use to initialize the client application and configure authentication?