jfrog / jfrog-azure-devops-extension

Apache License 2.0
46 stars 61 forks source link

Token (reference token) based authentication is not working as expected in Azure DevOps. #455

Open ashrithacjfrog opened 8 months ago

ashrithacjfrog commented 8 months ago

Describe the bug

When we configure Artifactory service connection in Azure DevOps with reference token it fails with authentication errors.

[Warn] couldn’t extract payload from Access Token. The provided access token is not a valid JWT, probably a reference token. Some package managers only support basic authentication which requires also a username. If you plan to work with one of those package managers, please provide a username.

Current behavior

When we configure Artifactory service connection in Azure DevOps with reference token it fails with authentication errors.

[Warn] couldn’t extract payload from Access Token. The provided access token is not a valid JWT, probably a reference token. Some package managers only support basic authentication which requires also a username. If you plan to work with one of those package managers, please provide a username.

Reproduction steps

  1. Navigate to JFrog_platform_UI | admin | user_management | Access tokens - Now generate a access token with create reference token check box enabled.
  2. Login to Azure DevOps and update the JFrog platform service connection to use token based authentication and update the reference token.
  3. Trigger a build, it will fail with authentication issue.

[Warn] couldn’t extract payload from Access Token. The provided access token is not a valid JWT, probably a reference token. Some package managers only support basic authentication which requires also a username. If you plan to work with one of those package managers, please provide a username.

Expected behavior

The service connection should work with Artifactory reference token.

Workaround is to update the service connection to basic authentication and use username and reference token.

Azure DevOps extension name and version

JFrog service onnection

JFrog CLI version

2.50.2

Operating system type and version

Ubuntu X

JFrog Artifactory version (if relevant)

7.71.1

JFrog Xray version (if relevant)

No response

JFrog Distribution version (if relevant)

No response