Skip to content

Webhooks not compatible with alternative SSH addressing schemes #19314

Closed
@mtbennett-godaddy

Description

@mtbennett-godaddy

Checklist:

  • I've searched in the docs and FAQ for my answer: https://bit.ly/argocd-faq.
  • I've included steps to reproduce the bug.
  • I've pasted the output of argocd version.

Describe the bug

My environment doesn’t allow traffic on SSH port so i have to use GitHub’s alternative here to do SSH over 443: https://docs.github.com/en/authentication/troubleshooting-ssh/using-ssh-over-the-https-port. There are no issues with Application sync. Everything in that area works fine. However, I can’t get webhooks to work because the hostname in the payload doesn’t match the hostname in the ApplicationSet’s repo URL:

ssh://git@ssh.github.com:443/ORG/REPO.git does not match (?i)(http://|https://|\\w+@|ssh://(\\w+@)?)github.com(:[0-9]+|)[:/]ORG/REPO(\\.git)?

Using that alternative addressing scheme, we point to ssh subdomain but the URL in the webhook payload has no subdomain.

To Reproduce

In our particular case, we’re using an ApplicationSet with a matrix generator where one of the child generators is a Git generator using an ssh://git@ssh.github.com:443 URL. But the same regular expression gap appears to exist no matter how an Application or ApplicationSet references a repo.

Expected behavior

Webhook handler should work when Application/ApplicationSet use alternative SSH addressing but webhook payload does not.

Screenshots

n/a

Version

(We’re currently stuck on 2.10.9 due to #18151.)

{
    "Version": "v2.10.9+c071af8",
    "BuildDate": "2024-04-30T15:53:28Z",
    "GitCommit": "c071af808170bfc39cbdf6b9be4d0212dd66db0c",
    "GitTreeState": "clean",
    "GoVersion": "go1.21.3",
    "Compiler": "gc",
    "Platform": "linux/arm64",
    "KustomizeVersion": "v5.2.1 2023-10-19T20:13:51Z",
    "HelmVersion": "v3.14.3+gf03cc04",
    "KubectlVersion": "v0.26.11",
    "JsonnetVersion": "v0.20.0"
}

Logs

ssh://git@ssh.github.com:443/ORG/REPO.git does not match (?i)(http://|https://|\\w+@|ssh://(\\w+@)?)github.com(:[0-9]+|)[:/]ORG/REPO(\\.git)?

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingcomponent:application-setsBulk application management relatedtype:bugversion:EOLLatest confirmed affected version has reached EOL

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions