newrelic / nri-flex

An application-agnostic, all-in-one New Relic integration integration
https://docs.newrelic.com/docs/introduction-new-relics-flex-integration
Apache License 2.0
105 stars 119 forks source link

Updated the MSSQL driver to use Azure tokens #496

Open Dkairu opened 1 month ago

Dkairu commented 1 month ago

The current MSSQL driver uses username and password to authenticate but not enough options are offered to authenticate against MS Entra ID formerly Active directory…This PR gives additional options like using tokens that are dynamically generated from Entra ID/ Active Directory instead of user password to provide flexibility of using the integration.

Kav91 commented 1 month ago

Is this backwards compatible with the existing implementation? I can't see anything in the main readme confirming this.

Dkairu commented 1 month ago

@Kav91 Yes as a matter of fact it uses the modules from the original driver https://github.com/denisenkom/go-mssqldb/blob/master/azuread/driver.go. I did test with a user name and password and it works. This is also called out in the main README see https://github.com/denisenkom/go-mssqldb/tree/master?tab=readme-ov-file#azure-active-directory-authentication

// Import the Azure AD driver module (also imports the regular driver package)