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

Beginnings of acmeDB interface #496

Merged
merged 47 commits into from
Apr 13, 2021
Merged

Beginnings of acmeDB interface #496

merged 47 commits into from
Apr 13, 2021

Conversation

dopey
Copy link
Contributor

@dopey dopey commented Feb 25, 2021

No description provided.

- more generalized NotFound type rather than the nosql
one we were using
- if the error is not recognized then the logic in create account will
break.
@dopey dopey marked this pull request as ready for review March 25, 2021 21:56
@dopey dopey requested a review from maraino March 25, 2021 21:56
@codecov-io
Copy link

codecov-io commented Mar 25, 2021

Codecov Report

Merging #496 (4e43e73) into master (71f59de) will increase coverage by 0.80%.
The diff coverage is 83.48%.

❗ Current head 4e43e73 differs from pull request most recent head 2e0e62b. Consider uploading reports for the commit 2e0e62b to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #496      +/-   ##
==========================================
+ Coverage   77.19%   77.99%   +0.80%     
==========================================
  Files          98      104       +6     
  Lines        9721     9549     -172     
==========================================
- Hits         7504     7448      -56     
+ Misses       1811     1725      -86     
+ Partials      406      376      -30     
Impacted Files Coverage Δ
acme/nonce.go 0.00% <0.00%> (-89.19%) ⬇️
api/errors.go 34.37% <ø> (+1.04%) ⬆️
authority/provisioner/method.go 5.00% <ø> (ø)
ca/acmeClient.go 80.66% <ø> (ø)
ca/ca.go 50.75% <ø> (-2.14%) ⬇️
cas/stepcas/issuer.go 94.28% <ø> (-0.31%) ⬇️
cas/stepcas/jwk_issuer.go 88.60% <ø> (+2.24%) ⬆️
cas/stepcas/stepcas.go 100.00% <ø> (ø)
acme/db.go 13.33% <13.33%> (ø)
acme/common.go 31.25% <25.00%> (-3.75%) ⬇️
... and 33 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 71f59de...2e0e62b. Read the comment docs.

Copy link
Contributor

@maraino maraino left a comment

Choose a reason for hiding this comment

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

Partial review, I still need to finish it but here are some changes.

acme/account.go Outdated Show resolved Hide resolved
acme/api/account.go Show resolved Hide resolved
acme/api/handler.go Outdated Show resolved Hide resolved
acme/api/handler.go Outdated Show resolved Hide resolved
acme/api/handler.go Outdated Show resolved Hide resolved
acme/api/order.go Show resolved Hide resolved
acme/authority_test.go Outdated Show resolved Hide resolved
acme/challenge.go Outdated Show resolved Hide resolved
acme/challenge.go Outdated Show resolved Hide resolved
acme/challenge.go Outdated Show resolved Hide resolved
acme/challenge.go Outdated Show resolved Hide resolved
acme/challenge.go Outdated Show resolved Hide resolved
acme/challenge.go Show resolved Hide resolved
acme/common.go Outdated Show resolved Hide resolved
acme/order.go Outdated Show resolved Hide resolved
acme/order.go Show resolved Hide resolved
acme/order.go Show resolved Hide resolved
api/errors.go Outdated Show resolved Hide resolved
@maraino maraino self-requested a review April 8, 2021 23:49
Copy link
Contributor

@maraino maraino left a comment

Choose a reason for hiding this comment

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

Hi @dopey just a few details.

acme/api/account.go Outdated Show resolved Hide resolved
acme/api/handler.go Show resolved Hide resolved
acme/api/linker.go Outdated Show resolved Hide resolved
acme/api/middleware.go Show resolved Hide resolved
acme/certificate.go Show resolved Hide resolved
- always URL escape linker output
- validateJWS should accept RSAPSS
- GetUpdateAccount -> GetOrUpdateAccount
@dopey dopey requested a review from maraino April 13, 2021 02:10
Comment on lines 89 to 96
type Clock int

// Now returns the UTC time rounded to seconds.
func (c *Clock) Now() time.Time {
return time.Now().UTC().Round(time.Second)
}

var clock = new(Clock)
Copy link
Contributor

Choose a reason for hiding this comment

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

Empty struct and Truncate instead of Round.

Copy link
Contributor

@maraino maraino left a comment

Choose a reason for hiding this comment

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

LGTM, but I've just added one not on the Clock for nosql.

- NegotiatedProtocolIsMutual is always true: Deprecated according to
golang docs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants