Giter VIP home page Giter VIP logo

dns's Introduction

TTS DNS configuration

CircleCI

This repository holds the source code for configuring DNS for domains managed by GSA TTS, including 18F and the Presidential Innovation Fellows. See also:

Making changes

Assuming you're TTS staff, it's recommended that you make the change in a branch on this repository itself, rather than on a fork, because the credentials aren't shared with forks. (The main branch is protected to limit write access only to certain staff, and to ensure history doesn't get overwritten, etc.) For major changes, it is recommended to keep the TTL value low just before and during the change period in order to make it easier to verify the changes went through as expected.

  1. Is the domain pointing to the right nameservers? In other words, is there a file for the domain under terraform/ already?
    • Yes: Continue to next step.
    • No:
      1. Add a file for the domain (or subdomain, if the second-level domain isn't being added), to create the public hosted zone.
        • analytics.usa.gov is a good example to copy from.
        • You'll be using Terraform's aws_route53_zone.
        • If it's an existing domain, you'll want to make sure all existing records are copied over, so that they don't break when the cutover happens. You can ask the existing DNS managers for a list of records or a zone file for the domain and all subdomains.
      2. After the pull request is merged, to get the name servers for your domain check the output for your build in CircleCI. If you need further assistance, check with #admins-dns.
      3. Change the nameservers for the domain to point to AWS.
  2. Add the relevant additional record sets. In Terraform, these are known as aws_route53_records.

It's worth noting that if you are pointing to a CloudFront distro, you should use Route 53's own alias and not a CNAME record. In fact, CNAMEing a top-level domain (or the top level of a delegated subdomain) is not allowed in DNS. See the various examples in the repo, such as this one.

On merge, changes are deployed to an AWS account hosting the Route53 records automatically by a CircleCI job.

Please note: only production systems with an ATO that are categorized as Low impact should have their DNS configuration here.

Redirects

We are moving from pages-redirects to fully configuring them in this repository. See the 18f_gov__join_18f_gov_redirect example.

Leave the trailing slash off the destination domain.

If the redirecting domain is assigned to any CloudFront distribution in any AWS account, it will need to be unassociated before the module above can be successfully deployed.

Stubbing files

We keep a Terraform file for every TTS domain, even if it's just a comment referencing DNS managed elsewhere.

Public domain

This project is in the worldwide public domain. As stated in the license:

This project is in the public domain within the United States, and copyright and related rights in the work worldwide are waived through the CC0 1.0 Universal public domain dedication.

All contributions to this project will be released under the CC0 dedication. By submitting a pull request, you are agreeing to comply with this waiver of copyright interest.

dns's People

Contributors

afeld avatar alain-hoang avatar amirbey avatar apburnes avatar datn avatar davemcorwin avatar dlapiduz avatar echappen avatar eddietejeda avatar erik-burgess avatar hursey013 avatar jeremyzilar avatar jezhumble avatar jjediny avatar jkrzy avatar jmcarp avatar jontours avatar konklone avatar kyle-jennings avatar lindsayyoung avatar linuxbozo avatar mogul avatar pauldoomgov avatar pburkholder avatar rahearn avatar rocheller123 avatar rogeruiz avatar ryanwoldatwork avatar stvnrlly avatar wslack avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dns's Issues

As a domain owner, I would like to be notified about PRs for my domain

As a domain owner, I would like to be notified about PRs for my domain's terraform file.

This is more of a "nice to have" than a risk but here is what I would be looking for:

  • Is there a new product or service launching that we should know about (unlikely, but possible)
  • Are old legacy records being modified?
  • Is there a need for a 301 redirect in this change ?
  • are the changes being rolled out in the right order?
  • are the DNS configurations being clearly documented in the file
  • Who is the owner begin this product/service

Standardize on TTL values

I noticed that we have a wide array of values used for TTL. I'm guessing that the majority of them can be increased to a larger value.

It's fairly common practice to only use short TTLs while testing out DNS changes and for failover setups. In other cases it is recommended that people use TTL values of 24 hours/86400s.

https://support.google.com/a/answer/48090#TTL

Once the records are configured correctly, we recommend setting a TTL value of 86400, which tells servers across the Internet to check every 24 hours for updates to the record.

https://support.rackspace.com/how-to/about-ttl-best-practices/

Generally, we recommend a TTL of 24 hours (86,400 seconds). However, if you are planning to make DNS changes, you should lower the TTL to 5 minutes (300 seconds) at least 24 hours in advance of making the changes. After the changes are made, increase the TTL back to 24 hours.

  • determine suggested short/long term TTL values
  • update all records accordingly

Example configuration no longer exists

The documentation is linking to the 18f.us.tf record as a good starter configuration. However, that one no longer exists. What would be a good alternative?

Create toaster.18f.gov

We've rebranded Fugacious to Toaster and would prefer to host at toaster.18f.gov

Please use the same configuration as fugacious.18f.gov, which appears to be two CNAME entries:

;; QUESTION SECTION:
;fugacious.18f.gov.		IN	A

;; ANSWER SECTION:
fugacious.18f.gov.	299	IN	CNAME	dualstack.production-star-18f-gov-elb-1963420885.us-gov-west-1.elb.amazonaws.com.
dualstack.production-star-18f-gov-elb-1963420885.us-gov-west-1.elb.amazonaws.com. 60 IN	A 52.222.35.187
dualstack.production-star-18f-gov-elb-1963420885.us-gov-west-1.elb.amazonaws.com. 60 IN	A 96.127.47.199

Question: can cloud.gov handle the redirects from fugacious -> toaster? If it's a pain, I can configure at the app level.

DRY the IPv6 configuration?

Background information

DRY definition

See discussion in #522.

Implementation steps

  • Collect feedback (votes?) from others that interact with this repository

Acceptance criteria

  • We have implemented IPv6 in this repository in a way that has consensus

Move in 18f.gov

DNS for 18f.gov is still managed in the old 18F AWS account—we should get it in here so everything is managed in one place.

Change atf-eregs.18f.gov to a redirect

The TTS Digital Council has confirmed that atf-eregs.18f.gov should no longer be live since the final client website long ago launched. We've confirmed with the stakeholders that atf-eregs.18f.gov should be deprecated but it still gets decent traffic b/c of SEO, so we want to set up a redirect to the client website.

Sorry but this is a bit beyond my comfort level. Anyone game to help?

determine how domain approvals should work for TTS-managed domains

Background information

The InSite page about domain names asks for GSA staff to put in DNS requests through Service Now, which includes a step for approval from the Office of Strategic Communications (OSC). TTS manages our own DNS for most of our domains, and therefore is able to make changes without that OSC review.

Digital Council Trello card

Acceptance criteria

  • TTS and OSC agree on documentation for when and how domain requests should be reviewed by OSC

The assignee can add some checkboxes as a "sketch" of the steps to complete, which may evolve.

Automated the checking of unused DNS records

We should clean out records from this repository that aren't actually in use. Some ideas of things to check for:

  • Public Route 53 zones where the domain isn't actually pointing to those nameservers
  • A, AAAA, and CNAME records where that hostname doesn't respond

We should add a script to the repository to check for these things.

DNS Invalid Record for Hubspot

We are getting errors in Hubspot saying that this record is invalid:

resource "aws_route53_record" "hubspot2_digitalgov_gov_a" {
  zone_id = "${aws_route53_zone.digitalgov_gov_zone.zone_id}"
  name    = "hs2._domainkey.digitalgov.gov."
  type    = "CNAME"
  ttl     = "300"
  records = [
    "digitalgov-gov.hs01b.dkim.hubspotemail.net."
  ]
}

image


The values that Hubspot is providing for that record are:

NAME
hs2._domainkey.digitalgov.gov

Value
digitalgov-gov.hs01b.dkim.hubspotemail.net.

Improve linting for DNS Concourse job

Yoz's addition to the vote.gov DNS failed with the following error:

* aws_route53_record.vote_gov_www_vote_gov_a: provider.aws: aws_route53_record: www.vote.gov: "ttl": required field is not set

That should get checked in the PR stage.

How do I add a new domain on Federalist for a site where TTS owns the DNS?

I think the text to merge looks like one of the two options below. Questions:

  1. Is it correct to say we always want the CNAME option?
  2. If so, is the bolded text the only piece that would be changed?
  3. If not, where does the "zone ID" come from when doing an A record?
  4. Should Federalist have the power to merge its own PRs into this?

resource "aws_route53_record" "18f_gov_sample-website-B_18f_gov_cname" {
zone_id = "${aws_route53_zone.18f_gov_zone.zone_id}"
name = "sample-website-A.18f.gov."
type = "CNAME"
ttl = 300
records = ["d1z8tmjf5ismhl.cloudfront.net."]
}

resource "aws_route53_record" "18f_gov_climate-data-user-study_18f_gov_a" {
zone_id = "${aws_route53_zone.18f_gov_zone.zone_id}"
name = "sample-website-B.18f.gov."
type = "A"
alias {
name = "dgkam57c0xckv.cloudfront.net."
zone_id = "Z2FDTNDATAQYW2"
evaluate_target_health = false
}
}

upgrade to Terraform 0.12+

The major issue for all the 18f.us/18f.gov resources:

In Terraform 0.12, resource names must start with a letter.

Implementation Steps

  • Schedule time for migration with @amirbey

Acceptance Criterea

  • Terraform 14 plan / apply runs with no warnings or errors presented

automatically check for HSTS

Background information

We want all of our domains to be preloaded with HTTP Strict Transport Security (HSTS). We can add automated tests to ensure it's in place.

Acceptance criteria

  • An error is thrown (on a recurring basis) if a domain in this repository doesn't have the HSTS headers or isn't on the preload list

The assignee can add some checkboxes as a "sketch" of the steps to complete, which may evolve.

Move Usability.gov domain to TTS

We are preparing to move Usability.gov from HHS to the GSA.

Usability.gov will have a new home in 2020

This long-standing UX resource will be part of the family of guidance offered by Digital.gov as part of Digital.gov’s mission to transform how government learns, builds, delivers, and measures digital services in the 21st century. Read more


The following is a list of things the things we are working on to make this transition possible. We are looping in the TTS Infra team on this for visibility and additional guidance on making this a smooth transition.

(feel free to edit/add as you see fit)

Approvals

  • Get the domain transfer letter signed by Dave Shive
  • Coordinate with HHS on submitting the letters to DotGov.gov to get the transfer moving (in progress)

Prepare Domain Transfer

Here is how I think the transfer will likely go

  • Get the Federalist site reviewed by the Federalist Team (in-progress)
  • Prepare the DNS records in a draft PR in the TTS DNS repo (see #422)
  • Ensure Sara Cope can manage the DotGov registry for this domain

Make the Domain Transfer

  • Coordinate with the Federalist team and TTS Infra team on a day to launch
  • Alert the HHS IT team of the day we plan on making the switch
  • Ask the Federalist team for Cloudfront URLs (needs to be done within 12hrs of the launch)
  • Insert them into the draft PR we created for this domain (see #422)
  • Get the PR reviewed
  • Make the switch in DotGov
  • Merge the PR
  • Turn things on and off a few times till it works. 😆
  • [... unknown...]

Create DNS for stage.fec.gov

@afeld we have a question about creating a new stage.fec.gov DNS within this repo.

We want to enable cloudfront caching on our staging environment, in order to do this we need to set up a stage.fec.gov cdn-route. First off, would we need to submit a terraform PR to get name servers in order for our service provider to delegate a domain?

Would the below code work in a new /terraform/stage.fec.gov.tf? This code would essentially output name servers for us to point to? See below:

# Setting up a staging domain in order to set up a new cdn-route
# to configuring caching headers in cloudfront

resource "aws_route53_zone" "stage_gov_us_zone" {
  name = "stage.fec.gov"
  tags {
    Project = "dns"
  }
}

output "stage_gov_us_ns" {
  value="${aws_route53_zone.stage_gov_us_zone.name_servers}"
}

Once we get the name servers and have it delegated, we should be able to take it from there to set cloudfront caching on our side via the cdn-route instructions in this section of the cloud.gov docs: https://cloud.gov/docs/services/cdn-route/#how-to-create-an-instance-of-this-service

cc @vrajmohan

resume use of docker image hashicorp/terraform:light ?

hashicorp/terraform was recently release to version 0.12 which appears to have new validation rules and blocking updates to this 18f/dns. For now, the docker image has been pinned to 0.11.4:
#331

A longterm solution is needed to resume use of hashicorp/terraform:light

DMARC External Destination Verification for new top level domains not owned by TTS

We're leveraging TTS DNS for a partner engagement which includes a new top level domain. Initial configuration was rolled out in #362.

This included GSA DMARC reporting destinations common to the other domains configured in this repo:

However, a corresponding change was never made at gsa.gov to verify and accept DMARC reports from the new domain in question. ref: https://tools.ietf.org/html/rfc7489#section-3.2

  1. Should the GSA reporting destinations be included in this DMARC record?
  2. If yes, and GSA should receive these DMARC reports. What steps are necessary to setup external destination verification w/ gsa.gov ?
    • e.g. findtreatment.gov._report._dmarc.gsa.gov.
    • Related to #363

Document establishing a new top level DNS domain

User Story

As a new TTS member I want a clear guide on the entire workflow for creating a new top-level *.gov domain.

Details

Documentation gaps exist for new users who need to establish an entirely new top-level *.gov domain. Documentation is unclear that the first step is to make a PR and merge to obtain the output from nameservers to then submit for the dotgov.gov registration form.

Acceptance Criteria

Include secondary considerations/checks for a new domain

  • Coordinate with SecOps (Armando Quintananieves) on DMARC
  • Add domain to HSTS preloading list

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.