Jeff Mitchell
32aed5fa74
Embed the cache directly
2016-01-27 21:59:20 -05:00
Jeff Mitchell
4808c811ed
Merge pull request #942 from wikiwi/fix-ssh-open-con
...
Cleanly close SSH connections
2016-01-27 17:18:54 -05:00
Jeff Mitchell
46514e01fa
Implement locking in the transit backend.
...
This ensures that we can safely rotate and modify configuration
parameters with multiple requests in flight.
As a side effect we also get a cache, which should provide a nice
speedup since we don't need to decrypt/deserialize constantly, which
would happen even with the physical LRU.
2016-01-27 17:03:21 -05:00
Jeff Mitchell
e6b2d45c03
Move archive location; also detect first load of a policy after archive
...
is added and cause the keys to be copied to the archive.
2016-01-27 13:41:37 -05:00
Jeff Mitchell
625e8091a5
Address review feedback
2016-01-27 13:41:37 -05:00
Jeff Mitchell
463cdd3d32
Store all keys in archive always
2016-01-27 13:41:37 -05:00
Jeff Mitchell
e729ace3f1
Add unit tests
2016-01-27 13:41:37 -05:00
Jeff Mitchell
8d5a0dbcdc
Force min decrypt version to 1 if it's zero, which allows fixing problematic archiving logic
2016-01-27 13:41:37 -05:00
Jeff Mitchell
9f2310c15c
Fix logic bug when restoring keys
2016-01-27 13:41:37 -05:00
Jeff Mitchell
ea9fb68a34
Fix decrementing instead of incrementing
2016-01-27 13:41:37 -05:00
Jeff Mitchell
ebe319c96b
Initial transit key archiving work
2016-01-27 13:41:37 -05:00
Jeff Mitchell
aa65b3a21c
Add a max_idle_connections parameter.
2016-01-25 14:47:07 -05:00
Jeff Mitchell
cf95982d80
Allow backends to see taint status.
...
This can be seen via System(). In the PKI backend, if the CA is
reconfigured but not fully (e.g. an intermediate CSR is generated but no
corresponding cert set) and there are already leases (issued certs), the
CRL is unable to be built. As a result revocation fails. But in this
case we don't actually need revocation to be successful since the CRL is
useless after unmounting. By checking taint status we know if we can
simply fast-path out of revocation with a success in this case.
Fixes #946
2016-01-22 17:01:22 -05:00
Dmitriy Gromov
df65547eca
STS now uses root vault user for keys
...
The secretAccessKeysRevoke revoke function now asserts that it is
not dealing with STS keys by checking a new internal data flag. Defaults
to IAM when the flag is not found.
Factored out genUsername into its own function to share between STS and
IAM secret creation functions.
Fixed bad call to "WriteOperation" instead of "UpdateOperation" in
aws/backend_test
2016-01-21 15:04:16 -05:00
Dmitriy Gromov
ea1e29fa33
Renamed sts duration to ttl and added STS permissions note.
2016-01-21 14:28:34 -05:00
Dmitriy Gromov
b37a963841
Removing debug print statement from sts code
2016-01-21 14:05:10 -05:00
Dmitriy Gromov
6f50cd9439
Fixed duration type and added acceptance test for sts
2016-01-21 14:05:10 -05:00
Dmitriy Gromov
522e8a3450
Configurable sts duration
2016-01-21 14:05:09 -05:00
Jack DeLoach
d206599b80
Add STS path to AWS backend.
...
The new STS path allows for obtaining the same credentials that you would get
from the AWS "creds" path, except it will also provide a security token, and
will not have an annoyingly long propagation time before returning to the user.
2016-01-21 14:05:09 -05:00
Jeff Mitchell
4fc58e8b41
Merge pull request #895 from nickithewatt/aws-prexisting-policies
...
Allow use of pre-existing policies for AWS users
2016-01-21 13:23:37 -05:00
Chi Vinh Le
555834f83d
Cleanly close SSH connections
2016-01-19 07:59:08 +01:00
Jeff Mitchell
21f91f73bb
Update deps, and adjust usage of go-uuid to match new return values
2016-01-13 13:40:08 -05:00
Jeff Mitchell
45e32756ea
WriteOperation -> UpdateOperation
2016-01-08 13:03:03 -05:00
Marcin Wielgoszewski
48660ddba5
Address issues with properly revoking a user via these additional REVOKE statements
2016-01-06 09:22:55 -05:00
Nicki Watt
79fb12c977
Updated AWS policy help messages
2015-12-30 19:41:07 +00:00
Nicki Watt
375a57b975
Allow use of pre-existing policies for AWS users
2015-12-30 18:05:54 +00:00
Jeff Mitchell
29f04250ff
Built on GH-890 to add other types
2015-12-29 13:07:24 -05:00
Issac Goldstand
6149e1256e
fix CA compatibility with OpenSSL
2015-12-29 18:52:43 +02:00
Jeff Mitchell
a0308e6858
Migrate 'uuid' to 'go-uuid' to better fit HC naming convention
2015-12-16 12:56:20 -05:00
Jeff Mitchell
555d621a2f
Update key usage logic
...
* Move to one place for both code paths
* Assign ExtKeyUsageAny to CA certs to help with validation with the
Windows Crypto API and Go's validation logic
Fixes #846
2015-12-14 14:23:51 -05:00
Jeff Mitchell
1c8cf4101a
Merge branch 'master' into pki-csrs
2015-12-01 00:09:23 -05:00
Jeff Mitchell
5a5d4212af
Fix AWS tests
2015-12-01 00:05:04 -05:00
Jeff Mitchell
bd03d3c422
Change allowed_base_domain to allowed_domains and allow_base_domain to
...
allow_bare_domains, for comma-separated multi-domain support.
2015-11-30 23:49:11 -05:00
Jeff Mitchell
703a0d65c0
Remove token display names from input options as there isn't a viable
...
use-case for it at the moment
2015-11-30 18:07:42 -05:00
Jeff Mitchell
6342699da3
Greatly simplify and fix the name validation function, as well as fully
...
comment it.
2015-11-23 14:15:32 -05:00
Jeff Mitchell
7eed5db86f
Update documentation, some comments, make code cleaner, and make generated roots be revoked when their TTL is up
2015-11-19 17:14:22 -05:00
Jeff Mitchell
4f2f7a0e3b
Mostly revert changes to certutil as the embedded struct stuff was being
...
problematic.
2015-11-19 14:18:39 -05:00
Jeff Mitchell
061539434f
Update validator function for URIs. Change example of entering a CA to a
...
root cert generation. Other minor documentation updates. Fix private key
output in issue/sign.
2015-11-19 11:35:17 -05:00
Jeff Mitchell
fcbdb5f30a
fix tests
2015-11-19 10:13:28 -05:00
Jeff Mitchell
3437af0711
Split root and intermediate functionality into their own sections in the API. Update documentation. Add sign-verbatim endpoint.
2015-11-19 09:51:18 -05:00
Jeff Mitchell
cb5514f3f3
Move public key comparison logic to its own function
2015-11-19 09:51:18 -05:00
Jeff Mitchell
b5423493ca
Move serial number generation and key validation into certutil; centralize format and key verification
2015-11-19 09:51:18 -05:00
Jeff Mitchell
da34e7c4e7
Add URL validation
2015-11-19 09:51:18 -05:00
Jeff Mitchell
129235ba2e
Fix zero path length handling, and move common field defs elsewhere
2015-11-19 09:51:18 -05:00
Jeff Mitchell
636fad0180
Fix logic around zero path length -- only restrict issuing intermediate CAs in this case
2015-11-19 09:51:18 -05:00
Jeff Mitchell
237285e822
Address some feedback from review
2015-11-19 09:51:18 -05:00
Jeff Mitchell
cf148d8cc6
Large documentation updates, remove the pathlength path in favor of
...
making that a parameter at CA generation/sign time, and allow more
fields to be configured at CSR generation time.
2015-11-19 09:51:18 -05:00
Jeff Mitchell
29d1f5030e
Add path length paths and unit tests to verify same.
2015-11-19 09:51:18 -05:00
Jeff Mitchell
7f12ac0026
Add URLs methods to set OCSP/CRL/CA urls in issued certs, and tests.
2015-11-19 09:51:18 -05:00
Jeff Mitchell
4de2060a96
Add tests for using raw CSR values
2015-11-19 09:51:18 -05:00