Commit Graph

73 Commits (master)

Author SHA1 Message Date
Mariano Cano d037ed6ff2
Add provisioner id to acme accounts
This commit adds a new field that allows to have a reference to
a provisioner id in the acme account.
6 days ago
Max 7731edd816
Store and verify Acme account location (#1386)
* Store and verify account location on acme requests

Co-authored-by: Herman Slatman <hslatman@users.noreply.github.com>
Co-authored-by: Mariano Cano <mariano@smallstep.com>
11 months ago
max furman 8b256f0351
address linter warning for go 1.19 1 year ago
Mariano Cano 6ba20209c2
Verify CSR key fingerprint with attestation certificate key
This commit makes sure that the attestation certificate key matches the
key used on the CSR on an ACME device attestation flow.
1 year ago
Herman Slatman 0f1c509e4b
Remove debug utility 1 year ago
Herman Slatman edee01c80c
Refactor debug utility 1 year ago
Herman Slatman 1c38113e44
Add ACME `Subproblem` for more detailed ACME client-side errors
When validating an ACME challenge (`device-attest-01` in this case,
but it's also true for others), and validation fails, the CA didn't
return a lot of information about why the challenge had failed. By
introducing the ACME `Subproblem` type, an ACME `Error` can include
some additional information about what went wrong when validating
the challenge.

This is a WIP commit. The `Subproblem` isn't created in many code
paths yet, just for the `step` format at the moment. Will probably
follow up with some more improvements to how the ACME error is
handled. Also need to cleanup some debug things (q.Q)
1 year ago
max furman ab0d2503ae
Standardize linting file and fix or ignore lots of linting errors 2 years ago
Mariano Cano 226d36f66f Fix unit tests 2 years ago
Herman Slatman 2a7620641f
Fix more PR comments 2 years ago
Herman Slatman 7df52dbb76
Add ACME EAB policy 2 years ago
Herman Slatman bf21319e76
Fix PR comments and issue with empty string slices 2 years ago
Herman Slatman fd9845e9c7
Add cursor and limit to ACME EAB DB interface 2 years ago
Herman Slatman c3f2fd8ef0
Add RW locks to prevent concurrent updates to the DB
Although this may slow certain API calls down and may not be, strictly
necessary, I think it's best to put all the ACME EAB operations behind
RW locks to prevent concurrent updates to the DB and guarantee
consistent result sets.
2 years ago
Herman Slatman 868cc4ad7f
Increase test coverage for additional indexes 2 years ago
Herman Slatman c0eb420806
Remove special case for empty slices 2 years ago
Herman Slatman ef16febf40
Refactor ACME EAB queries
The ACME EAB keys are now also indexed by the provisioner. This
solves part of the issue in which too many EAB keys may be in
memory at a given time.
2 years ago
Herman Slatman 30859d3c83
Remove server-side paging logic for ExternalAccountKeys 2 years ago
Herman Slatman 11a7f01177
Simplify lookup cursor logic for ExternalAccountKeys 2 years ago
Herman Slatman f9ae875f9d
Use short if-style statements 2 years ago
Herman Slatman d799359917
Merge branch 'master' into hs/acme-eab 2 years ago
Herman Slatman 06bb97c91e
Add logic for Account authorizations and improve tests 2 years ago
Herman Slatman a7fbbc4748
Add tests for GetCertificateBySerial 2 years ago
Herman Slatman 3151255a25
Merge branch 'master' into hs/acme-revocation 3 years ago
Herman Slatman 4d726d6b4c
Add pagination to ACME EAB credentials endpoint 3 years ago
Herman Slatman d354d55e7f
Improve handling duplicate ACME EAB references 3 years ago
Herman Slatman dd4b4b0435
Fix remaining gocritic remarks 3 years ago
Herman Slatman a4660f73fa
Fix some of the gocritic remarks 3 years ago
Herman Slatman e0b495e4c8
Merge branch 'master' into hs/acme-eab 3 years ago
Herman Slatman c26041f835
Add ACME EAB nosql tests 3 years ago
max furman 933b40a02a Introduce gocritic linter and address warnings 3 years ago
Herman Slatman c2bc1351c6
Add provisioner to remove endpoint and clear reference index on delete 3 years ago
Herman Slatman 746c5c9fd9
Disallow creation of EAB keys with non-unique references 3 years ago
Herman Slatman 9c0020352b
Add lookup by reference and make reference optional 3 years ago
Herman Slatman 02cd3b6b3b
Fix PR comments 3 years ago
Herman Slatman f11c0cdc0c
Add endpoint for listing ACME EAB keys 3 years ago
Herman Slatman a1afbce50c
Check EAB key exists before deleting it 3 years ago
Herman Slatman 9d09f5e575
Add support for deleting ACME EAB keys 3 years ago
Herman Slatman a98fe03e80
Merge branch 'master' into hs/acme-eab 3 years ago
max furman a3028bbc0e Add test for updateAddOrderIDs 3 years ago
Herman Slatman 492256f2d7
Add first test cases for EAB and make provisioner unique per EAB
Before this commit, EAB keys could be used CA-wide, meaning that
an EAB credential could be used at any ACME provisioner. This
commit changes that behavior, so that EAB credentials are now
intended to be used with a specific ACME provisioner. I think
that makes sense, because from the perspective of an ACME client
the provisioner is like a distinct CA.

Besides that this commit also includes the first tests for EAB.
The logic for creating the EAB JWS as a client has been taken
from github.com/mholt/acmez. This logic may be moved or otherwise
sourced (i.e. from a vendor) as soon as the step client also
(needs to) support(s) EAB with ACME.
3 years ago
Herman Slatman d44cd18b96
Add External Accounting Binding key "BoundAt" marking 3 years ago
Herman Slatman f81d49d963
Add first working version of External Account Binding 3 years ago
Herman Slatman 258efca0fa
Improve revocation authorization 3 years ago
Herman Slatman 97165f1844
Fix test mocking for CreateCertificate 3 years ago
Herman Slatman 2b15230aa4
Add Serial to Cert ID ACME table and lookup 3 years ago
Herman Slatman 523ae96749
Change identifier and challenge types to consts 3 years ago
max furman 63ec2e35b0 Change Clock to empty struct in nosql/nosql | truncate > round
- saves space
-
3 years ago
max furman 9aef84b9af remove unused nonce.clone method 3 years ago
max furman 6b8585c702 PR review fixes / updates 3 years ago