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

Updating amppackage.example.toml documentation. #361

Merged
merged 4 commits into from
Dec 5, 2019
Merged

Conversation

banaag
Copy link
Collaborator

@banaag banaag commented Oct 24, 2019

Updating amppackage.example.toml documentation for newly added fields for cert autorenewal.
Addresses #93

@banaag banaag requested a review from twifkak October 24, 2019 21:15
@googlebot
Copy link

All (the pull request submitter and all commit authors) CLAs are signed, but one or more commits were authored or co-authored by someone other than the pull request submitter.

We need to confirm that all authors are ok with their commits being contributed to this project. Please have them confirm that by leaving a comment that contains only @googlebot I consent. in this pull request.

Note to project maintainer: There may be cases where the author cannot leave a comment, or the comment is not properly detected as consent. In those cases, you can manually confirm consent of the commit author(s), and set the cla label to yes (if enabled on your project).

ℹ️ Googlers: Go here for more info.

@banaag banaag changed the base branch from releases to master October 24, 2019 21:15
@banaag
Copy link
Collaborator Author

banaag commented Oct 24, 2019

@googlebot

@googlebot
Copy link

CLAs look good, thanks!

ℹ️ Googlers: Go here for more info.

Copy link
Member

@twifkak twifkak left a comment

Choose a reason for hiding this comment

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

Thanks for the docs! Looks pretty good, just a bunch of nits.

@@ -170,3 +188,75 @@ ForwardedRequestHeaders = []
# Domain = "www.corp.amppackageexample.com"
# PathRE = "/world/.*"
# QueryRE = ""

# ACME is a protocol that allows for automatic renewal of certificates. Amp packager uses an ACME library
Copy link
Member

Choose a reason for hiding this comment

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

s/Amp/AMP/ (ditto lines 229 and 237) and capitalize packager as Packager whenever it follows "AMP" (ditto below)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

@@ -170,3 +188,75 @@ ForwardedRequestHeaders = []
# Domain = "www.corp.amppackageexample.com"
# PathRE = "/world/.*"
# QueryRE = ""

# ACME is a protocol that allows for automatic renewal of certificates. Amp packager uses an ACME library
# https://github.com/go-acme/lego to handle certificate renewal.
Copy link
Member

Choose a reason for hiding this comment

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

I would move details about the spec and the Go library to the bottom of this prologue comment. Focus on what it does, how to enable it, and any gotchas.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed, let me know if the changes are satisfactory.

@@ -47,6 +47,24 @@
# SHA-256).
CertFile = './pems/cert.pem'

# The path to save a new cert retrieved from the CA if the current cert in
# 'CertFile' above is still valid.
# This is optional and is needed only if you have 'autorenewcert' # turned on.
Copy link
Member

Choose a reason for hiding this comment

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

Stray '#'?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed.

Copy link
Contributor

Choose a reason for hiding this comment

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

Is this optional? My build complains if it's missing, and it looks like the code checks for it too:

if config.CertFile == "" || config.NewCertFile == "" {
.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Fixed in #372

# https://www.digicert.com/csr-creation.htm?rid=011592
# https://www.ssl.com/how-to/manually-generate-a-certificate-signing-request-csr-using-openssl/
# https://geekflare.com/san-ssl-certificate/
# This is optional and is needed only if you have 'autorenewcert' # turned on.
Copy link
Member

Choose a reason for hiding this comment

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

Stray '#'?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Removed.

@@ -47,6 +47,24 @@
# SHA-256).
CertFile = './pems/cert.pem'

# The path to save a new cert retrieved from the CA if the current cert in
# 'CertFile' above is still valid.
# This is optional and is needed only if you have 'autorenewcert' # turned on.
Copy link
Member

Choose a reason for hiding this comment

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

Clarify in the docs: For multi-replica setups, does this need to be set on the non-autorenewcert replicas?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

# https://go-acme.github.io/lego/dns/
# DnsProvider = "gcloud"
# [ACMEConfig.Development]
# This config will ne used if 'autorenewcert' is turned on and 'development' is turned on.
Copy link
Member

Choose a reason for hiding this comment

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

What happens if -autorenewcert -development is turned on, but no [ACMEConfig.Development] is specified here? The above text says this is okay, but ISTR amppkg will refuse to start in this case.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The text just says this config will be used if those flags are on. I added more verbage that says if the flags are on and the config is missing, AMP Packager will fail to start.

# in 'CertFile' and 'NewCertFile' are located on a shared filesystem accessible by all AMP packager instances.
# [ACMEConfig]
# [ACMEConfig.Production]
# This config will be used if 'autorenewcert' is turned on and 'development' is turned off.
Copy link
Member

Choose a reason for hiding this comment

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

Move this comment above [ACMEConfig.Production] to match the style in this file.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

Comment on lines 254 to 255
# This config will ne used if 'autorenewcert' is turned on and 'development' is turned on.
# All the other fields below have the same semantics as the one in ACMEConfig.Production above.
Copy link
Member

Choose a reason for hiding this comment

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

Ditto, move this comment above [ACMEConfig.Development].

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

# DnsProvider = "gcloud"
# [ACMEConfig.Development]
# This config will ne used if 'autorenewcert' is turned on and 'development' is turned on.
# All the other fields below have the same semantics as the one in ACMEConfig.Production above.
Copy link
Member

Choose a reason for hiding this comment

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

I would add a suggestion of Let's Encrypt in development, since it's free and development-mode doesn't require the SXG extension. (This lines up with how Matt suggested use of development-mode in the talk.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

# [ACMEConfig.Development]
# This config will ne used if 'autorenewcert' is turned on and 'development' is turned on.
# All the other fields below have the same semantics as the one in ACMEConfig.Production above.
# DiscoURL = "development-acme.discovery.url"
Copy link
Member

Choose a reason for hiding this comment

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

Ditto make it look like a URL.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Done.

@banaag
Copy link
Collaborator Author

banaag commented Nov 15, 2019

@twifkak comments fixed

@alabiaga
Copy link

cc\ @alabiaga

Copy link
Member

@twifkak twifkak left a comment

Choose a reason for hiding this comment

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

LGTM % nit

#
# DiscoURL = "production-acme.discovery.url"
#

Copy link
Member

Choose a reason for hiding this comment

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

Remove this blank line, so each comment is grouped with its field. So the format is like:

  # Comment explaining Field. Blah blah lorem
  # ipsum blah.
  # Field = "foo"

  # Comment explaining OtherField. Oh wow so
  # interesting.
  # OtherField = true

# This is the email address you used to create an account with the Certificate Authority that is registered to
# request signed exchange certificates.
#

Copy link
Member

Choose a reason for hiding this comment

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

Ditto this one.

@alabiaga
Copy link

alabiaga commented Dec 5, 2019

since @banaag is away, any chances you can merge this @twifkak? and he can address those comments at another time. so I can make changes to #374, which needs to change because of this PR

@twifkak
Copy link
Member

twifkak commented Dec 5, 2019

Wilco. It turns out I can just make the changes in this case.

@twifkak twifkak merged commit d88c537 into master Dec 5, 2019
@twifkak twifkak deleted the toml-branch branch December 5, 2019 01:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants