[#678] Setting CORS policy for metadata validation service in dev environment #690
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.
Closes #678.
The changes introduced in this pull request address the user story's need for the metadata validation service to be accessed exclusively from localhost for security reasons. The modification involves updating the CSP directive in the docker-compose.yml file to include 'https://www.googletagmanager.com' in the img-src directive, allowing resources from Google Tag Manager within the service. This adjustment enhances security by properly configuring the CSP policy to permit resources from specified sources, aligning with the requirement to limit access to the service strictly.
These changes improve the security of the metadata validation service by ensuring that only specified resources, like those from Google Tag Manager, are permitted within the service. The modification restricts external image pulling during the deployment process, ensuring that images are locally built without fetching from external repositories. By incorporating the
--build
flag in thedocker-compose
command, images are restricted to local building only. This aligns with the security goal of allowing access solely from localhost, strengthening the overall security posture of the service.