Armon Dadgar
5c085d3718
server: sanity check value for 'tls_disable'
2015-11-25 11:37:57 -08: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
3dc9239b02
Cut version 0.4.0-rc1
2015-11-20 13:40:40 -05:00
Jeff Mitchell
cc4789639b
Update dist script for hc-releases
2015-11-20 13:39:05 -05:00
Jeff Mitchell
2da4fb3880
Bump version to 0.4.0-rc1
2015-11-20 13:18:29 -05:00
Jeff Mitchell
1194432d93
Add PKI enhancements to Changelog
2015-11-20 13:18:07 -05:00
Jeff Mitchell
6af9eac08b
Documentation update
2015-11-20 13:13:57 -05:00
Jeff Mitchell
76e5760696
Merge branch 'master' into pki-csrs
2015-11-20 12:48:38 -05:00
Jeff Mitchell
93f196fd75
Merge pull request #786 from hashicorp/issue-784
...
Reintroduce the ability to look up obfuscated values in the audit log
v0.4.0-rc1
2015-11-20 12:39:54 -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
Clint Shryock
cb43c4bf86
First draft at a contributing guide. Based off of Terraform's guide
2015-11-19 09:44:34 -06:00
Jeff Mitchell
fcbdb5f30a
fix tests
2015-11-19 10:13:28 -05:00
Jeff Mitchell
f644557eab
Make it clear that generating/setting a CA cert will overwrite what's
...
there.
2015-11-19 09:51:18 -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
ba37e4bcb5
Add unit tests for CSR bundle conversion
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
Jeff Mitchell
a763391615
Change a few checks on names:
...
- Allow an email address to be the common name of a cert even if email
protection isn't in the role if any name is set to true (this allows
certificates with a common name entry of an email address but used for
other purposes; here just for CA cert signing).
- Don't check the user part of an email against the hostname regex.
Emails can contain e.g. "+" and "_" and these should be allowed even
though they're not part of a valid hostname.
Also, fix a nil pointer issue.
2015-11-19 09:51:17 -05:00
Jeff Mitchell
f8deb998ed
Add config/urls CRUD operations to get and set the URLs encoded into
...
certificates for the issuing certificate URL, CRL distribution points,
and OCSP servers.
2015-11-19 09:51:17 -05:00
Jeff Mitchell
aae434576f
Change use_csr_subject to use_csr_values; copy not only the subject, but
...
also the alternate names and the extensions over as well.
2015-11-19 09:51:17 -05:00
Jeff Mitchell
e8f1e8eb98
Remove setting serial number in the pkix Subject
2015-11-19 09:51:17 -05:00
Jeff Mitchell
a093508ceb
Add a flag so that when signing CA certificates, the Subject (including names and extra names) can be used verbatim from the CSR
2015-11-19 09:51:17 -05:00
Jeff Mitchell
03e4ab785d
Add capability to use the CSR's common name (by default for CA CSRs if
...
no common_name parameter is given, role-controlled for non-CA CSRs).
Fix logic around the CA/CRL endpoints. Now settable when generating a
self-signed root or setting a CA cert into the backend; if not set,
these values are not set in issued certs. Not required when signing an
intermediate cert (and in fact it was wrong to do so in the first
place).
2015-11-19 09:51:17 -05:00
Jeff Mitchell
4e73187837
Add support for EC CA keys, output to base64-encoded DER instead of PEM, and tests for all of those. Also note that Go 1.5 is now required.
2015-11-19 09:51:17 -05:00
Jeff Mitchell
62e4b89ea7
Address some minor PR feedback
2015-11-19 09:51:17 -05:00
Jeff Mitchell
f46b5b90c7
Fix otto import of uuid
2015-11-19 09:51:17 -05:00
Jeff Mitchell
76f94fe49b
Cleanup, and add ability to sign CA CSRs that aren't destined for Vault
2015-11-19 09:51:17 -05:00
Jeff Mitchell
c33c43620f
Add tests for intermediate signing and CRL, and fix a couple things
...
Completes extra functionality.
2015-11-19 09:51:17 -05:00
Jeff Mitchell
e45af0a17b
Add unit tests to test signing logic, fix up test logic for names
2015-11-19 09:51:17 -05:00
Jeff Mitchell
10c2b9f76b
Handle email address alternative names, fix up tests, fix up logic around name verification
2015-11-19 09:51:17 -05:00
Jeff Mitchell
41799529f7
Add allow_base_domain to control whether or not the actual base domain is allowed as a cert common name and/or DNS SAN
2015-11-19 09:51:17 -05:00
Jeff Mitchell
4cf1508898
Add email protection flag plumbing and tests; don't call generate bundle when making an intermediate CSR since everything is now ignored
2015-11-19 09:51:17 -05:00
Jeff Mitchell
62049cd059
Add sign method (untested)
2015-11-19 09:51:17 -05:00
Jeff Mitchell
667d5cafd3
Don't show field names when not needed
2015-11-19 09:51:17 -05:00
Jeff Mitchell
55fc4ba898
Implement CA cert/CSR generation. CA certs can be self-signed or
...
generate an intermediate CSR, which can be signed.
2015-11-19 09:51:17 -05:00
Kevin Pike
8381a9a88d
add rabbit-hole dep
2015-11-18 21:45:05 -08:00
Kevin Pike
af4768cefc
rabbitmq secret backend
2015-11-18 21:21:52 -08:00
Jeff Mitchell
49d525ebf3
Reintroduce the ability to look up obfuscated values in the audit log
...
with a new endpoint '/sys/audit-hash', which returns the given input
string hashed with the given audit backend's hash function and salt
(currently, always HMAC-SHA256 and a backend-specific salt).
In the process of adding the HTTP handler, this also removes the custom
HTTP handlers for the other audit endpoints, which were simply
forwarding to the logical system backend. This means that the various
audit functions will now redirect correctly from a standby to master.
(Tests all pass.)
Fixes #784
2015-11-18 20:26:03 -05:00
Jeff Mitchell
7d03d63bfe
Update audit documentation around what hash is used
2015-11-18 10:42:42 -05:00
Jeff Mitchell
061691d188
Update deps
2015-11-18 10:36:57 -05:00