diff --git a/authority/provisioner/aws.go b/authority/provisioner/aws.go index b2e15c5c..be142ca3 100644 --- a/authority/provisioner/aws.go +++ b/authority/provisioner/aws.go @@ -116,8 +116,8 @@ type awsInstanceIdentityDocument struct { // with the same instance will be accepted. By default only the first request // will be accepted. // -// If InstanceAge is set, only the instances with an pendingTime within the -// given period will be accepted. +// If InstanceAge is set, only the instances with a pendingTime within the given +// period will be accepted. // // Amazon Identity docs are available at // https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/instance-identity-documents.html diff --git a/authority/provisioner/collection.go b/authority/provisioner/collection.go index bfaeb25c..ca7a5391 100644 --- a/authority/provisioner/collection.go +++ b/authority/provisioner/collection.go @@ -77,7 +77,7 @@ func (c *Collection) LoadByToken(token *jose.JSONWebToken, claims *jose.Claims) // match with server audiences if matchesAudience(claims.Audience, audiences) { - // Use fragment to get audiences (GCP, AWS) + // Use fragment to get provisioner name (GCP, AWS) if fragment != "" { return c.Load(fragment) } @@ -248,7 +248,7 @@ func stripPort(rawurl string) string { return u.String() } -// extractFragment extracts the +// extractFragment extracts the first fragment of an audience url. func extractFragment(audience []string) string { for _, s := range audience { if u, err := url.Parse(s); err == nil && u.Fragment != "" { diff --git a/authority/provisioner/duration.go b/authority/provisioner/duration.go index d18a81e9..1d8d8f7b 100644 --- a/authority/provisioner/duration.go +++ b/authority/provisioner/duration.go @@ -12,7 +12,7 @@ type Duration struct { time.Duration } -// NewDuration parses a duration string and returns a Duration type or and error +// NewDuration parses a duration string and returns a Duration type or an error // if the given string is not a duration. func NewDuration(s string) (*Duration, error) { d, err := time.ParseDuration(s) diff --git a/authority/provisioner/provisioner.go b/authority/provisioner/provisioner.go index 291a74d5..711b0439 100644 --- a/authority/provisioner/provisioner.go +++ b/authority/provisioner/provisioner.go @@ -58,7 +58,7 @@ func (a Audiences) WithFragment(fragment string) Audiences { } // generateSignAudience generates a sign audience with the format -// https:///1.0/sign#provisionerID +// https:///1.0/sign#provisionerID func generateSignAudience(caURL string, provisionerID string) (string, error) { u, err := url.Parse(caURL) if err != nil {