Skip to content

Put cName in version control - #1654

Merged
JuliaBrigitte merged 2 commits into
mainfrom
aajb/version-controlling-ns1-record
Feb 2, 2026
Merged

Put cName in version control#1654
JuliaBrigitte merged 2 commits into
mainfrom
aajb/version-controlling-ns1-record

Conversation

@JuliaBrigitte

@JuliaBrigitte JuliaBrigitte commented Jan 28, 2026

Copy link
Copy Markdown
Contributor

What does this change?

This PR prepares for migrating traffic to the new GuCDK infrastructure for the registrations service by bringing a CNAME (DNS record) into version control. Up to this point the CNAME has been managed manually via the NS1 console.

See Start managing report's NS1 CNAME via GuCDK for further details.

How to test

Deploy to CODE


Co-authored by: @akash1810

@JuliaBrigitte
JuliaBrigitte force-pushed the aajb/version-controlling-ns1-record branch from 18cd765 to 884e265 Compare January 28, 2026 15:50
@github-actions

github-actions Bot commented Jan 28, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jan 28, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jan 28, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jan 28, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Jan 28, 2026

Copy link
Copy Markdown
Contributor

@JuliaBrigitte JuliaBrigitte changed the title Put cName in version control in order Put cName in version control Jan 29, 2026
Comment thread cdk/lib/registration.ts

adjustCloudformationParameters(this);

new GuCname(this, 'DnsRecordForRegistration', {

@jacobwinch jacobwinch Jan 29, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jorgeazevedo and I did a bit more digging into this yesterday.

The DNS setup for registration is actually a bit more complicated than the setup for report and notification.

We have 2(!) intermediate CNAMEs for registration, rather than 1:

;; ANSWER SECTION:
notifications.guardianapis.com.	3825 IN	CNAME	registration.notifications.guardianapis.com.
registration.notifications.guardianapis.com. 225 IN CNAME registration.notifications-aws.guardianapis.com.
registration.notifications-aws.guardianapis.com. 60 IN CNAME mobile-no-loadbala-1oljehvjszyof-880073426.eu-west-1.elb.amazonaws.com.
mobile-no-loadbala-1oljehvjszyof-880073426.eu-west-1.elb.amazonaws.com.	60 IN A	63.33.239.23
mobile-no-loadbala-1oljehvjszyof-880073426.eu-west-1.elb.amazonaws.com.	60 IN A	52.214.243.203
mobile-no-loadbala-1oljehvjszyof-880073426.eu-west-1.elb.amazonaws.com.	60 IN A	54.171.19.238

The important part of the current setup in the context of this PR is:

notifications.guardianapis.com (NS1) -> registration.notifications.guardianapis.com (NS1) -> registration.notifications-aws.guardianapis.com (Route53)

This PR is trying to manage a DNS record that looks like this:

notifications.guardianapis.com (NS1) -> registration.notifications-aws.guardianapis.com (Route53)

I.e. we have removed registration.notifications.guardianapis.com from the chain entirely.

IIUC the proposed change will not deploy, because in order to 'take ownership' of an NS1 record1 all properties must match the current state of the record.

Footnotes

  1. This is a CREATE operation in CloudFormation terms.

@jacobwinch jacobwinch Jan 29, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ultimately, I think we want to end up with:

notifications.guardianapis.com (NS1) -> our GuCDK ALB's domain name

In order to get there we have a few options1, but I would probably suggest:

1st PR (this one!): add 2 GuCname constructs:

  1. notifications.guardianapis.com -> registration.notifications.guardianapis.com
  2. registration.notifications.guardianapis.com -> registration.notifications-aws.guardianapis.com

2nd PR: drop the TTL for the notifications.guardianapis.com -> registration.notifications.guardianapis.com record to 60 seconds.

3rd PR: update notifications.guardianapis.com to point at our GuCDK ALB's domain name (this is the important PR from a user-perspective - it sends all traffic to the new infrastructure).

4th PR: Delete the unused registration.notifications.guardianapis.com -> registration.notifications-aws.guardianapis.com GuCname and remove the legacy template (which includes the unused Route53 record for registration.notifications-aws.guardianapis.com -> legacy ELB's domain name)

Footnotes

  1. For example, it's not strictly necessary to 'take ownership' of the registration.notifications.guardianapis.com -> registration.notifications-aws.guardianapis.com record, but doing so allows us to delete the record using a PR / Riff-Raff deployment (rather than by doing it manually in the NS1 console). This reduces risk and improves the audit trail.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good spot, thanks. Strangely, it looks like we might have misread the TTL for PROD too as Service Catalogue suggests both records have a 7200 TTL.

@akash1810 akash1810 Jan 30, 2026

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1st PR (this one!): add 2 GuCname constructs:

  1. notifications.guardianapis.com -> registration.notifications.guardianapis.com
  2. registration.notifications.guardianapis.com -> registration.notifications-aws.guardianapis.com

I'm not sure we need to take ownership of the middle NS1 record (registration.notifications.guardianapis.com)1 as it cannot be in use by any client due to TLS certificate being used not having a relevant subject alternative name. That is, if a client was to use registration.notifications.guardianapis.com, it'll be getting certificate issues.

Footnotes

  1. We should remove it once the migration is complete, but can do that in NS1 directly.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summarising an IRL discussion:

We've opted to follow @jacobwinch's suggestion as it provides an audit trail. Therefore the next PR will be to adopt the DNS record:

registration.notifications.guardianapis.com (NS1) -> registration.notifications-aws.guardianapis.com (Route53)

Once notifications.guardianapis.com points to the new load balancer, the registration.notifications.guardianapis.com CNAME can be deleted.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Therefore the next PR will be to adopt the DNS record:

registration.notifications.guardianapis.com (NS1) -> registration.notifications-aws.guardianapis.com (Route53)

#1669

JuliaBrigitte and others added 2 commits February 2, 2026 10:50
…ing elimination one go between

Co-authored-by: Akash <akash1810@users.noreply.github.com>
Co-authored-by: Akash <akash1810@users.noreply.github.com>
@JuliaBrigitte
JuliaBrigitte force-pushed the aajb/version-controlling-ns1-record branch from c0088a6 to 518b6a1 Compare February 2, 2026 10:50
@github-actions

github-actions Bot commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actions Bot commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

@JuliaBrigitte
JuliaBrigitte marked this pull request as ready for review February 2, 2026 11:02
@JuliaBrigitte
JuliaBrigitte requested a review from a team as a code owner February 2, 2026 11:02
@JuliaBrigitte
JuliaBrigitte merged commit c2e01cb into main Feb 2, 2026
11 checks passed
@JuliaBrigitte
JuliaBrigitte deleted the aajb/version-controlling-ns1-record branch February 2, 2026 11:11
@akash1810

Copy link
Copy Markdown
Member

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.

3 participants