Add check for Container Registry token on custom requests #3320
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Added interface called IContainerRegistryTokenVerifier with method CheckIfContainerRegistryAccessIsEnabled. In OSS, the base implementation of this method returns nothing, so it will not impact the current control flow. In PaaS, we will add an implementation of CheckIfContainerRegistryAccessIsEnabled which checks whether or not ExternalMI has been configured. If it has, the method will just return, if not, it will throw a 400-level error with a message specifying that External MI is not configured, which is required for custom requests.
Related issues
Addresses work item #103457
Testing
FHIR Team Checklist
Semver Change (docs)
Patch|Skip|Feature|Breaking (reason)