Commit Graph

600 Commits (6476eb45a7e97ac43a37da7ab4893555625de249)

Author SHA1 Message Date
Herman Slatman 375687cd1b
Add setup for Authority tests 3 years ago
Herman Slatman a3ec890e71
Fix small typo in divisible 3 years ago
Herman Slatman d0a9cbc797
Change fmt to errors package for formatting errors 3 years ago
Herman Slatman ff1b46c95d
Add configuration option for specifying the minimum public key length
Instead of using the defaultPublicKeyValidator a new validator called
publicKeyMinimumLengthValidator has been implemented that uses a
configurable minimum length for public keys in CSRs.

It's also an option to alter the defaultPublicKeyValidator to also
take a parameter, but that would touch quite some lines of code. This
might be a viable option after merging SCEP support.
3 years ago
Herman Slatman c04f556dc2
Merge branch 'master' into hs/scep 3 years ago
Cristian Le d7eec869c2 Fix the previous tests 3 years ago
Cristian Le c2d30f7260 gofmt everything 3 years ago
Cristian Le f38a72a62b Leftover from previous commit 3 years ago
Cristian Le 1d2445e1d8 Removed the variadic username
Could be useful later on, but for the current PR changes should be minimized
3 years ago
Cristian Le 9e00b82bdf Revert `oidc_test.go`
Moving the `preferred_username` to a separate PR
3 years ago
Cristian Le decf0fc8ce Revert using preferred_username
It might present a security issue if the users can change this value for themselves. Needs further investigation
3 years ago
Cristian Le 21732f213b Fix shadow issue in CI 3 years ago
Mariano Cano 08e5ec6ad1 Fix IsAdminGroup comment. 3 years ago
Mariano Cano 46c1dc80fb Use map[string]struct{} instead of map[string]bool 3 years ago
Mariano Cano aafac179a5 Add test for oidc with preferred usernames. 3 years ago
Cristian Le f730c0bec4 Sanitize usernames 3 years ago
Cristian Le 48666792c7 Draft: adding usernames to GetIdentityFunc 3 years ago
Cristian Le 79eec83f3e Rename and reformat to PreferredUsername 3 years ago
Cristian Le 09a21fef26 Implement #550
- Read `preferred_username` from token
- Add `preferred_username` to the default Usernames
- Check the `admin` array for admin groups that the user might belong to
3 years ago
max furman 8c709fe3c2 Init config on load | Add wrapper for cli 3 years ago
Mariano Cano 2cbaee9c1d Allow to use an alternative interface to store renewed certs.
This can be useful to know if a certificate has been renewed and
link one certificate with the 'parent'.
3 years ago
Herman Slatman 68d5f6d0d2
Merge branch 'master' into hs/scep 3 years ago
Mariano Cano e6833ecee3 Add extension of db.AuthDB to store the fullchain.
Add a temporary solution to allow an extension of an db.AuthDB
interface that logs the fullchain of certificates instead of just
the leaf.
3 years ago
Herman Slatman 2336936b5c
Fix typo 4 years ago
Herman Slatman 9787728fbd
Mask challenge password after it has been read 4 years ago
Herman Slatman 0487686f69
Merge branch 'master' into hs/scep 4 years ago
Max b724af30ad
Merge pull request #496 from smallstep/max/acme
Convert to ACME DB interface
4 years ago
Mariano Cano aea2a7c9f3 Update sshd_config.tpl to a Match all block.
Fixes #479
4 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.
4 years ago
Herman Slatman c5e4ea08b3
Merge branch 'master' into hs/scep 4 years ago
max furman 2ae43ef2dc [acme db interface] wip errors 4 years ago
Mariano Cano 0b8528ce6b Allow mTLS revocation without provisioner. 4 years ago
Herman Slatman 583d60dc0d
Address (most) PR comments 4 years ago
Mariano Cano bcf70206ac Add support for revocation using an extra provisioner in the RA. 4 years ago
Mariano Cano a6115e29c2 Add initial implementation of StepCAS.
StepCAS allows to configure step-ca as an RA using another step-ca
as the main CA.
4 years ago
Herman Slatman a4844fee7b
Make tests green 4 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.
4 years ago
Herman Slatman e1cab4966f
Improve initialization of SCEP authority 4 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.
4 years ago
Herman Slatman 538fe8114d
Fix linter issues 4 years ago
Herman Slatman 2536a08dc2
Add support for configuring capabilities (cacaps) 4 years ago
Herman Slatman e4d7ea8fa0
Add support for challenge password 4 years ago
Herman Slatman 311c9d767b
Add AuthorizeSign method to SCEP authority 4 years ago
Herman Slatman 7ad90d10b3
Refactor initialization of SCEP authority 4 years ago
Herman Slatman 9e43dc85d8
Merge branch 'master' into hs/scep-master 4 years ago
Herman Slatman 713b571d7a
Refactor SCEP authority initialization and clean some code 4 years ago
Herman Slatman ffdd58ea3c
Add rudimentary (and incomplete) support for SCEP 4 years ago
Mariano Cano fbd2208044 Close key manager for safe reloads when a cgo module is used. 4 years ago
max furman 16665c97f0 Allow empty SAN in CSR for validation ...
- The default template will always use the SANs from the token.
- If there are any SANs they must be validated against the token.
4 years ago
Miclain Keffeler cf063d1f4a Revert "Begins to fix issue 87"
This reverts commit e2ba4159c3.
4 years ago