Commit Graph

111 Commits (e3220232a02a8b4577b532d7d509557cee74fba3)

Author SHA1 Message Date
Mariano Cano 44f0d61354 Fix typo. 3 years ago
Mariano Cano a2b03083c8 Fix gocritic warnings. 3 years ago
Mariano Cano 2aee71b4c0 Fix typo. 3 years ago
Mariano Cano e15b5faf7d Merge branch 'master' into keyvault 3 years ago
Mariano Cano 5d0bd7d155 Fix grammar in comments. 3 years ago
max furman 5fc24c697c Fix a few more linter warnings and remove GOFLAGS from make lint 3 years ago
max furman 933b40a02a Introduce gocritic linter and address warnings 3 years ago
Mariano Cano f6e69bf826 Fix typo. 3 years ago
Mariano Cano c638c282d8 Add omitempty to KMS options. 3 years ago
Mariano Cano 822a1e3bdb Add variable with the default implementation. 3 years ago
Mariano Cano 2240ebbadc Add NameValidator interface and implement it for azurekms. 3 years ago
Mariano Cano abdb56065d Allow o specify an hsm using the uri. 3 years ago
Mariano Cano f1ef3fb351 Add GetBool(s string) bool to URI type. 3 years ago
Mariano Cano 500b540406 Remove unused code. 3 years ago
Mariano Cano 2026787ce4 Add some extra coverage. 3 years ago
Mariano Cano 08c9902f29 Add new alias in the kms package. 3 years ago
Mariano Cano 505b1f3678 Add new test case with a version in the opaque string. 3 years ago
Mariano Cano d2581489a3 Redefine uris and set proper type.
URIs will now have the form:

  - azurekms:name=my-key;vault=my-vault
  - azurekms:name=my-key;vault=my-vault?version=my-version
3 years ago
Mariano Cano 656099c4f0 Add type for azurekms. 3 years ago
Mariano Cano 56c3559e52 Add some extra coverage. 3 years ago
Mariano Cano 6389100325 Add unit tests for azurekms. 3 years ago
Mariano Cano 97d08a1b61 Fix typos. 3 years ago
Mariano Cano 392a18465f Add initial implementation of Azure Key Vault KMS.
Fixes #462
3 years ago
Mariano Cano 6d644880bd Allow to kms signers to define the SignatureAlgorithm
CloudKMS keys signs data using an specific signature algorithm, in RSA keys,
this can be PKCS#1 RSA or RSA-PSS, if the later is used, x509.CreateCertificate
will fail unless the template SignatureCertificate is properly set.

On contrast, AWSKMS RSA keys, are just RSA keys, and can sign with PKCS#1 or
RSA-PSS schemes, so right now the way to enforce one or the other is to used
templates.
3 years ago
max furman 8ba9013f5d gofmt linting errors 3 years ago
max furman 8bec473f8e fix gofmt linting errors 3 years ago
Mariano Cano abd78e2d2a Make kms uri compatible with Go 1.17.
Go 1.17 introduces a change in the net/url package disallowing the
use of semicolon (;) in URL queries. We used url.ParseQuery to
decode the opaque string that is semicolon separated. This change
replaces the semicolon with ampersands before decoding it.
3 years ago
Mariano Cano a864f0134d Fix key version when SHA512WithRSA is used.
There was a typo creating RSA keys with SHA256 digests instead of
SHA512
3 years ago
Mariano Cano c4d0c8a18e Fix credentials file parameter on awskms 3 years ago
Herman Slatman 877fc9ae8c
Add tests for CreateDecrypter 3 years ago
Herman Slatman 68d5f6d0d2
Merge branch 'master' into hs/scep 3 years ago
Mariano Cano 180b5c3e3c Fix typo. 4 years ago
Herman Slatman 583d60dc0d
Address (most) PR comments 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 7948f65ac0
Merge branch 'master' into hs/scep 4 years ago
Herman Slatman 7ad90d10b3
Refactor initialization of SCEP authority 4 years ago
Max 8ead310d24
Merge pull request #485 from smallstep/max/actions
Convert to github actions
4 years ago
Mariano Cano 163eb7029c Refactor cloudkms signer to return an error on the constructor. 4 years ago
Mariano Cano cae08bff80 Validate that the signer can get the public key. 4 years ago
max furman f88f58440f add //nolint for new 1.16 deprecation warnings
- dsa
- pem.DecryptPEMBlock
4 years ago
Mariano Cano 2ba4e37530 Add URI support to configure yubikeys. 4 years ago
Mariano Cano 4c562160fc Fix typo. 4 years ago
Mariano Cano 4bec2b04ec Add support for retired key management slots on yubikey.
Fixes #461
4 years ago
Mariano Cano a947779795 Add uri support initializing cloudkms. 4 years ago
Mariano Cano 4902e45729 Add URI support initializing an awskms. 4 years ago
Mariano Cano 1ddddb6bc7 Permit linting and testing without CGO support.
Use CGO for testing and building in travis.
Fixes #471
4 years ago
Mariano Cano d03c088ab7 Add test cases for uris with only the schema. 4 years ago
Mariano Cano f6cbd9dc88 Fix typos. 4 years ago
Mariano Cano ebaeae9008 Avoid closing pkcs#11 context twice. 4 years ago
Mariano Cano f425a81d36 Enforce the use of id and label when generating objects. 4 years ago