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

chore: support private-public DNS architecture for improved security #91

Open
wants to merge 2 commits into
base: release
Choose a base branch
from

Conversation

fnaranjo-vmw
Copy link

@fnaranjo-vmw fnaranjo-vmw commented Mar 7, 2024

This change allows configuring AWS with a private-public DNS architecture for improved security: https://docs.aws.amazon.com/managedservices/latest/userguide/set-dns.html

This is an opt-in change and fully backward compatible out-of-the-box.

This adds an additional layer of security, and also allows you to fail over from a primary resource
to a secondary one (often called a "flip") by mapping the DNS name to a different IP address.

There is no change needed to opt-out of this functionality since everything will behave exactly as before if variables with the prefix public_dns are left unspecified, (since these variables were introduced in this change, that is totally granted for any existing user of this repo).

Therefore, any existing automation will continue to work without changes.

AWS paving templates assumed DNS records are public and that
it is possible to create Alias records pointing to some of
the created resources. However, AWS GovCloud docs specify:

> Route 53 public hosted zones are not available.
> [...]
> you can create alias records only when the alias target is
> another record in the same hosted zone. To route traffic
> to another AWS resource, such as an ELB load balancer or
> an S3 bucket, you can use a CNAME record instead

https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/govcloud-r53.html#govcloud-r53-diffs

I tried replacing Alias with CNAME records but there was
another challenge: OpsManager and other records were not
reachable from the public internet.

While that might be desirable in some contexts, it didn't
play well with existing automations. So, I followed other
AWS GovCloud guidelines for "Setting Up Amazon Route 53":

> To use Route 53 public DNS to respond to internet DNS
> queries for resources that you created using a GovCloud
> account, you must create a public hosted zone using a
> global AWS account, and create records in the hosted zone
> that specify the GovCloud resources.

https://docs.aws.amazon.com/govcloud-us/latest/UserGuide/setting-up-route53.html

This is an opt-in change and fully backward compatible
out-of-the-box. To enable it:

Variables:
- `access_key`
- `secret_key`
- `region`
Should take their values from a GovCloud account

Variables:
- `public_dns_access_key`
- `public_dns_secret_key`
- `public_dns_region`
Should take their values from a non-GovCloud account

There is no change needed to opt-out of this functionality
since everything will behave exactly as before if variables
with the prefix `public_dns` are left unspecified, and these
variables were introduced in this change.
Therefore, any automation will still work without changes.
@cf-gitbot
Copy link
Collaborator

We have created an issue in Pivotal Tracker to manage this. Unfortunately, the Pivotal Tracker project is private so you may be unable to view the contents of the story.

The labels on this github issue will be updated when the story is started.

@fnaranjo-vmw fnaranjo-vmw changed the title chore: stepping stone to pave GovCloud chore: stepping stone for private-public DNS for improved security Apr 9, 2024
@fnaranjo-vmw fnaranjo-vmw changed the title chore: stepping stone for private-public DNS for improved security chore: support private-public DNS architecture for improved security Apr 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants