Skip to content

OIDC Invalid platform URL #566

@tiwarishrijan

Description

@tiwarishrijan

Describe the bug

Based on current code Platform URL is constructed from Server URL and /artifactory or /xray is replaced. If HOST name contains /artifactory or /xray then HOST Name is wrongly constructed.

Ex:
https://artifactory.xxxxx.xxxx/artifactory -----> https://.xxxxx.xxxx/artifactory

Current behavior

/azp/_work/_tool/jf/2.85.0/x64/jf eot "***" "*** --url="https:/.xxxxx.xxxxxxxx/artifactory" --oidc-provider-type=Azure --oidc-audience="api://AzureADTokenExchange" --repository="xxx-xxx-xxxxxxxx"
10:02:31 [Warn] (Attempt 1) - Failure occurred while sending POST request to https:/.xxxxx.xxxxxx/artifactory/access/api/v1/oidc/token: Post "https:/.xxxxx.xxxxxx/artifactory/access/api/v1/oidc/token": http: no Host in request URL
10:02:31 [Warn] (Attempt 2) - Failure occurred while sending POST request to https:/.xxxxx.xxxxxx/artifactory/access/api/v1/oidc/token: Post "https:/.xxxxx.xxxxxx/artifactory/access/api/v1/oidc/token": http: no Host in request URL
10:02:31 [Warn] (Attempt 3) - Failure occurred while sending POST request to https:/.xxxxx.xxxxxx/artifactory/access/api/v1/oidc/token: Post "https:/.xxxxx.xxxxxx/artifactory/access/api/v1/oidc/token": http: no Host in request URL
10:02:31 [Warn] (Attempt 4) - Failure occurred while sending POST request to https:/.xxxxx.xxxxxx/artifactory/access/api/v1/oidc/token: Post "https:/.xxxxx.xxxxxx/artifactory/access/api/v1/oidc/token": http: no Host in request URL
10:02:31 [Info] executor timeout after 3 attempts with 0 milliseconds wait intervals

Reproduction steps

No response

Expected behavior

No response

Azure DevOps extension name and version

JFrog

JFrog CLI version

2.85.0

Operating system type and version

Ubuntu 24.04 - x64

JFrog Artifactory version (if relevant)

No response

JFrog Xray version (if relevant)

No response

JFrog Distribution version (if relevant)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions