{"action":"created","comment":{"url":"https://api.github.com/repos/letsencrypt/boulder/pulls/comments/321755774","pull_request_review_id":284883464,"id":321755774,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDMyMTc1NTc3NA==","diff_hunk":"@@ -283,6 +283,20 @@ func (sac StorageAuthorityClientWrapper) PreviousCertificateExists(\n \treturn exists, err\n }\n \n+func (sac StorageAuthorityClientWrapper) AddPrecertificate(\n+\tctx context.Context,\n+\treq *sapb.AddCertificateRequest,\n+) (*corepb.Empty, error) {\n+\treturn sac.inner.AddPrecertificate(ctx, req)\n+}\n+\n+func (sac StorageAuthorityClientWrapper) AddSerial(\n+\tctx context.Context,\n+\treq *sapb.AddSerialRequest,\n+) (*corepb.Empty, error) {\n+\treturn sac.inner.AddSerial(ctx, req)","path":"grpc/sa-wrappers.go","position":15,"original_position":15,"commit_id":"08c9f21266063505f0d05992920dea5891629b62","original_commit_id":"08c9f21266063505f0d05992920dea5891629b62","user":{"login":"cpu","id":292650,"node_id":"MDQ6VXNlcjI5MjY1MA==","avatar_url":"https://avatars1.githubusercontent.com/u/292650?v=4","gravatar_id":"","url":"https://api.github.com/users/cpu","html_url":"https://github.com/cpu","followers_url":"https://api.github.com/users/cpu/followers","following_url":"https://api.github.com/users/cpu/following{/other_user}","gists_url":"https://api.github.com/users/cpu/gists{/gist_id}","starred_url":"https://api.github.com/users/cpu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cpu/subscriptions","organizations_url":"https://api.github.com/users/cpu/orgs","repos_url":"https://api.github.com/users/cpu/repos","events_url":"https://api.github.com/users/cpu/events{/privacy}","received_events_url":"https://api.github.com/users/cpu/received_events","type":"User","site_admin":false},"body":"Similar to `AddPrecertificate` I think this wrapper needs to check that `req` is `!= nil` and return an error if it is. The `sac.inner.AddSerial` implementation is de-referencing `req` without checking that.","created_at":"2019-09-06T14:15:58Z","updated_at":"2019-09-06T14:16:12Z","html_url":"https://github.com/letsencrypt/boulder/pull/4420#discussion_r321755774","pull_request_url":"https://api.github.com/repos/letsencrypt/boulder/pulls/4420","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/letsencrypt/boulder/pulls/comments/321755774"},"html":{"href":"https://github.com/letsencrypt/boulder/pull/4420#discussion_r321755774"},"pull_request":{"href":"https://api.github.com/repos/letsencrypt/boulder/pulls/4420"}}},"pull_request":{"url":"https://api.github.com/repos/letsencrypt/boulder/pulls/4420","id":314291041,"node_id":"MDExOlB1bGxSZXF1ZXN0MzE0MjkxMDQx","html_url":"https://github.com/letsencrypt/boulder/pull/4420","diff_url":"https://github.com/letsencrypt/boulder/pull/4420.diff","patch_url":"https://github.com/letsencrypt/boulder/pull/4420.patch","issue_url":"https://api.github.com/repos/letsencrypt/boulder/issues/4420","number":4420,"state":"open","locked":false,"title":"Generate and store OCSP at precertificate signing time","user":{"login":"jsha","id":220205,"node_id":"MDQ6VXNlcjIyMDIwNQ==","avatar_url":"https://avatars1.githubusercontent.com/u/220205?v=4","gravatar_id":"","url":"https://api.github.com/users/jsha","html_url":"https://github.com/jsha","followers_url":"https://api.github.com/users/jsha/followers","following_url":"https://api.github.com/users/jsha/following{/other_user}","gists_url":"https://api.github.com/users/jsha/gists{/gist_id}","starred_url":"https://api.github.com/users/jsha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsha/subscriptions","organizations_url":"https://api.github.com/users/jsha/orgs","repos_url":"https://api.github.com/users/jsha/repos","events_url":"https://api.github.com/users/jsha/events{/privacy}","received_events_url":"https://api.github.com/users/jsha/received_events","type":"User","site_admin":false},"body":"This change adds two tables and two methods in the SA, to store precertificates and serial numbers.\r\n\r\nIn the CA, when the feature flag is turned on, we generate a serial number, store it,\r\nsign a precertificate and OCSP, store them, and then return the precertificate. Storing\r\nthe serial as an additional step before signing the certificate adds an extra layer of\r\ninsurance against duplicate serials, and also serves as a check on database availability.\r\nSince an error storing the serial prevents going on to sign the precertificate, this decreases\r\nthe chance of signing something while the database is down.\r\n\r\nRight now, neither table has read operations available in the SA.\r\n\r\nTo make this work, I needed to remove the check for duplicate certificateStatus entry\r\nwhen inserting a final certificate and its OCSP response. I also needed to remove\r\nan error that can occur when expiration-mailer processes a precertificate that lacks\r\na final certificate. That error would otherwise have prevented further processing of\r\nexpiration warnings.\r\n\r\nFixes #4412 \r\n\r\nThis change builds on #4417, please review that first for ease of review.","created_at":"2019-09-05T01:36:03Z","updated_at":"2019-09-06T14:16:11Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9c242326e39273b4d60f12d34a7fb0310ac8080a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/letsencrypt/boulder/pulls/4420/commits","review_comments_url":"https://api.github.com/repos/letsencrypt/boulder/pulls/4420/comments","review_comment_url":"https://api.github.com/repos/letsencrypt/boulder/pulls/comments{/number}","comments_url":"https://api.github.com/repos/letsencrypt/boulder/issues/4420/comments","statuses_url":"https://api.github.com/repos/letsencrypt/boulder/statuses/08c9f21266063505f0d05992920dea5891629b62","head":{"label":"letsencrypt:precertificate-ocsp","ref":"precertificate-ocsp","sha":"08c9f21266063505f0d05992920dea5891629b62","user":{"login":"letsencrypt","id":9289019,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkyODkwMTk=","avatar_url":"https://avatars0.githubusercontent.com/u/9289019?v=4","gravatar_id":"","url":"https://api.github.com/users/letsencrypt","html_url":"https://github.com/letsencrypt","followers_url":"https://api.github.com/users/letsencrypt/followers","following_url":"https://api.github.com/users/letsencrypt/following{/other_user}","gists_url":"https://api.github.com/users/letsencrypt/gists{/gist_id}","starred_url":"https://api.github.com/users/letsencrypt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/letsencrypt/subscriptions","organizations_url":"https://api.github.com/users/letsencrypt/orgs","repos_url":"https://api.github.com/users/letsencrypt/repos","events_url":"https://api.github.com/users/letsencrypt/events{/privacy}","received_events_url":"https://api.github.com/users/letsencrypt/received_events","type":"Organization","site_admin":false},"repo":{"id":28283593,"node_id":"MDEwOlJlcG9zaXRvcnkyODI4MzU5Mw==","name":"boulder","full_name":"letsencrypt/boulder","private":false,"owner":{"login":"letsencrypt","id":9289019,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkyODkwMTk=","avatar_url":"https://avatars0.githubusercontent.com/u/9289019?v=4","gravatar_id":"","url":"https://api.github.com/users/letsencrypt","html_url":"https://github.com/letsencrypt","followers_url":"https://api.github.com/users/letsencrypt/followers","following_url":"https://api.github.com/users/letsencrypt/following{/other_user}","gists_url":"https://api.github.com/users/letsencrypt/gists{/gist_id}","starred_url":"https://api.github.com/users/letsencrypt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/letsencrypt/subscriptions","organizations_url":"https://api.github.com/users/letsencrypt/orgs","repos_url":"https://api.github.com/users/letsencrypt/repos","events_url":"https://api.github.com/users/letsencrypt/events{/privacy}","received_events_url":"https://api.github.com/users/letsencrypt/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/letsencrypt/boulder","description":"An ACME-based CA, written in Go.","fork":false,"url":"https://api.github.com/repos/letsencrypt/boulder","forks_url":"https://api.github.com/repos/letsencrypt/boulder/forks","keys_url":"https://api.github.com/repos/letsencrypt/boulder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/letsencrypt/boulder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/letsencrypt/boulder/teams","hooks_url":"https://api.github.com/repos/letsencrypt/boulder/hooks","issue_events_url":"https://api.github.com/repos/letsencrypt/boulder/issues/events{/number}","events_url":"https://api.github.com/repos/letsencrypt/boulder/events","assignees_url":"https://api.github.com/repos/letsencrypt/boulder/assignees{/user}","branches_url":"https://api.github.com/repos/letsencrypt/boulder/branches{/branch}","tags_url":"https://api.github.com/repos/letsencrypt/boulder/tags","blobs_url":"https://api.github.com/repos/letsencrypt/boulder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/letsencrypt/boulder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/letsencrypt/boulder/git/refs{/sha}","trees_url":"https://api.github.com/repos/letsencrypt/boulder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/letsencrypt/boulder/statuses/{sha}","languages_url":"https://api.github.com/repos/letsencrypt/boulder/languages","stargazers_url":"https://api.github.com/repos/letsencrypt/boulder/stargazers","contributors_url":"https://api.github.com/repos/letsencrypt/boulder/contributors","subscribers_url":"https://api.github.com/repos/letsencrypt/boulder/subscribers","subscription_url":"https://api.github.com/repos/letsencrypt/boulder/subscription","commits_url":"https://api.github.com/repos/letsencrypt/boulder/commits{/sha}","git_commits_url":"https://api.github.com/repos/letsencrypt/boulder/git/commits{/sha}","comments_url":"https://api.github.com/repos/letsencrypt/boulder/comments{/number}","issue_comment_url":"https://api.github.com/repos/letsencrypt/boulder/issues/comments{/number}","contents_url":"https://api.github.com/repos/letsencrypt/boulder/contents/{+path}","compare_url":"https://api.github.com/repos/letsencrypt/boulder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/letsencrypt/boulder/merges","archive_url":"https://api.github.com/repos/letsencrypt/boulder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/letsencrypt/boulder/downloads","issues_url":"https://api.github.com/repos/letsencrypt/boulder/issues{/number}","pulls_url":"https://api.github.com/repos/letsencrypt/boulder/pulls{/number}","milestones_url":"https://api.github.com/repos/letsencrypt/boulder/milestones{/number}","notifications_url":"https://api.github.com/repos/letsencrypt/boulder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/letsencrypt/boulder/labels{/name}","releases_url":"https://api.github.com/repos/letsencrypt/boulder/releases{/id}","deployments_url":"https://api.github.com/repos/letsencrypt/boulder/deployments","created_at":"2014-12-21T00:29:54Z","updated_at":"2019-09-06T13:35:21Z","pushed_at":"2019-09-06T13:35:21Z","git_url":"git://github.com/letsencrypt/boulder.git","ssh_url":"git@github.com:letsencrypt/boulder.git","clone_url":"https://github.com/letsencrypt/boulder.git","svn_url":"https://github.com/letsencrypt/boulder","homepage":null,"size":36016,"stargazers_count":3040,"watchers_count":3040,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":374,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":86,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":374,"open_issues":86,"watchers":3040,"default_branch":"master"}},"base":{"label":"letsencrypt:master","ref":"master","sha":"bdd29a1e27b0e91a99ab0decf138c246c8329eaa","user":{"login":"letsencrypt","id":9289019,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkyODkwMTk=","avatar_url":"https://avatars0.githubusercontent.com/u/9289019?v=4","gravatar_id":"","url":"https://api.github.com/users/letsencrypt","html_url":"https://github.com/letsencrypt","followers_url":"https://api.github.com/users/letsencrypt/followers","following_url":"https://api.github.com/users/letsencrypt/following{/other_user}","gists_url":"https://api.github.com/users/letsencrypt/gists{/gist_id}","starred_url":"https://api.github.com/users/letsencrypt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/letsencrypt/subscriptions","organizations_url":"https://api.github.com/users/letsencrypt/orgs","repos_url":"https://api.github.com/users/letsencrypt/repos","events_url":"https://api.github.com/users/letsencrypt/events{/privacy}","received_events_url":"https://api.github.com/users/letsencrypt/received_events","type":"Organization","site_admin":false},"repo":{"id":28283593,"node_id":"MDEwOlJlcG9zaXRvcnkyODI4MzU5Mw==","name":"boulder","full_name":"letsencrypt/boulder","private":false,"owner":{"login":"letsencrypt","id":9289019,"node_id":"MDEyOk9yZ2FuaXphdGlvbjkyODkwMTk=","avatar_url":"https://avatars0.githubusercontent.com/u/9289019?v=4","gravatar_id":"","url":"https://api.github.com/users/letsencrypt","html_url":"https://github.com/letsencrypt","followers_url":"https://api.github.com/users/letsencrypt/followers","following_url":"https://api.github.com/users/letsencrypt/following{/other_user}","gists_url":"https://api.github.com/users/letsencrypt/gists{/gist_id}","starred_url":"https://api.github.com/users/letsencrypt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/letsencrypt/subscriptions","organizations_url":"https://api.github.com/users/letsencrypt/orgs","repos_url":"https://api.github.com/users/letsencrypt/repos","events_url":"https://api.github.com/users/letsencrypt/events{/privacy}","received_events_url":"https://api.github.com/users/letsencrypt/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/letsencrypt/boulder","description":"An ACME-based CA, written in Go.","fork":false,"url":"https://api.github.com/repos/letsencrypt/boulder","forks_url":"https://api.github.com/repos/letsencrypt/boulder/forks","keys_url":"https://api.github.com/repos/letsencrypt/boulder/keys{/key_id}","collaborators_url":"https://api.github.com/repos/letsencrypt/boulder/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/letsencrypt/boulder/teams","hooks_url":"https://api.github.com/repos/letsencrypt/boulder/hooks","issue_events_url":"https://api.github.com/repos/letsencrypt/boulder/issues/events{/number}","events_url":"https://api.github.com/repos/letsencrypt/boulder/events","assignees_url":"https://api.github.com/repos/letsencrypt/boulder/assignees{/user}","branches_url":"https://api.github.com/repos/letsencrypt/boulder/branches{/branch}","tags_url":"https://api.github.com/repos/letsencrypt/boulder/tags","blobs_url":"https://api.github.com/repos/letsencrypt/boulder/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/letsencrypt/boulder/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/letsencrypt/boulder/git/refs{/sha}","trees_url":"https://api.github.com/repos/letsencrypt/boulder/git/trees{/sha}","statuses_url":"https://api.github.com/repos/letsencrypt/boulder/statuses/{sha}","languages_url":"https://api.github.com/repos/letsencrypt/boulder/languages","stargazers_url":"https://api.github.com/repos/letsencrypt/boulder/stargazers","contributors_url":"https://api.github.com/repos/letsencrypt/boulder/contributors","subscribers_url":"https://api.github.com/repos/letsencrypt/boulder/subscribers","subscription_url":"https://api.github.com/repos/letsencrypt/boulder/subscription","commits_url":"https://api.github.com/repos/letsencrypt/boulder/commits{/sha}","git_commits_url":"https://api.github.com/repos/letsencrypt/boulder/git/commits{/sha}","comments_url":"https://api.github.com/repos/letsencrypt/boulder/comments{/number}","issue_comment_url":"https://api.github.com/repos/letsencrypt/boulder/issues/comments{/number}","contents_url":"https://api.github.com/repos/letsencrypt/boulder/contents/{+path}","compare_url":"https://api.github.com/repos/letsencrypt/boulder/compare/{base}...{head}","merges_url":"https://api.github.com/repos/letsencrypt/boulder/merges","archive_url":"https://api.github.com/repos/letsencrypt/boulder/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/letsencrypt/boulder/downloads","issues_url":"https://api.github.com/repos/letsencrypt/boulder/issues{/number}","pulls_url":"https://api.github.com/repos/letsencrypt/boulder/pulls{/number}","milestones_url":"https://api.github.com/repos/letsencrypt/boulder/milestones{/number}","notifications_url":"https://api.github.com/repos/letsencrypt/boulder/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/letsencrypt/boulder/labels{/name}","releases_url":"https://api.github.com/repos/letsencrypt/boulder/releases{/id}","deployments_url":"https://api.github.com/repos/letsencrypt/boulder/deployments","created_at":"2014-12-21T00:29:54Z","updated_at":"2019-09-06T13:35:21Z","pushed_at":"2019-09-06T13:35:21Z","git_url":"git://github.com/letsencrypt/boulder.git","ssh_url":"git@github.com:letsencrypt/boulder.git","clone_url":"https://github.com/letsencrypt/boulder.git","svn_url":"https://github.com/letsencrypt/boulder","homepage":null,"size":36016,"stargazers_count":3040,"watchers_count":3040,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":374,"mirror_url":null,"archived":false,"disabled":false,"open_issues_count":86,"license":{"key":"mpl-2.0","name":"Mozilla Public License 2.0","spdx_id":"MPL-2.0","url":"https://api.github.com/licenses/mpl-2.0","node_id":"MDc6TGljZW5zZTE0"},"forks":374,"open_issues":86,"watchers":3040,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/letsencrypt/boulder/pulls/4420"},"html":{"href":"https://github.com/letsencrypt/boulder/pull/4420"},"issue":{"href":"https://api.github.com/repos/letsencrypt/boulder/issues/4420"},"comments":{"href":"https://api.github.com/repos/letsencrypt/boulder/issues/4420/comments"},"review_comments":{"href":"https://api.github.com/repos/letsencrypt/boulder/pulls/4420/comments"},"review_comment":{"href":"https://api.github.com/repos/letsencrypt/boulder/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/letsencrypt/boulder/pulls/4420/commits"},"statuses":{"href":"https://api.github.com/repos/letsencrypt/boulder/statuses/08c9f21266063505f0d05992920dea5891629b62"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"cpu"}}