-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Azure DevOps webhook 401 unauthorized error #2736
Comments
Today I try with no @org in the username and get this error
The only difference between yesterday and today is the update of the image |
Facing the same issue with atlantis versions 0.20 and 0.21, is there any solution already? 2022/12/02 14:27:36 PANIC: runtime error: index out of range [1] with length 1 |
@acostaedg @gaom25 is this a recent issue or has it always been an issue? Please try a previous stable release and confirm |
Hi @nitrocode I already tested versions from v0.18.5 to latest and the issue is there, always the webhook test from Azure DevOps fails. But, it's important to mention that from actual Pull Requests created, updated, or commented in Azure DevOps repos it works fine. The issue is triggered as I mentioned before, from webhook tests, and also when a comment is removed manually from a Pull Request it appears again. |
Ok then to summarize, it seems like this issue may have always been present and this is not a regression which is what was most concerning to me. Please review the code and see where it can be improved or if we need updates to our docs. Most of our maintainers use aws for deployment so we're lacking on azure setups. |
As @acostaedg said the problem happen with the test button in AzureDevops but when the webhook is applied it works correctly |
This may be a duplicate of #2641 |
Community Note
Overview of the Issue
I have a problem connection atlantis with azure devops, basically when I try the webhook it says 401 unauthorized error, let me explain the whole set up and configuration that I did:
Reproduction Steps
I create a webhook in azure devops with all permission just to test, lets call this string WEB_TOKEN
I use ngrok to test the deployment in local, for that I use ngrok image and atlantis image(ghcr.io/runatlantis/atlantis:latest )
I use the env vars of
ATLANTIS_ATLANTIS_URL= ngrok url
ATLANTIS_AZUREDEVOPS_USER = my account in azure devops with the whole email [email protected]
ATLANTIS_AZUREDEVOPS_TOKEN = the value of WEB_TOKEN
ATLANTIS_AZUREDEVOPS_WEBHOOK_USER = the same email for azure devops user env var
ATLANTIS_AZUREDEVOPS_WEBHOOK_PASSWORD = the password for the user of azure devops
ATLANTIS_REPO_ALLOWLIST = * (just for test)
Then when I want to create the webhook in azure devops I set the values:
URL = the url of ngrok with /events at the end
username = the username [email protected]
password = the same password of the user and is the same as ATLANTIS_AZUREDEVOPS_WEBHOOK_PASSWORD
Logs
When I try the webhook the request reaches atlantis but it fails with 401 respons as image
Also, it shows an error message "ValidatePayload authentication failed"
Environment details
The text was updated successfully, but these errors were encountered: