Carl Tashian
150eee70df
Updates based on Herman's feedback
2022-04-05 10:59:25 -07:00
Carl Tashian
acc75bc679
Add context name to startup info
2022-04-04 12:29:27 -07:00
Carl Tashian
4b9f44982d
Merge branch 'master' into startup-info
2022-04-04 12:19:55 -07:00
Carl Tashian
43f2c655b9
More info on startup
2022-04-04 12:16:37 -07:00
Carl Tashian
7ebb2e4c74
Update ca/ca.go
...
Co-authored-by: Herman Slatman <hslatman@users.noreply.github.com>
2022-04-04 11:14:04 -07:00
Carl Tashian
1ba1584c7a
Formatted.
2022-03-30 16:08:10 -07:00
Carl Tashian
a13e58e340
Update GetAuthorityInfo -> GetInfo
2022-03-30 16:07:16 -07:00
Carl Tashian
90cb6315b1
Progress.
2022-03-30 16:05:26 -07:00
Carl Tashian
055e75f394
Progress?
2022-03-30 15:48:42 -07:00
Herman Slatman
2fbdf7d5b0
Merge branch 'master' into herman/allow-deny
2022-03-30 14:50:14 +02:00
Herman Slatman
0e052fe299
Add authority policy API
2022-03-30 14:21:39 +02:00
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
2022-03-30 11:22:22 +03:00
Mariano Cano
750e9ee2f8
Attempt to fix TestBootstrapClientServerRotation
...
This change attempts to fix the test TestBootstrapClientServerRotation.
Due to the backdate, the renew options get too large, causing
continuous renewals, and random errors. After experimenting with
different options, truncating durations to seconds have shown better
results than rounding or just use the plain time.
2022-03-28 14:55:40 -07:00
Mariano Cano
5ab79f53be
Fix linter errors
2022-03-28 14:55:39 -07:00
Herman Slatman
dc23fd23bf
Merge branch 'master' into herman/allow-deny-next
2022-03-24 12:36:12 +01:00
Mariano Cano
ba0b170818
Attempt to fix TestBootstrapClientServerRotation
...
This change attempts to fix the test TestBootstrapClientServerRotation.
Due to the backdate, the renew options get too large, causing
continuous renewals, and random errors. After experimenting with
different options, truncating durations to seconds have shown better
results than rounding or just use the plain time.
2022-03-23 19:14:28 -07:00
Carl Tashian
f20784be56
format
2022-03-22 10:41:16 -07:00
Carl Tashian
91be50cf70
Add --quiet flag
2022-03-21 19:55:21 -07:00
Carl Tashian
91a25b52bd
Print discord
2022-03-21 16:59:28 -07:00
Carl Tashian
baf3c40fef
Print some basic configuration info on startup
2022-03-21 16:55:09 -07:00
Mariano Cano
ad8a813abe
Fix linter errors
2022-03-21 16:53:57 -07:00
Panagiotis Siatras
e6b2359273
ca: fixed import statement order
2022-03-18 20:21:01 +02:00
Panagiotis Siatras
9ba33bab4e
ca: refactored to use the read package
2022-03-18 20:21:00 +02:00
Mariano Cano
915911efb6
Disable http loggers in test.
...
They hide the test that fail on tests in the CI.
2022-03-15 12:26:00 -07:00
Mariano Cano
ead742ca0f
Fix unit test
2022-03-15 12:13:01 -07:00
Herman Slatman
81b0c6c37c
Add API implementation for authority and provisioner policy
2022-03-15 15:56:04 +01:00
Mariano Cano
6dcde8a743
Fix typo
2022-03-11 15:22:53 -08:00
Mariano Cano
a4dd586a81
Add method to get the CA url from the client.
2022-03-11 15:13:39 -08:00
Mariano Cano
616490a9c6
Refactor renew after expiry token authorization
...
This changes adds a new authority method that authorizes the
renew after expiry tokens.
2022-03-10 20:21:01 -08:00
Mariano Cano
41ea67ce10
Attempt to fix a bootstrap tests
2022-03-10 13:01:31 -08:00
Herman Slatman
4ebf43c011
Merge pull request #820 from smallstep/herman/acme-api
...
Refactor ACME Admin API
2022-02-10 13:11:44 +01:00
Herman Slatman
5cb23c6029
Merge pull request #804 from smallstep/herman/normalize-ipv6-dns-names
...
Normalize IPv6 hostname addresses
2022-02-09 11:25:24 +01:00
Herman Slatman
d00729df0b
Refactor ACME Admin API
2022-02-08 13:26:30 +01:00
Chris Crook
11637b5793
Add descriptive provisioner JWK decryption error messages
...
Wrap other errors in decryption process with more helpful messaging. This should help users troubleshoot misconfiguration more easily.
Fixes #816
2022-02-04 17:53:58 -05:00
Herman Slatman
bfa2245abb
Merge branch 'master' into herman/normalize-ipv6-dns-names
2022-02-03 17:24:08 +01:00
Herman Slatman
c7c5c3c94e
Merge branch 'master' into herman/scep-macos-renewal-fixes
2022-01-31 13:20:16 +01:00
Herman Slatman
fd9845e9c7
Add cursor and limit to ACME EAB DB interface
2022-01-24 14:03:56 +01:00
Herman Slatman
716b946e7a
Normalize IPv6 hostname addresses
2022-01-19 17:14:45 +01:00
Herman Slatman
64680bb16d
Fix PR comments
2022-01-19 11:31:33 +01:00
Herman Slatman
3612eefc31
Cleanup
2022-01-18 15:54:18 +01:00
Herman Slatman
9c6580ccd2
Fix macOS SCEP client issues
...
Fixes #746
2022-01-14 10:48:23 +01:00
Herman Slatman
30859d3c83
Remove server-side paging logic for ExternalAccountKeys
2022-01-06 14:09:35 +01:00
Herman Slatman
6929e31fe0
Merge branch 'master' into hs/acme-eab
2022-01-04 16:41:36 +01:00
Herman Slatman
22ff90f655
Merge branch 'master' into hs/acme-eab
2021-12-22 12:54:41 +01:00
Herman Slatman
07addd0cac
Fix linting issue
2021-12-22 11:58:00 +01:00
Herman Slatman
a68208a3ba
Set Step CLI User-Agent when performing ACME requests
2021-12-22 11:54:01 +01:00
Mariano Cano
2c63abcf52
fix grammar
2021-12-15 12:16:21 -08:00
Mariano Cano
7c4e6dcc96
Remove duplicated code in bootstrap methods
2021-12-15 11:24:46 -08:00
Mariano Cano
64c19d4264
Fix subject in test, use ip
2021-12-14 15:27:18 -08:00
Mariano Cano
b0b2e77b0e
Avoid doing unauthenticated requests on the SDK
...
When step-ca runs with mTLS required on some endpoints, the SDK
used in autocert will fail to start because the identity certificate
is missing. This certificate is only required to retrieve all roots,
in most cases there's only one, and the SDK has access to it.
2021-12-14 14:42:38 -08:00
Herman Slatman
d799359917
Merge branch 'master' into hs/acme-eab
2021-12-09 13:58:40 +01:00
Herman Slatman
3bc3957b06
Merge branch 'master' into hs/acme-revocation
2021-12-09 09:36:52 +01:00
Herman Slatman
d0c23973cc
Merge branch 'master' into hs/acme-eab
2021-12-06 13:01:23 +01:00
Herman Slatman
2d357da99b
Add tests for ACME revocation
2021-11-26 17:27:42 +01:00
Mariano Cano
d35848f7a9
Fix unit tests.
2021-11-24 11:43:24 -08:00
Mariano Cano
b9beab071d
Fix unit tests.
2021-11-23 18:43:36 -08:00
Mariano Cano
8c8db0d4b7
Modify errs.BadRequestErr() to always return an error to the client.
2021-11-18 18:17:36 -08:00
Mariano Cano
8ce807a6cb
Modify errs.BadRequest() calls to always send an error to the client.
2021-11-18 15:12:44 -08:00
max furman
7fac8c96c3
Merge branch 'master' into max/context
2021-11-17 11:40:01 -08:00
max furman
a7d144996f
SSH backwards compat updates
...
- use existence of new value in data map as boolean
- add tests for backwards and forwards compatibility
- fix old tests that used static dir locations
2021-11-16 21:47:14 -08:00
max furman
d777fc23c2
Add ca.WithInsecure and use methods for file names
2021-11-16 21:47:14 -08:00
max furman
e5951fd84c
Use methods in the step package
...
* rather than variables set at execution time, which may not match the
actual current context
2021-11-16 21:47:14 -08:00
max furman
7eeebca529
Enable step path contexts in identity and pki paths
2021-11-16 21:47:14 -08:00
max furman
10db335f13
mv pkg config -> step
2021-11-16 21:47:14 -08:00
max furman
741ac64c61
change name of package cli-utils/config to cli-utils/step
2021-11-16 21:47:14 -08:00
Herman Slatman
e7a988b2cd
Pin golangci-lint to v1.43.0 and fix issues
2021-11-13 01:30:03 +01:00
Herman Slatman
bcd1240a0e
Merge branch 'master' into hs/acme-eab
2021-10-16 13:32:13 +02:00
Mariano Cano
36b622bfc2
Use Golang's default keep-alive.
...
Since Go 1.13 a net.Listen keep-alive is enabled by default if
the protocol and OS supports it. The new one is 15s to match
the net.Dial default one. Previously http.Server ListenAndServe
and ListenAndServeTLS used to add a wrapper with 3m that we
replicated.
See https://github.com/golang/go/issues/31510
2021-10-15 14:12:43 -07:00
Herman Slatman
dd4b4b0435
Fix remaining gocritic remarks
2021-10-11 23:34:23 +02:00
Herman Slatman
e0b495e4c8
Merge branch 'master' into hs/acme-eab
2021-10-09 01:06:49 +02:00
max furman
933b40a02a
Introduce gocritic linter and address warnings
2021-10-08 14:59:57 -04:00
Herman Slatman
f34d68897a
Refactor retrieval of provisioner into middleware
2021-10-08 14:29:44 +02:00
Herman Slatman
9d4cafc4bd
Merge branch 'master' into hs/acme-eab
2021-10-08 10:33:09 +02:00
Herman Slatman
c2bc1351c6
Add provisioner to remove endpoint and clear reference index on delete
2021-09-17 17:48:09 +02:00
Herman Slatman
9c0020352b
Add lookup by reference and make reference optional
2021-09-17 17:08:02 +02:00
Mariano Cano
6729c79253
Add support for setting individual password for ssh and tls keys
...
This change add the following flags:
* --ssh-host-password-file
* --ssh-user-password-file
Fixes #693
2021-09-16 11:55:41 -07:00
Herman Slatman
f11c0cdc0c
Add endpoint for listing ACME EAB keys
2021-08-27 16:58:04 +02:00
Herman Slatman
9d09f5e575
Add support for deleting ACME EAB keys
2021-08-27 14:10:00 +02:00
Herman Slatman
a98fe03e80
Merge branch 'master' into hs/acme-eab
2021-08-27 12:50:19 +02:00
Herman Slatman
1dba8698e3
Use LinkedCA.EABKey type in ACME EAB API
2021-08-27 12:39:37 +02:00
Mariano Cano
e3ef4a7da9
Update test with default tls options.
2021-08-11 15:42:22 -07:00
Herman Slatman
c6a4c4ecba
Change ACME EAB endpoint
2021-07-23 15:16:11 +02:00
Herman Slatman
c6bfc6eac2
Fix PR comments
2021-07-22 23:48:41 +02:00
Herman Slatman
b65a588d5b
Make authentication work for /admin/eak
2021-07-22 22:43:21 +02:00
Mariano Cano
8fb5340dc9
Use a token at start time to configure linkedca.
...
Instead of using `step-ca login` we will use a new token provided
as a flag to configure and start linkedca. Certificates will be kept
in memory and refreshed automatically.
2021-07-19 19:28:06 -07:00
max furman
1df21b9b6a
Addressing comments in PR review
...
- added a bit of validation to admin create and update
- using protojson where possible in admin api
- fixing a few instances of admin -> acme in errors
2021-07-06 17:14:13 -07:00
max furman
77fdfc9fa3
Merge branch 'master' into max/cert-mgr-crud
2021-07-02 20:26:46 -07:00
max furman
9fdef64709
Admin level API for provisioner mgmt v1
2021-07-02 19:05:17 -07:00
Herman Slatman
03c472359c
Add sync.WaitGroup for proper error handling in Run()
2021-05-26 16:14:57 -07:00
Herman Slatman
13fe7a0121
Make serving SCEP endpoints optional
...
Only when a SCEP provisioner is enabled, the SCEP endpoints
will now be available.
The SCEP endpoints will be served on an "insecure" server,
without TLS, only when an additional "insecureAddress" and a
SCEP provisioner are configured for the CA.
2021-05-26 16:13:57 -07:00
Herman Slatman
97b88c4d58
Address (most) PR comments
2021-05-26 16:12:57 -07:00
Herman Slatman
5df60c5a9b
Add support for multiple SCEP provisioners
...
Similarly to how ACME suppors multiple provisioners, it's
now possible to load the right provisioner based on the
URL.
2021-05-26 16:06:22 -07:00
Herman Slatman
339039768c
Refactor SCEP authority initialization and clean some code
2021-05-26 16:00:08 -07:00
Herman Slatman
48c86716a0
Add rudimentary (and incomplete) support for SCEP
2021-05-26 15:58:04 -07:00
max furman
94ba057f01
wip
2021-05-26 14:55:31 -07:00
max furman
01a4460812
wip
2021-05-25 21:13:01 -07:00
max furman
9bfb1c2e7b
wip
2021-05-21 13:31:41 -07:00
max furman
d8d5d7332b
wip
2021-05-20 16:02:20 -07:00
max furman
9bf9bf142d
wip
2021-05-20 13:01:58 -07:00
Herman Slatman
bc2bb53009
Merge branch 'master' into hs/scep
2021-05-20 21:35:44 +02:00
max furman
4f3e5ef64d
wip
2021-05-19 15:20:16 -07:00
max furman
5d09d04d14
wip
2021-05-19 15:20:16 -07:00
max furman
4d48072746
wip admin CRUD
2021-05-19 15:20:16 -07:00
max furman
98a6e54530
wip
2021-05-19 15:20:16 -07:00
max furman
af3cf7dae9
first steps
2021-05-19 15:20:16 -07:00
max furman
7b5d6968a5
first commit
2021-05-19 15:20:16 -07:00
Mariano Cano
26e7cc6177
Allow to use the SDK with ed25519 keys.
2021-05-06 18:10:12 -07:00
Herman Slatman
c04f556dc2
Merge branch 'master' into hs/scep
2021-05-06 22:00:29 +02:00
max furman
8c709fe3c2
Init config on load | Add wrapper for cli
2021-05-04 14:45:11 -07:00
Mariano Cano
5846314f88
Add missing Rekey method to the ca.Client
...
Fixes #315
2021-04-29 16:06:45 -07:00
Herman Slatman
68d5f6d0d2
Merge branch 'master' into hs/scep
2021-04-29 22:18:00 +02:00
Mariano Cano
1328aa3e47
Fix review comments.
2021-04-26 18:45:46 -07:00
Mariano Cano
50b9aaec57
Add new identity tests.
2021-04-21 18:07:59 -07:00
Mariano Cano
e414d0c8ea
Fix unit tests.
2021-04-21 16:20:53 -07:00
Mariano Cano
c5234e9c61
Refactor tls tunnel connections.
...
New method will use an identity-like file with the configuration
used to create the (m)TLS connection to the tunnel.
2021-04-21 16:20:53 -07:00
Mariano Cano
e75a9409a5
Add experimental support for a TLS over TLS tunnel.
2021-04-21 16:20:53 -07:00
Herman Slatman
0487686f69
Merge branch 'master' into hs/scep
2021-04-16 13:25:01 +02:00
Mariano Cano
02a5879cfe
Specify always a Proxy in all custom transports.
...
Fixes #535
2021-04-14 19:35:31 -07:00
max furman
93c3c2bf2e
Error handle non existent provisioner downstream and disable debug route logging
2021-04-14 15:35:43 -07:00
max furman
b1888fd34d
Use different method for unescpaed paths for the router
2021-04-14 15:11:15 -07:00
Max
b724af30ad
Merge pull request #496 from smallstep/max/acme
...
Convert to ACME DB interface
2021-04-13 15:02:03 -07:00
max furman
672e3f976e
Few ACME fixes ...
...
- always URL escape linker output
- validateJWS should accept RSAPSS
- GetUpdateAccount -> GetOrUpdateAccount
2021-04-12 19:06:07 -07:00
Herman Slatman
2320d0911e
Add sync.WaitGroup for proper error handling in Run()
2021-03-26 16:21:02 +01:00
Herman Slatman
b815478981
Make serving SCEP endpoints optional
...
Only when a SCEP provisioner is enabled, the SCEP endpoints
will now be available.
The SCEP endpoints will be served on an "insecure" server,
without TLS, only when an additional "insecureAddress" and a
SCEP provisioner are configured for the CA.
2021-03-26 16:05:33 +01:00
Herman Slatman
c5e4ea08b3
Merge branch 'master' into hs/scep
2021-03-26 15:22:41 +01:00
Herman Slatman
b97f024f8a
Remove superfluous call to StoreCertificate
2021-03-26 14:02:52 +01:00
max furman
df05340521
fixing broken unit tests
2021-03-25 12:05:46 -07:00
max furman
f72b2ff2c2
[acme db interface] nosql authz unit tests
2021-03-25 12:05:46 -07:00
max furman
074ab7b221
[acme db interface] add linker tests
2021-03-25 12:05:46 -07:00
max furman
bb8d54e596
[acme db interface] unit tests compiling
2021-03-25 12:05:46 -07:00
max furman
fc395f4d69
[acme db interface] compiles!
2021-03-25 12:05:46 -07:00
max furman
80a6640103
[acme db interface] wip
2021-03-25 12:05:46 -07:00
Mariano Cano
8c8c160c92
Fix method name in comment.
2021-03-25 11:06:37 -07:00
Mariano Cano
bdeb0ccd7c
Add support for the flag --issuer-password-file
...
The new flag allows to pass a file with the password used to decrypt
the key used in RA mode.
2021-03-24 14:53:19 -07:00
Herman Slatman
583d60dc0d
Address (most) PR comments
2021-03-21 16:42:41 +01:00
Herman Slatman
e1cab4966f
Improve initialization of SCEP authority
2021-03-12 15:49:39 +01:00
Herman Slatman
8c5b12e21d
Add non-TLS server and improve crypto.Decrypter interface
...
A server without TLS was added to serve the SCEP endpoints. According
to the RFC, SCEP has to be served via HTTP. The `sscep` client, for
example, will stop any URL that does not start with `http://` from
being used, so serving SCEP seems to be the right way to do it.
This commit adds a second server for which no TLS configuration is
configured. A distinct field in the configuration, `insecureAddress`
was added to specify the address for the insecure server.
The SCEP endpoints will also still be served via HTTPS. Some clients
may be able to work with that.
This commit also improves how the crypto.Decrypter interface is
handled for the different types of KMSes supported by step. The
apiv1.Decrypter interface was added. Currently only SoftKMS
implements this interface, providing a crypto.Decrypter required
for SCEP operations.
2021-03-12 14:18:36 +01:00
Herman Slatman
2d21b09d41
Remove some duplicate and unnecessary logic
2021-03-06 23:24:49 +01:00
Herman Slatman
3a5f633cdd
Add support for multiple SCEP provisioners
...
Similarly to how ACME suppors multiple provisioners, it's
now possible to load the right provisioner based on the
URL.
2021-03-05 12:40:42 +01:00
Herman Slatman
7948f65ac0
Merge branch 'master' into hs/scep
2021-02-26 00:41:33 +01:00
Herman Slatman
7ad90d10b3
Refactor initialization of SCEP authority
2021-02-26 00:32:21 +01:00
Mariano Cano
5be86691c1
Fix unit tests in Go 1.16.
2021-02-23 15:29:56 -08:00
Herman Slatman
78d78580b2
Add note about using a second (unsecured) server
2021-02-19 11:00:52 +01:00
Herman Slatman
9e43dc85d8
Merge branch 'master' into hs/scep-master
2021-02-19 10:16:39 +01:00
Herman Slatman
713b571d7a
Refactor SCEP authority initialization and clean some code
2021-02-12 17:02:39 +01:00
Herman Slatman
ffdd58ea3c
Add rudimentary (and incomplete) support for SCEP
2021-02-12 12:03:08 +01:00
Mariano Cano
b487edbd13
Clarify comment.
2021-02-11 17:38:14 -08:00
Mariano Cano
fbd2208044
Close key manager for safe reloads when a cgo module is used.
2021-02-01 17:14:44 -08:00
Mariano Cano
40d0596b71
Use smallstep/cli-utils instead of smallstep/cli
2020-10-29 13:10:03 -07:00
Mariano Cano
ba918100d0
Use go.step.sm/crypto/jose
...
Replace use of github.com/smallstep/cli/crypto with the new package
go.step.sm/crypto/jose.
2020-08-24 14:44:11 -07:00