Skip to content
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

how do I specify authentication #768

Open
rwsdwatson opened this issue Aug 29, 2024 · 6 comments
Open

how do I specify authentication #768

rwsdwatson opened this issue Aug 29, 2024 · 6 comments

Comments

@rwsdwatson
Copy link

I don't see how this action authenticates against the Azdo project.
If i just add it to a pipeline it fails with :-

Error: Got code 203, URL: https://dev.azure.com/git/git/_apis/build/builds?definitions=1258&statusFilter=completed&resultFilter=succeeded&reasonFilter=all&$top=1, message: Non-Authoritative Information

@rimrul
Copy link
Member

rimrul commented Aug 29, 2024

I don't see how this action authenticates 

I don't think it does. But we do have some azure piplines authentication code elsewhere that we could probably port over here.

@dscho
Copy link
Member

dscho commented Aug 29, 2024

Got code 203

That does not exactly say that authentication is required...

I don't see how this action authenticates

I don't think it does.

Indeed. This Action currently only supports public Azure Pipelines.

But we do have some azure piplines authentication code elsewhere that we could probably port over here.

I suspect that it might be a bit more complicated than that, as it seems that Azure Pipelines is moving away from Personal Access Tokens (indeed, the documentation currently only mentions OAuth 2.0 as way to authenticate).

Maybe we can integrate with https://github.com/azure/login instead of rolling our own authentication here? Then you should be able to use Managed Identities, which are quite safe from a security perspective because you can reduce the scope quite stringently.

@dscho
Copy link
Member

dscho commented Aug 29, 2024

https://dev.azure.com/git/git/_apis/build/builds?definitions=1258&statusFilter=completed&resultFilter=succeeded&reasonFilter=all&$top=1

Are you sure that you specified the correct Azure DevOps project/repository? I ask because the git/git project has no Azure Pipeline with ID 1258:

Image

@rimrul
Copy link
Member

rimrul commented Aug 29, 2024

https://dev.azure.com/git/git/_apis/build/builds?definitions=1258&statusFilter=completed&resultFilter=succeeded&reasonFilter=all&$top=1

Are you sure that you specified the correct Azure DevOps project/repository? I ask because the git/git project has no Azure Pipeline with ID 1258:

Image

That seems to be an artefact from annoymization.

@rimrul
Copy link
Member

rimrul commented Aug 29, 2024

Maybe we can integrate with https://github.com/azure/login instead of rolling our own authentication here?

That's only a wrapper around Azure CLI and Azure Powershell. I think neither of those leaves a usable session for us, but there is the Azure Identity client library for JavaScript

@rwsdwatson
Copy link
Author

rwsdwatson commented Aug 30, 2024

https://dev.azure.com/git/git/_apis/build/builds?definitions=1258&statusFilter=completed&resultFilter=succeeded&reasonFilter=all&$top=1

Are you sure that you specified the correct Azure DevOps project/repository? I ask because the git/git project has no Azure Pipeline with ID 1258:

Image

Sorry I edited the url to hide my private org / project.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants