tomkerkhove / promitor

Bringing Azure Monitor metrics where you need them.
https://promitor.io
MIT License
249 stars 91 forks source link

Migrate promitor to the Microsoft Authentication Library (MSAL) #2160

Open brain-slug opened 1 year ago

brain-slug commented 1 year ago

Proposal

I am using ghcr.io/tomkerkhove/promitor-agent-scraper:2.8.0 with Azure ServicePrincipal Auth

authentication:
  mode: ServicePrincipal
  identityId: {{SERVICE_PRINCIPAL_CLIENT_ID}}

Looking at the ServicePrincipal sign-in logs in Azure I can see the following:

        "authenticationProcessingDetails": [
            {
                "key": "Azure AD App Authentication Library",
                "value": "Family: ADAL Library: ADAL.NET 4.3.0.0 Platform: .NET Core"
            }
        ]

Microsoft ADAL is approaching EOL December 2022, so if the logs are correct I would suggest to migrate to MSAL

https://learn.microsoft.com/en-us/azure/active-directory/develop/msal-migration

https://learn.microsoft.com/en-us/azure/active-directory/develop/msal-net-migration

Component

Scraper

Contact Details

No response

tomkerkhove commented 1 year ago

There's already an issue for it as this is part of the Azure SDK AFIK because this shows but I'm happy to review PRs with contributions.