Skip to content

Register MAR as default trusted repository#1955

Open
adityapatwardhan wants to merge 2 commits intomasterfrom
MARAsDefault
Open

Register MAR as default trusted repository#1955
adityapatwardhan wants to merge 2 commits intomasterfrom
MARAsDefault

Conversation

@adityapatwardhan
Copy link
Member

PR Summary

This pull request adds support for the automatic registration and protection of the Microsoft Artifact Registry (MAR) repository in the PSResourceGet module. MAR is now registered by default alongside PSGallery, with a higher priority and trusted status. The changes ensure MAR cannot be manually registered, have its URI or credentials set, and update the documentation and tests to reflect its new behavior.

MAR Repository Registration and Protection

  • MAR is now automatically registered with default values (name, URI, priority, trusted status, and API version) when the repository store is created or reset, and appears in the default repository XML file. [1] [2] [3] [4]
  • Added logic to prevent manual registration of MAR via the Register-PSResourceRepository cmdlet, including case-insensitive name checking and error handling for hashtable registration. [1] [2] [3]
  • Prevented changes to MAR's URI or credentials via the Set-PSResourceRepository cmdlet, with appropriate error messages.
  • Updated dynamic parameter logic to ensure credential provider options are not shown for MAR.

Documentation and Messaging Updates

  • Updated commandlet documentation and verbose messages to indicate that both PSGallery and MAR are registered by default and after a reset. [1] [2] [3]

Testing Enhancements

  • Added new test utilities and a comprehensive test suite for MAR, verifying its default registration, protection against manual registration and modification, and behavior during repository store reset operations. [1] [2] [3]

PR Context

PR Checklist

@adityapatwardhan
Copy link
Member Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

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

Successfully merging this pull request may close these issues.

1 participant