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

ACR repository authentication - non-interactively #1622

Open
Gijsreyn opened this issue Apr 3, 2024 · 5 comments
Open

ACR repository authentication - non-interactively #1622

Gijsreyn opened this issue Apr 3, 2024 · 5 comments

Comments

@Gijsreyn
Copy link

Gijsreyn commented Apr 3, 2024

Summary of the new feature / enhancement

It's awesome to see the investment the PowerShell team is making, and I really love seeing ACR being added as private repository capabilities.

However, my instant thought came to rise, is it also possible to connect to ACR repository non-interactively? Such scenario will be extremely useful when automating tasks.

Proposed technical implementation details (optional)

No response

@SydneyhSmith
Copy link
Collaborator

We support the whole Azure Identity sdk which includes non-interactive options, we plan to write a doc about using it in automation in the future, for our CI we use workload identity federation https://learn.microsoft.com/en-us/dotnet/api/overview/azure/identity-readme?view=azure-dotnet#defaultazurecredential

@adityapatwardhan
Copy link
Member

Also storing the Az Access Token in Secret Store before registering can be used for non-interactive scenarios. Please see the documentation at: https://learn.microsoft.com/en-us/powershell/gallery/powershellget/how-to/credential-persistence?view=powershellget-3.x#add-a-credential-to-a-psresourcerepository

@Gijsreyn
Copy link
Author

Gijsreyn commented Apr 5, 2024

Thanks for the quick responses @SydneyhSmith and @adityapatwardhan. I might have been a bit to fast and should have just tried it out or could have asked the question in the community call when you presented it. Anyway, will give it a go. Thanks once again!

@adityapatwardhan
Copy link
Member

No worries. Let us know how it goes. Feedback is invaluable.

@Gijsreyn
Copy link
Author

Gijsreyn commented Apr 6, 2024

@adityapatwardhan It wasn't even needed. I created it through Azure DevOps using the SPN from the Azure PowerShell task. Shared it for others if they want to see it at: https://gijsreijn.medium.com/build-and-publish-your-powershell-modules-to-azure-container-registry-using-azure-devops-c5aac13b001d

image

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

No branches or pull requests

3 participants