Open jbgi opened 6 years ago
Authenticating via service principal doesn't work as well (a similar message about the acquire_token_with_username_password
attribute is shown).
This is a huge problem, and it wasn't addressed in any way for more than a month. Is NixOps even maintained?..
It seems adal.acquire_token_with_username_password
is wrong.
For example,
context = adal.AuthenticationContext(self.authority_url)
context.acquire_token_with_username_password
However, acquire_token_with_username_password required the OAuth client id. https://github.com/AzureAD/azure-activedirectory-library-for-python/blob/a73579d84983012e546c26d308d4894590c9fea5/adal/authentication_context.py#L133
And, Microsoft doesn't recommended auth with username and password, so, I think, on NixOps codes, it needs to reconsider authentication method for Azure and nix expressions for deploying to Azure. https://github.com/AzureAD/azure-activedirectory-library-for-python/issues/50 https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-authentication-scenarios
Now, if we use Azure with NixOps, we should prepare the web app server for authentication. https://docs.microsoft.com/en-us/azure/active-directory/develop/active-directory-authentication-scenarios
Is it working now after #853 got merged?
Azure deployment does not work anymore because of some changes in the new version of the
adal
python lib packaged for 17.09+ .It looks access to functions
acquire_token_with_client_credentials
/acquire_token_with_username_password
needs a different import:error: 'module' object has no attribute 'acquire_token_with_username_password'
at https://github.com/NixOS/nixops/blob/ab5256aec4d5cb06e3142ce011c95459736642b2/nixops/azure_common.py#L275