dataform-co / dataform-web-tracking

Dataform is a collaborative data modelling platform that enables analysts and engineers to manage complex data models in SQL
https://dataform.co
MIT License
2 stars 0 forks source link

Git token validation doesn't work for self-hosted Azure domains #271

Closed dwl285 closed 4 years ago

dwl285 commented 4 years ago

Notes from discussion: Making that show invalid for custom domains is difficult, as there's no generic API for us to test against.

Currently we use a well defined API for each, e.g. the GitHub API, Gitlab etc, but if there's an odd domain like this then we can't test the token is correct without running it against a git repo. Running against a git repo for a user token doesn't make any sense though, as the token can (potentially) authenticate many repos!

A workaround for this specific case would be to check the url for the .visualstudo. regex, then use the Azure API (with ...visualstudio. as the host).

Ekrekr commented 4 years ago

Scheduling works for the standard dev.azure.com token, but fails for the custom hosted domain (the evidence here being from the customer, as we don't have our own custom set up). Further steps:

Ekrekr commented 4 years ago

Some further digging revealed that the repository we're having the issue with is just using the old format for azure repos, which looks like some_subdomain.visualstudio.com, as described in the thread here: https://developercommunity.visualstudio.com/content/problem/765309/switch-existing-organizations-to-use-the-new-domai.html. Recommendation for that customer is to upgrade their project away from the deprecated url format.

The second point is still valid though, of validating scheduler access tokens directly against the repo

Ekrekr commented 4 years ago

Closed as issue solved and awaiting DD