From edb01bc9f27233d46f214b68a2c713b777459d05 Mon Sep 17 00:00:00 2001 From: Hilko Bengen Date: Wed, 14 Jul 2021 11:25:56 +0200 Subject: [PATCH 1/5] Log certificate's serial number as stringified decimal number Using a JSON string fixes a common issue with JSON parsers that deserialize all numbers to a 64-bit IEEE-754 floats. (Certificate serial numbers are usually 128 bit values.) This change is consistent with existing log entries for revocation requests. See also: #630, #631 --- api/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/api.go b/api/api.go index 21950ccd..f0817ff6 100644 --- a/api/api.go +++ b/api/api.go @@ -400,7 +400,7 @@ func logOtt(w http.ResponseWriter, token string) { func LogCertificate(w http.ResponseWriter, cert *x509.Certificate) { if rl, ok := w.(logging.ResponseLogger); ok { m := map[string]interface{}{ - "serial": cert.SerialNumber, + "serial": cert.SerialNumber.String(), "subject": cert.Subject.CommonName, "issuer": cert.Issuer.CommonName, "valid-from": cert.NotBefore.Format(time.RFC3339), From 9210a6740b2a564924981208ef4c340648fd1260 Mon Sep 17 00:00:00 2001 From: Herman Slatman Date: Thu, 15 Jul 2021 23:13:08 +0200 Subject: [PATCH 2/5] Fix logging provisioner name as string --- api/api.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/api.go b/api/api.go index 21950ccd..b542f473 100644 --- a/api/api.go +++ b/api/api.go @@ -418,7 +418,7 @@ func LogCertificate(w http.ResponseWriter, cert *x509.Certificate) { if len(val.CredentialID) > 0 { m["provisioner"] = fmt.Sprintf("%s (%s)", val.Name, val.CredentialID) } else { - m["provisioner"] = val.Name + m["provisioner"] = string(val.Name) } break } From b71ff09a082975fc2f9671de7d84ec445262db39 Mon Sep 17 00:00:00 2001 From: max furman Date: Fri, 16 Jul 2021 10:50:22 -0700 Subject: [PATCH 3/5] UI updates for certificates new issue page --- .github/ISSUE_TEMPLATE/enhancement.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/ISSUE_TEMPLATE/enhancement.md b/.github/ISSUE_TEMPLATE/enhancement.md index 28eec406..3a6ffc94 100644 --- a/.github/ISSUE_TEMPLATE/enhancement.md +++ b/.github/ISSUE_TEMPLATE/enhancement.md @@ -1,5 +1,5 @@ --- -name: Certificates Enhancement +name: Enhancement about: Suggest an enhancement to step certificates title: '' labels: enhancement, needs triage From a3af991261f9734a333e2ad64ce80e861df45485 Mon Sep 17 00:00:00 2001 From: max furman Date: Fri, 16 Jul 2021 12:15:03 -0700 Subject: [PATCH 4/5] Update pull request labeler action --- .github/workflows/labeler.yml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 72b01a92..bf5b4bc0 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -1,14 +1,12 @@ -name: labeler +name: Pull Request Labeler on: - pull_request: - branches: - - master + pull_request_target jobs: label: runs-on: ubuntu-latest steps: - - uses: actions/labeler@v3 + - uses: actions/labeler@v3.0.2 with: repo-token: "${{ secrets.GITHUB_TOKEN }}" - configuration-path: .github/labeler.yml + From bd51b1f85b3aba74963a2a414fc7da2d13cc0bcc Mon Sep 17 00:00:00 2001 From: max furman Date: Fri, 16 Jul 2021 15:09:38 -0700 Subject: [PATCH 5/5] Updates for new issue page --- .github/ISSUE_TEMPLATE/config.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 .github/ISSUE_TEMPLATE/config.yml diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..4a273c46 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,9 @@ +blank_issues_enabled: true +contact_links: + - name: Ask on Discord + url: https://discord.gg/7xgjhVAg6g + about: You can ask for help here! + - name: Want to contribute to step certificates? + url: https://github.com/smallstep/certificates/blob/master/docs/CONTRIBUTING.md + about: Be sure to read contributing guidelines! +