This pull request primarily introduces changes to enhance the authentication capabilities of the Power Platform provider. It adds support for Service Principal authentication using a client certificate, expands environment variables for credential configuration, and updates the documentation accordingly. The changes also involve the addition of a new helper function for certificate handling and modifications to the provider configuration to accommodate the new authentication method.
Authentication enhancements:
internal/powerplatform/config/config.go: Added new fields to ProviderCredentials and ProviderCredentialsModel structs to accommodate client certificate-based authentication. New methods were also introduced to check if client certificate credentials are provided. [1][2]
internal/powerplatform/api/auth.go: Added a new AuthenticateClientCertificate method in the Auth struct for handling client certificate-based authentication. The GetTokenForScopes method was also updated to include the new authentication method. [1][2]
internal/powerplatform/provider.go: Updated the Configure method to handle the configuration for client certificate-based authentication. New environment variables were also added to the schema. [1][2]
docs/index.md, templates/index.md.tmpl: Updated the documentation to include new resources about OIDC and instructions for Service Principal authentication using a client certificate. [1][2][3]
Dependency and codebase changes:
go.mod: Added a new dependency software.sslmate.com/src/go-pkcs12 v0.4.0 for handling PKCS#12 certificate bundles.
internal/powerplatform/api/auth.go, internal/powerplatform/provider.go: Removed commented-out code and made minor codebase improvements. [1][2][3][4]
This pull request primarily introduces changes to enhance the authentication capabilities of the Power Platform provider. It adds support for Service Principal authentication using a client certificate, expands environment variables for credential configuration, and updates the documentation accordingly. The changes also involve the addition of a new helper function for certificate handling and modifications to the provider configuration to accommodate the new authentication method.
Authentication enhancements:
internal/powerplatform/config/config.go
: Added new fields toProviderCredentials
andProviderCredentialsModel
structs to accommodate client certificate-based authentication. New methods were also introduced to check if client certificate credentials are provided. [1] [2]internal/powerplatform/api/auth.go
: Added a newAuthenticateClientCertificate
method in theAuth
struct for handling client certificate-based authentication. TheGetTokenForScopes
method was also updated to include the new authentication method. [1] [2]internal/powerplatform/provider.go
: Updated theConfigure
method to handle the configuration for client certificate-based authentication. New environment variables were also added to the schema. [1] [2]internal/powerplatform/helpers/cert.go
: Introduced a new helper function for handling certificate conversion and retrieval.Documentation updates:
docs/index.md
,templates/index.md.tmpl
: Updated the documentation to include new resources about OIDC and instructions for Service Principal authentication using a client certificate. [1] [2] [3]Dependency and codebase changes:
go.mod
: Added a new dependencysoftware.sslmate.com/src/go-pkcs12 v0.4.0
for handling PKCS#12 certificate bundles.internal/powerplatform/api/auth.go
,internal/powerplatform/provider.go
: Removed commented-out code and made minor codebase improvements. [1] [2] [3] [4]fix #351