Cristian Le
bb1e051b27
Revert using preferred_username
...
It might present a security issue if the users can change this value for themselves. Needs further investigation
2021-05-05 08:12:17 +09:00
Cristian Le
e5b206c1de
Fix shadow issue in CI
2021-05-04 13:47:17 +09:00
Mariano Cano
484b30d0a1
Fix IsAdminGroup comment.
2021-04-29 18:47:17 -07:00
Mariano Cano
9cc410b308
Use map[string]struct{} instead of map[string]bool
2021-04-29 18:40:04 -07:00
Mariano Cano
c8eb771a8e
Add test for oidc with preferred usernames.
2021-04-29 18:37:48 -07:00
Cristian Le
8b1ab30212
Sanitize usernames
2021-04-30 09:41:06 +09:00
Cristian Le
bf364f0a5f
Draft: adding usernames to GetIdentityFunc
2021-04-30 09:14:28 +09:00
Cristian Le
861ef80e0d
Rename and reformat to PreferredUsername
2021-04-30 08:44:41 +09:00
Cristian Le
55fbcfb3be
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
2021-04-29 15:44:21 +09:00
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.
2021-04-26 12:28:51 -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
Mariano Cano
aea2a7c9f3
Update sshd_config.tpl to a Match all block.
...
Fixes #479
2021-04-12 18:37:10 -07:00
max furman
2ae43ef2dc
[acme db interface] wip errors
2021-03-25 12:05:46 -07:00
Mariano Cano
0b8528ce6b
Allow mTLS revocation without provisioner.
2021-03-22 13:37:31 -07:00
Mariano Cano
bcf70206ac
Add support for revocation using an extra provisioner in the RA.
2021-03-17 19:47:36 -07:00
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.
2021-03-17 19:33:35 -07:00
Mariano Cano
fbd2208044
Close key manager for safe reloads when a cgo module is used.
2021-02-01 17:14:44 -08:00
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.
2021-01-14 15:26:46 -06:00
Miclain Keffeler
cf063d1f4a
Revert "Begins to fix issue 87"
...
This reverts commit e2ba4159c3
.
2020-12-23 22:46:21 -06:00
Miclain Keffeler
21dc406382
Begins to fix issue 87
2020-12-23 22:46:21 -06:00
Miclain Keffeler
7545b4a625
leverage intermediate_ca.crt for appending certs.
2020-12-23 22:41:10 -06:00
Mariano Cano
5017b7d21f
Recalculate token id instead of validating it.
2020-12-17 14:52:34 -08:00
Mariano Cano
86c947babc
Upgrade crypto and fix test.
2020-12-17 14:17:08 -08:00
Mariano Cano
0cf594a003
Validate payload ID.
...
Related to #435
2020-12-17 13:35:14 -08:00
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>
2020-11-04 09:06:23 +01:00
Mariano Cano
39b23c057d
Add all AWS certificates used to verify base64 signatures.
2020-10-28 17:47:44 -07:00
Mariano Cano
ef92a3a6d7
Move cas options under authority.
2020-10-19 18:08:51 -07:00
Mariano Cano
7d1686dc53
Add option to specify the AWS IID certificates to use.
...
This changes adds a new option `iidRoots` that allows a user to
define one or more certificates that will be used for AWS IID
signature validation.
Fixes #393
2020-10-13 17:51:24 -07:00
Mariano Cano
647b9b4541
Merge pull request #367 from smallstep/cas
...
Support for CAS Interface and CloudCAS
2020-10-05 18:09:01 -07:00
Mariano Cano
3e0ab8fba7
Fix typo.
2020-10-05 18:00:50 -07:00
Mariano Cano
d64427487d
Add comment about the missing error check.
2020-10-05 17:39:44 -07:00
Mariano Cano
072adc906e
Print root fingerprint for CloudCAS.
2020-09-22 13:23:48 -07:00
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.
2020-09-21 15:27:20 -07:00
Mariano Cano
4c8bf87dc1
Use new admin template for K8ssa and admin-OIDC provisioners.
...
This change replaces the .Insecure.CR template to one that sets
all the SANs, but uses key usages and extended key usages for
regular TLS certificates.
2020-09-21 12:49:16 -07:00
Mariano Cano
d79b4e709e
Create a hash of a token if a token id is empty.
2020-09-18 16:25:08 -07:00
Mariano Cano
60515d92c5
Remove unnecessary properties.
2020-09-16 13:31:26 -07:00
Mariano Cano
1550a21f68
Fix unit tests.
2020-09-15 18:14:21 -07:00
Mariano Cano
e17ce39e3a
Add support for Revoke using CAS.
2020-09-15 18:14:03 -07:00
Mariano Cano
bd8dd9da41
Do not read issuer and signer twice.
2020-09-10 19:13:17 -07:00
Mariano Cano
aad8f9e582
Pass issuer and signer to softCAS options.
...
Remove commented code and initialize CAS properly.
Minor fixes in CloudCAS.
2020-09-10 19:09:46 -07:00
Mariano Cano
1b1f73dec6
Early attempt to develop a CAS interface.
2020-09-08 19:26:32 -07:00
Mariano Cano
276e307a1d
Add extra tests for CustomSSHTemplateOptions
2020-09-08 15:43:39 -07:00
max furman
da9f0b09af
Ignore null
string for x509 and ssh templateData.
2020-09-08 13:59:22 -07:00
Mariano Cano
81c6e01269
Fix unit test.
2020-09-04 11:16:17 -07:00
max furman
ce9af5c20f
Standardize k8ssa check on issuer name
2020-08-31 20:56:00 -07:00
Mariano Cano
8ee246edda
Upgrade go.step.sm to v0.4.0
2020-08-31 12:30:54 -07:00
Mariano Cano
ce5e1b4934
Fix merge issue.
2020-08-28 14:44:43 -07:00
Mariano Cano
35bd3ec383
Merge pull request #329 from smallstep/ssh-cert-templates
...
SSH cert templates
2020-08-28 14:42:58 -07:00
Mariano Cano
cef0475e71
Make clear what's a template/unsigned certificate.
2020-08-28 14:33:26 -07:00
Mariano Cano
4d375a06f5
Make clearer what's an unsigned cert.
2020-08-28 14:29:18 -07:00