Commit Graph

198 Commits (master)

Author SHA1 Message Date
Max f8148071fb
Merge pull request #915 from smallstep/max/removing-beta
exposing authority configuration for provisioner cli commands
2 years ago
max furman 25b8d196d8 Couple changes in response to PR
- add skipInit option to skip authority initialization
- check admin API status when removing provisioners - no need to check
  admins when not using Admin API
2 years ago
Mariano Cano 8942422973 Add GetID() and add authority to initial context 2 years ago
Mariano Cano d461918eb0 Merge branch 'master' into context-authority 2 years ago
max furman 4cb74e7d8b fix linter warnings 2 years ago
Mariano Cano 48e2fabeb8 Add authority.MustFromContext 2 years ago
Mariano Cano 9628fa3562 Add methods to store and retrieve an authority from the context. 2 years ago
Herman Slatman 6e1f8dd7ab
Refactor policy engines into container 2 years ago
max furman b91affdd34 exposing authority configuration for provisioner cli commands 2 years ago
Herman Slatman 3eecc4f7bb
Improve test coverage for reloadPolicyEngines 2 years ago
Herman Slatman 9797b3350e
Merge branch 'master' into herman/allow-deny 2 years ago
Mariano Cano b7e11da480 Merge branch 'master' into feat/linkedra 2 years ago
Herman Slatman 034b7943fe
Merge branch 'master' into herman/allow-deny 2 years ago
Raal Goff 53dbe2309b implemented some requested changes 2 years ago
Raal Goff a607ab189a requested changes 2 years ago
Raal Goff d417ce3232 implement changes from review 2 years ago
Carl Tashian 150eee70df Updates based on Herman's feedback 2 years ago
Carl Tashian 43f2c655b9 More info on startup 2 years ago
Herman Slatman 96f4c49b0c
Improve how policy errors are returned and used 2 years ago
Herman Slatman 571b21abbc
Fix (most) PR comments 2 years ago
Carl Tashian 1ba1584c7a Formatted. 2 years ago
Carl Tashian a13e58e340 Update GetAuthorityInfo -> GetInfo 2 years ago
Carl Tashian 90cb6315b1 Progress. 2 years ago
Carl Tashian 055e75f394 Progress? 2 years ago
Herman Slatman 0e052fe299
Add authority policy API 2 years ago
Mariano Cano 580a9c1476 Get linked RA configuration using the linked ca client. 2 years ago
Herman Slatman dc23fd23bf
Merge branch 'master' into herman/allow-deny-next 2 years ago
Carl Tashian 25cc9a1728
Update authority/authority.go
Co-authored-by: Herman Slatman <hslatman@users.noreply.github.com>
2 years ago
Carl Tashian baf3c40fef Print some basic configuration info on startup 2 years ago
Herman Slatman 101ca6a2d3
Check admin subjects before changing policy 2 years ago
Herman Slatman 81b0c6c37c
Add API implementation for authority and provisioner policy 2 years ago
Mariano Cano 79349b4d7c Add options to use custom renewal methods. 2 years ago
Herman Slatman 7c541888ad
Refactor configuration of allow/deny on authority level 2 years ago
max furman a79d4af19b change return value of generateProvisionerConfig to value
- always used as value (rather than pointer)
2 years ago
Mariano Cano d384b534c7
Merge pull request #814 from smallstep/x509-enforcer
Authority enforcer option
2 years ago
Mariano Cano 300c19f8b9 Add a custom enforcer that can be used to modify a cert. 2 years ago
Herman Slatman 64680bb16d
Fix PR comments 2 years ago
Herman Slatman 3612eefc31
Cleanup 2 years ago
Herman Slatman 9c6580ccd2
Fix macOS SCEP client issues
Fixes #746
2 years ago
Herman Slatman 2d357da99b
Add tests for ACME revocation 3 years ago
max furman 933b40a02a Introduce gocritic linter and address warnings 3 years ago
Mariano Cano 9fb6df3abb Fix ssh template variables when CA is injected using options. 3 years ago
Mariano Cano aedd7fcc05 Be able to start a SSH host or SSH user only CA
In previous versions if the host or user CA is not configured, the
start of step-ca was crashing. This allows to configure a user or
host only ssh ca.
3 years ago
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
3 years ago
Mariano Cano 492ff4b632 Ask for the first provisioner password if none is provided. 3 years ago
Mariano Cano 91a369f618 Automatically enable admin properly on linked cas. 3 years ago
Mariano Cano 26122a2cbf Enable admin automatically if a token is provided. 3 years ago
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.
3 years ago
Mariano Cano dd9850ce4c Add working implementation of the linkedca.
Replaces the authority adminDB with a new impmentation that users the
linkedca client to retrieve the data.

Note that this implementation still hardcodes the endpoint to localhost.
3 years ago
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
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
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.
3 years ago
Herman Slatman 97b88c4d58 Address (most) PR comments 3 years ago
Herman Slatman be528da709 Make tests green 3 years ago
Herman Slatman 57a62964b1 Make tests not fail hard on ECDSA keys
All tests for the Authority failed because the test data
contains ECDSA keys. ECDSA keys are no crypto.Decrypter,
resulting in a failure when instantiating the Authority.
3 years ago
Herman Slatman 491c2b8d93 Improve initialization of SCEP authority 3 years ago
Herman Slatman 2d85d4c1c1 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.
3 years ago
Herman Slatman e7cb80f880 Fix linter issues 3 years ago
Herman Slatman 2a249d20de Refactor initialization of SCEP authority 3 years ago
Herman Slatman 339039768c Refactor SCEP authority initialization and clean some code 3 years ago
Herman Slatman 48c86716a0 Add rudimentary (and incomplete) support for SCEP 3 years ago
max furman 94ba057f01 wip 3 years ago
max furman 01a4460812 wip 3 years ago
max furman 5929244fda wip 3 years ago
max furman 9bf9bf142d wip 3 years ago
max furman 4f3e5ef64d wip 3 years ago
max furman 5d09d04d14 wip 3 years ago
max furman 4d48072746 wip admin CRUD 3 years ago
max furman af3cf7dae9 first steps 3 years ago
max furman 2f60f20b0b lots of codes 3 years ago
max furman 7b5d6968a5 first commit 3 years ago
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.
3 years ago
Herman Slatman 583d60dc0d
Address (most) PR comments 3 years ago
Herman Slatman a4844fee7b
Make tests green 3 years ago
Herman Slatman 99952080c7
Make tests not fail hard on ECDSA keys
All tests for the Authority failed because the test data
contains ECDSA keys. ECDSA keys are no crypto.Decrypter,
resulting in a failure when instantiating the Authority.
3 years ago
Herman Slatman e1cab4966f
Improve initialization of SCEP authority 3 years ago
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.
3 years ago
Herman Slatman 538fe8114d
Fix linter issues 3 years ago
Herman Slatman 7ad90d10b3
Refactor initialization of SCEP authority 3 years ago
Herman Slatman 9e43dc85d8
Merge branch 'master' into hs/scep-master 3 years ago
Herman Slatman 713b571d7a
Refactor SCEP authority initialization and clean some code 3 years ago
Herman Slatman ffdd58ea3c
Add rudimentary (and incomplete) support for SCEP 3 years ago
Mariano Cano fbd2208044 Close key manager for safe reloads when a cgo module is used. 3 years ago
Miclain Keffeler 7545b4a625 leverage intermediate_ca.crt for appending certs. 4 years ago
Anton Lundin 3e6137110b Add support for using ssh-agent as a KMS
This adds a new KMS, SSHAgentKMS, which is a KMS to provide signing keys
for issuing ssh certificates signed by a key managed by a ssh-agent. It
uses the golang.org/x/crypto package to get a native Go implementation
to talk to a ssh-agent.

This was primarly written to be able to use gpg-agent to provide the
keys stored in a YubiKeys openpgp interface, but can be used for other
setups like proxying a ssh-agent over network.

That way the signing key for ssh certificates can be kept in a
"sign-only" hsm.

This code was written for my employer Intinor AB, but for simplicity
sake gifted to me to contribute upstream.

Signed-off-by: Anton Lundin <glance@acc.umu.se>
4 years ago
Mariano Cano ef92a3a6d7 Move cas options under authority. 4 years ago
Mariano Cano 072adc906e Print root fingerprint for CloudCAS. 4 years ago
Mariano Cano 38fa780775 Add interface to get root certificate from CAS.
This change makes easier the configuration of cloudCAS as it does
not require to configure the root or intermediate certificate
in the ca.json. CloudCAS will get the root certificate using
the configured certificateAuthority.
4 years ago
Mariano Cano 60515d92c5 Remove unnecessary properties. 4 years ago
Mariano Cano bd8dd9da41 Do not read issuer and signer twice. 4 years ago
Mariano Cano aad8f9e582 Pass issuer and signer to softCAS options.
Remove commented code and initialize CAS properly.
Minor fixes in CloudCAS.
4 years ago
Mariano Cano 1b1f73dec6 Early attempt to develop a CAS interface. 4 years ago
Mariano Cano d30a95236d Use always go.step.sm/crypto 4 years ago
Mariano Cano e83e47a91e Use sshutil and randutil from go.step.sm/crypto. 4 years ago
Mariano Cano fcfc4e9b2b Fix ssh federated template variables. 4 years ago
Mariano Cano e3ae751b57 Use templates from authority instead of config. 4 years ago
Mariano Cano 6c844a0618 Load default templates if no templates are configured. 4 years ago
Mariano Cano c02fe77998 Close the key manager before shutting down. 4 years ago
Mariano Cano 4e544344f9 Initialize the required config fields on embedded authorities.
This change is to make easier the use of embedded authorities. It
can be difficult for third parties to know what fields are required.
The new init methods will define the minimum usable configuration.
4 years ago