-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure trusted signing with service connection #8803
Comments
Hmmm, this is very interesting. Is there a way to determine that the |
AFAIK there's no way to know that az is logged in except trying to use the credentials. Wouldn't it be better to just mention the different ways that authentication can be done and leave it to the invoked command to try the different methods? Since the default method can use a number of different methods it's hard to check them all |
Can you run If not logged in, the stderr I receive is this, which I can definitely detect against:
|
This is the output (on stdout) when running
|
Can you try patching this file with the additional code below? In the
|
I tried it (with the small typo fixed:
|
An alternative could perhaps be to skip the env check if |
That's a great idea, but I'm hesitant to filter out |
The requirement to set AZURE environment variables interferes with the use of service connection to connect to the service from a devops pipeline (similar to this example).
I've gotten it to work by:
AZURE_TENANT_ID=$(ARM_TENANT_ID)
AZURE_CLIENT_ID='dummy'
AZURE_CLIENT_SECRET='dummy'
and this in
azureSignOptions
:"ExcludeEnvironmentCredential": "-Debug"
That will use the AzureCliCredentials. If the environment variables weren't required I think I wouldn't have to give dummy values nor pass the
-ExcludeEnvironmentCredential
flag to Invoke-TrustedSigning.The text was updated successfully, but these errors were encountered: