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

Add new 'NonGovukDomains' module with 'EXTERNAL_HOST_REDIRECT_ALLOW_LIST' constant #367

Closed
wants to merge 2 commits into from

Conversation

ChrisBAshton
Copy link
Contributor

Currently, we have to try to keep three different allowlists in
sync:

If the lists fall out of sync, we risk being inconsistent in which
domains we allow redirects to, and potentially a data integrity
issue whereby a publishing app might think a redirect is fine,
but it's ultimately rejected in Publishing API.

This PR copies over the current iteration of allowed redirect
domains (which have been double-checked with Policy and Strategy
in https://gds.slack.com/archives/CADTL63QR/p1714556082803429).

When this is released, we can then update the publishing apps to
refer to this shared allowlist instead.

Currently, we have to try to keep three different allowlists in
sync:

- https://github.com/alphagov/whitehall/blob/b3ce66d717e8a78a2f59a3fce36f271359ab09e1/app/validators/gov_uk_url_format_validator.rb#L3-L11
- https://github.com/alphagov/short-url-manager/blob/d11edaa002b7c37eb7b3e45c1c289d99443eceef/app/models/concerns/short_url_validations.rb#L4-L15
- https://github.com/alphagov/publishing-api/blob/c82ab015b0751803302e352fc19deb23630daa7d/app/validators/routes_and_redirects_validator.rb#L2-L11

If the lists fall out of sync, we risk being inconsistent in which
domains we allow redirects to, and potentially a data integrity
issue whereby a publishing app might think a redirect is fine,
but it's ultimately rejected in Publishing API.

This commit copies over the current iteration of allowed redirect
domains (which have been double-checked with Policy and Strategy
in https://gds.slack.com/archives/CADTL63QR/p1714556082803429).

When this is released, we can then update the publishing apps to
refer to this shared allowlist instead.
@ChrisBAshton ChrisBAshton force-pushed the consolidate-domains branch from ebca8cb to ef04cc2 Compare May 2, 2024 14:24
@ChrisBAshton
Copy link
Contributor Author

The lists need to be kept separate - see https://govuk.zendesk.com/agent/tickets/5819962.

@ChrisBAshton ChrisBAshton deleted the consolidate-domains branch May 16, 2024 09:17
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