You are developing a background daemon application that runs on an on-premises Windows server. The application must run unattended to process files and upload them to an Azure Blob Storage container. You need to configure authentication and authorization for the application, ensuring that it uses Microsoft Entra ID and adheres to the principle of least privilege.
Which of the following authentication and authorization configurations should you implement?
- AEnable a system-assigned managed identity on the on-premises Windows server, and assign the Storage Blob Data Contributor role to the managed identity.
- BRegister the application in Microsoft Entra ID, configure a client secret, and grant the application registration's Application ID access to the storage account by adding it to an Azure Key Vault access policy.
- Register the application in Microsoft Entra ID to create an application object and a corresponding service principal, configure a certificate credential for authentication, and assign the Storage Blob Data Contributor role to the service principal.Cevap
- DGenerate an Account Shared Access Signature (SAS) token with read and write permissions, configure the daemon application to use this SAS token for all storage operations, and store the token in the application configuration.
Cevap
Register the application in Microsoft Entra ID to create an application object and a corresponding service principal, configure a certificate credential for authentication, and assign the Storage Blob Data Contributor role to the service principal.
Registering the application in Microsoft Entra ID creates both an application object (defining the app globally) and a service principal (the local representation used for authentication and authorization in the tenant). Because the daemon application runs on-premises, it cannot natively use a managed identity. Authenticating using a certificate credential (rather than a client secret) provides a more secure approach for unattended daemon services. Granting the Storage Blob Data Contributor role to the service principal via Azure Role-Based Access Control (RBAC) ensures the application has only the permissions required to upload files to Blob Storage.
Adım Adım Çözüm
Anahtar Kavram
App Registrations and Service Principals for On-Premises Daemon Applications