-
Notifications
You must be signed in to change notification settings - Fork 74
Description
Describe the bug
We use on-prem azure devops windows agents and are trying to to use the OIDC connection to a on-prem artifactory instance.
When we run the pipeline in Azure DevOps the task fails and the only message we get is Task failed, Error. We are not able to figure what this is caused by even though we have enabled DEBUG and system diagnostics.
We have opened proxies that we think is needed but don't seem to understand what is missing....
Any suggestions are welcome.
Current behavior
##[debug]Agent.Version=4.259.0
##[debug]Agent.ToolsDirectory=E:\Sysapp\AZDOAgents\A7_work_tool
##[debug]checking cache: E:\Sysapp\AZDOAgents\A7_work_tool\jf\2.76.1\x64
Found tool in cache: jf 2.76.1 x64
##[debug]Using existing versioned cli path: E:\Sysapp\AZDOAgents\A7_work_tool\jf\2.76.1\x64\jf.exe
Running jfrog-cli from E:\Sysapp\AZDOAgents\A7_work_tool\jf\2.76.1\x64\jf.exe
JFrog CLI version: 2.76.1
##[debug]set JFROG_CLI_TASK_SELECTED_VERSION_AZURE=2.76.1
##[debug]Processed: ##vso[task.setvariable variable=JFROG_CLI_TASK_SELECTED_VERSION_AZURE;isOutput=false;issecret=false;]2.76.1
##[debug]System.DefaultWorkingDirectory=E:\Sysapp\AZDOAgents\A7_work\1\s
##[debug]workingDirectory=E:\Sysapp\AZDOAgents\A7_work\1\s
##[debug]connection=xxxxxxx5-b9b3-4b61-b040-8d6aad4b2561
##[debug]Build.DefinitionName=Staffan-test
##[debug]Build.BuildNumber=Update.Feed
##[debug]a757d2c5-b9b3-4b61-b040-8d6aad4b2561=***
##[debug]a757d2c5-b9b3-4b61-b040-8d6aad4b2561 auth param username = undefined
##[debug]a757d2c5-b9b3-4b61-b040-8d6aad4b2561 auth param password = undefined
##[debug]a757d2c5-b9b3-4b61-b040-8d6aad4b2561 auth param apitoken = undefined
##[debug]a757d2c5-b9b3-4b61-b040-8d6aad4b2561 auth param oidcProviderName = ***
##[debug]JFROG_CLI_TASK_SELECTED_VERSION_AZURE=2.76.1
##[debug]a757d2c5-b9b3-4b61-xxxxxxxxx561 auth param oidcAudience = undefined
##[debug]Build.Repository.Name=Staffan-test
##[debug]System.CollectionUri=https://dev.azure.com/xxxxxxxxxxTest/
##[debug]System.TeamProjectId=4574f562-1776-4aff-abeb-xxxxxxx1
##[debug]System.HostType=build
##[debug]System.PlanId=86aaedf6-dbb3-44d9-b26f-7a16dd170976
##[debug]System.JobId=e380913e-4f92-5686-0710-f5bc9b33d8f4
##[debug]System.AccessToken=***
##[debug]Agent environment resources - Disk: E:\ Available 16211.63 MB out of 20463.00 MB, Memory: Used 2422.00 MB out of 8140.00 MB, CPU: Usage 3.00%
##[debug]Agent environment resources - Disk: E:\ Available 16211.67 MB out of 20463.00 MB, Memory: Used 2412.00 MB out of 8140.00 MB, CPU: Usage 1.00%
##[debug]Agent environment resources - Disk: E:\ Available 16211.67 MB out of 20463.00 MB, Memory: Used 2408.00 MB out of 8140.00 MB, CPU: Usage 5.00%
##[debug]Agent environment resources - Disk: E:\ Available 16211.67 MB out of 20463.00 MB, Memory: Used 2407.00 MB out of 8140.00 MB, CPU: Usage 5.00%
##[debug]task result: Failed
##[error]Error occurred while executing task: Error
##[debug]Processed: ##vso[task.issue type=error;]Error occurred while executing task: Error
##[debug]Processed: ##vso[task.complete result=Failed;]Error occurred while executing task: Error
Reproduction steps
Run JFrog JfrogCliV2@1 task on on-prem azure devops agent behind proxy using OIDC authentication.
We have tested to reach https://vstoken.dev.azure.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx from a browser on the azure devops agent to verify that the proxy is open for that and we get the OIDC response correct then.
We have set the following variables in the yaml pipeline.
variables:
HTTP_PROXY: "https://proxy.se:8000"
HTTPS_PROXY: "https://proxy.se:8000"
NO_PROXY: "*.local.domain"
system.debug: true # aktiverar maximal loggning
JFROG_CLI_LOG_LEVEL: DEBUG
Expected behavior
If we change to a Microsoft Hosted agent the task also fails because it can not reach the artifactory instance (on-prem) but we at least gets the OIDC response, i.e.
OIDC Token Subject: sc:////
OIDC Token Claims: {"sub": "sc:////"}
OIDC Token Issuer: https://vstoken.dev.azure.com/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
OIDC Token Audience: api://AzureADTokenExchange
When we run on the on-prem agent we don't get that response.
Azure DevOps extension name and version
JFrog Azure Devops extension 2.12.0 (Latest)
JFrog CLI version
2.76.1
Operating system type and version
Windows 2022
JFrog Artifactory version (if relevant)
7.117.15 rev 81715900
JFrog Xray version (if relevant)
No response
JFrog Distribution version (if relevant)
No response