Skip to content

84-Character Azure DevOps PAT Not Supported in @gmangiapelo/wdio-azure-devops-serviceย #6

@waleedKhalidCalrom

Description

@waleedKhalidCalrom

@gianlucamangiapelo
@gianluca-mangiapelo-deltatre

The @gmangiapelo/wdio-azure-devops-service package does not work with the new 84-character Personal Access Tokens (PATs) from Azure DevOps. It results in the following error:

Error: Failed to initialize launcher service "Function": Error: Invalid Azure Test plan configuration

The service appears to expect only 52-character PATs, which Azure DevOps no longer provides by default.

๐Ÿ“Œ Microsoft Documentation on PAT Format Changes
According to Microsoft's documentation, Azure DevOps has significantly changed the PAT format to enhance security.

๐Ÿ”น Key Changes (July 2024 Update):

Increased token length: New PATs are 84 characters long (52 characters are randomized).
Fixed signature: Includes a fixed AZDO signature at positions 76-80 to improve secret detection and leak mitigation.
Stronger security: Increased entropy makes tokens more resistant to brute-force attacks.
๐Ÿ”น Action Required:

Regenerate existing PATs to use the new format.
Update integrations to support both 52-character and 84-character PATs.

Steps to Reproduce

Generate a new 84-character PAT from Azure DevOps.
Use the token in WebDriverIO configuration with @gmangiapelo/wdio-azure-devops-service.
Run WebDriverIO tests.
Observe the error: Invalid Azure Test plan configuration.
โœ… Expected Behavior

The service should support both 52-character and 84-character PATs to align with Azure DevOps' new authentication format.
The service should accept System.AccessToken, which is the built-in authentication token in Azure DevOps pipelines.
The service should recognize the fixed AZDO signature in new PATs and validate accordingly.
๐Ÿš€ Suggested Fix
The package should be updated to:

โœ… Support the new 84-character PATs from Azure DevOps.
โœ… Recognize the fixed AZDO signature in new PATs (positions 76-80).
โœ… Allow System.AccessToken authentication in addition to PATs.

Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions