Commit Graph

101 Commits (10f6a901ec98f0eb7ba101f772cc96f2694abb25)

Author SHA1 Message Date
Mariano Cano 10f6a901ec
Let the CA determine the RA lifetime
When the RA mode with StepCAS is used, let the CA decide which lifetime
the RA should get instead of requiring always 24h.

This commit also fixes linter warnings.

Related to #1094
3 months ago
Herman Slatman 041b486c55
Remove usages of `Sign` without context 3 months ago
Herman Slatman 2a8b80a3e1
Merge branch 'master' into herman/webhook-request-id 3 months ago
Herman Slatman d1deb7f930
Add `Expires` header to CRL response 4 months ago
Mariano Cano 52baf52f84
Change scep password type to string
This commit changes the type of the decrypter key password to string to
be consistent with other passwords in the ca.json
8 months ago
Mariano Cano 4d5fbfa439
Fix redacted types in SCEP provisioner
This commit uses the same types for the fields in the provisioner.SCEP
type and the "redacted" models.SCEP.
8 months ago
Herman Slatman ffe079f31b
Merge branch 'master' into herman/scep-provisioner-decrypter 8 months ago
Herman Slatman 3ade92f8d5
Support both a decrypter key URI as well as PEM 8 months ago
Dominic Evans 231b5d8406 chore(deps): upgrade github.com/go-chi/chi to v5
Upgrade chi to the v5 module path to avoid deprecation warning about v4
and earlier on the old module path.

See https://github.com/go-chi/chi/blob/v4.1.3/go.mod#L1-L4

Signed-off-by: Dominic Evans <dominic.evans@uk.ibm.com>
8 months ago
Herman Slatman 4e06bdbc51
Add `SignWithContext` method to authority and mocks 8 months ago
Herman Slatman 9d3b78ae49
Add `excludeIntermediate` to SCEP provisioner 9 months ago
Herman Slatman 4186b2c2d0
Change JSON marshaling for SCEP provisioners
Instead of the old method that redacted sensitive information
by overriding the value of the property and changing it back
to the original, the API now uses a model specifically meant
for API responses. This prevents potential race conditions.

This may be iterated on a bit so that we don't need to rely
on the [provisioner.Interface] interface, which requires the
API model to implement unnecessary methods.
10 months ago
Herman Slatman 6985b4be62
Clean up the SCEP authority and provisioner 1 year ago
Herman Slatman 180162bd6a
Refactor SCEP provisioner and decrypter 1 year ago
Herman Slatman 0377fe559b
Add basic version of provisioner specific SCEP decrypter 1 year ago
Max df13351586
Merge pull request #1381 from smallstep/max/go-1.19
Bump go.mod golang version to 1.19
1 year ago
max furman 8b256f0351
address linter warning for go 1.19 1 year ago
Herman Slatman f17bfdf57d
Reformat the SSH certificate logging output for read- and parsability 1 year ago
Herman Slatman 922f702da3
Add logging for SSH certificate issuance 1 year ago
Herman Slatman c365d8580e
Move provisioner marshaling logic to api package 1 year ago
Mariano Cano c7f226bcec
Add support for renew when using stepcas
It supports renewing X.509 certificates when an RA is configured with stepcas.
This will only work when the renewal uses a token, and it won't work with mTLS.

The audience cannot be properly verified when an RA is used, to avoid this we
will get from the database if an RA was used to issue the initial certificate
and we will accept the renew token.

Fixes #1021 for stepcas
2 years ago
Raal Goff d0e81af524 Merge branch 'master' into crl-support 2 years ago
max furman ab0d2503ae
Standardize linting file and fix or ignore lots of linting errors 2 years ago
Raal Goff 60671b07d7 Merge branch 'master' into crl-support
# Conflicts:
#	api/api.go
#	authority/config/config.go
#	cas/softcas/softcas.go
#	db/db.go
2 years ago
Mariano Cano 43ddcf2efe Do not use deprecated AuthorizeSign 2 years ago
Mariano Cano 48e2fabeb8 Add authority.MustFromContext 2 years ago
Mariano Cano 817af3d696 Fix unit tests on the api package 2 years ago
Mariano Cano a93653ea8e Use api.Route instead of the caHandler. 2 years ago
Mariano Cano a6b8e65d69 Retrieve the authority from the context in api methods. 2 years ago
Raal Goff 53dbe2309b implemented some requested changes 2 years ago
Raal Goff d417ce3232 implement changes from review 2 years ago
Raal Goff 7d024cc4cb change GenerateCertificateRevocationList to return DER, store DER in db instead of PEM, nicer PEM encoding of CRL, add Mock stubs 2 years ago
Raal Goff e8fdb703c9 initial support for CRL 2 years ago
Panagiotis Siatras 00634fb648
api/render, api/log: initial implementation of the packages (#860)
* api/render: initial implementation of the package

* acme/api: refactored to support api/render

* authority/admin: refactored to support api/render

* ca: refactored to support api/render

* api: refactored to support api/render

* api/render: implemented Error

* api: refactored to support api/render.Error

* acme/api: refactored to support api/render.Error

* authority/admin: refactored to support api/render.Error

* ca: refactored to support api/render.Error

* ca: fixed broken tests

* api/render, api/log: moved error logging to this package

* acme: refactored Error so that it implements render.RenderableError

* authority/admin: refactored Error so that it implements render.RenderableError

* api/render: implemented RenderableError

* api/render: added test coverage for Error

* api/render: implemented statusCodeFromError

* api: refactored RootsPEM to work with render.Error

* acme, authority/admin: fixed pointer receiver name for consistency

* api/render, errs: moved StatusCoder & StackTracer to the render package
2 years ago
Andrew Reed d5d70baba7
Add /roots.pem handler (#866)
* Add /roots.pem handler

* Review changes

* Remove no peer cert test case
2 years ago
Panagiotis Siatras 29092b9d8a
api: refactored to use the read package 2 years ago
Mariano Cano f8df6a1acc Change variable name for consistency 2 years ago
Mariano Cano 616490a9c6 Refactor renew after expiry token authorization
This changes adds a new authority method that authorizes the
renew after expiry tokens.
2 years ago
Mariano Cano afb5d36206 Allow to renew certificates using an x5c-like token. 2 years ago
Mariano Cano b5db3f5706 Modify errs.ForbiddenErr to always return an error to the cli. 3 years ago
Mariano Cano 8c8db0d4b7 Modify errs.BadRequestErr() to always return an error to the client. 3 years ago
max furman 933b40a02a Introduce gocritic linter and address warnings 3 years ago
Mariano Cano 4aa529605d
Merge pull request #641 from hillu/quote-serial
Log certificate's serial number as stringified decimal number
3 years ago
Herman Slatman 9210a6740b
Fix logging provisioner name as string 3 years ago
Hilko Bengen edb01bc9f2 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
3 years ago
max furman 77fdfc9fa3 Merge branch 'master' into max/cert-mgr-crud 3 years ago
max furman 9fdef64709 Admin level API for provisioner mgmt v1 3 years ago
Mariano Cano 65dacc2795 Replace golint with revive 3 years ago
max furman 4f3e5ef64d wip 3 years ago
max furman 7b5d6968a5 first commit 3 years ago