Lars Lehtonen
d8f7dd364a
builtin: deprecate errwrap.Wrapf() throughout ( #11430 )
...
* audit: deprecate errwrap.Wrapf()
* builtin/audit/file: deprecate errwrap.Wrapf()
* builtin/crediential/app-id: deprecate errwrap.Wrapf()
* builtin/credential/approle: deprecate errwrap.Wrapf()
* builtin/credential/aws: deprecate errwrap.Wrapf()
* builtin/credentials/token: deprecate errwrap.Wrapf()
* builtin/credential/github: deprecate errwrap.Wrapf()
* builtin/credential/cert: deprecate errwrap.Wrapf()
* builtin/logical/transit: deprecate errwrap.Wrapf()
* builtin/logical/totp: deprecate errwrap.Wrapf()
* builtin/logical/ssh: deprecate errwrap.Wrapf()
* builtin/logical/rabbitmq: deprecate errwrap.Wrapf()
* builtin/logical/postgresql: deprecate errwrap.Wrapf()
* builtin/logical/pki: deprecate errwrap.Wrapf()
* builtin/logical/nomad: deprecate errwrap.Wrapf()
* builtin/logical/mssql: deprecate errwrap.Wrapf()
* builtin/logical/database: deprecate errwrap.Wrapf()
* builtin/logical/consul: deprecate errwrap.Wrapf()
* builtin/logical/cassandra: deprecate errwrap.Wrapf()
* builtin/logical/aws: deprecate errwrap.Wrapf()
2021-04-22 11:20:59 -04:00
Calvin Leung Huang
a8cafab083
pki: fix tidy removal on revoked entries ( #11367 )
...
* pki: fix tidy removal on revoked entries
* add CL entry
2021-04-19 09:40:40 -07:00
Brian Kassouf
303c2aee7c
Run a more strict formatter over the code ( #11312 )
...
* Update tooling
* Run gofumpt
* go mod vendor
2021-04-08 09:43:39 -07:00
Scott Miller
7ecbbcd5b9
Make all duplicate removals stable in PKI ( #11259 )
2021-04-02 10:33:24 -05:00
Liwei Fu
170a0800e6
Make cert domain name validation case insensitive ( #10959 )
...
* make cert domain name validation case insensitive
* reafctor TestPki_PermitFQDNs mutliple cases
* TestPki_PermitFQDNS: fail uppercase alt_name
* add change log
* fix tests
* use EqualFold for potential utf-8 string comparison
Co-authored-by: Freyert <Freyert@users.noreply.github.com>
2021-03-09 21:28:27 -08:00
Brian Kassouf
10668331e4
Update go version to 1.15.3 ( #10279 )
...
* Update go version to 1.15.3
* Fix OU ordering for go1.15.x testing
* Fix CI version
* Update docker image
* Fix test
* packagespec upgrade -version 0.1.8
Co-authored-by: Sam Salisbury <samsalisbury@gmail.com>
2020-10-30 16:44:06 -04:00
ncabatoff
27c7a77624
When expiration attempts to revoke a cert that's not in storage (perhaps due to pki tidy), don't treat that as an error. Let the lease get expired. ( #9880 )
2020-09-17 16:15:03 -04:00
ncabatoff
b615da43d7
Run CI tests in docker instead of a machine. ( #8948 )
2020-09-15 10:01:26 -04:00
Artem Alexandrov
301ea4c0f0
pki: Allow to use not only one variable during templating in allowed_domains #8509 ( #9498 )
2020-08-17 11:37:00 -07:00
Calvin Leung Huang
fbe2a86693
pki: use revocationInfo.RevocationTimeUTC when revoking certs with ti… ( #9609 )
...
* pki: use revocationInfo.RevocationTimeUTC when revoking certs with tidy_revoked_certs set to true
* update comment
* tidy: use same time snapshot for OR comparison
2020-07-30 15:10:26 -07:00
Andrej van der Zee
8f305b1531
Add option allowed_domains_template enabling identity templating for issuing PKI certs. ( #8509 )
2020-07-08 12:52:25 -04:00
Peter J. Li
27cf73afa8
fix error message for when an invalid uri_sans is provided via the api ( #8772 )
2020-06-08 13:43:56 -04:00
Andrew N Golovkov
753b2c135a
More helpful errors when import bundled certificates ( #8951 )
...
* helpful errors: print not only CN but also exactly what we are comparing
* helpful errors: return different errors for non-existent and unknown keys
* helpful errors: print error about encrypted key instead of "private key not found"
2020-05-11 17:01:10 -06:00
Lars Lehtonen
85301166fe
builtin/logical/pki: fix JSON tag ( #8324 )
2020-03-06 18:41:26 -08:00
Denis Subbotin
a9e605cc43
fix minor potential nil-pointer panic on line 89 ( #8488 )
2020-03-06 13:32:36 -08:00
Daniel Spangenberg
415303cc02
Allow FQDNs in DNS Name for PKI Secrets Engine ( #8288 )
...
Fixes #4837
2020-02-04 23:46:38 +01:00
Becca Petrin
c2894b8d05
Add Kerberos auth agent ( #7999 )
...
* add kerberos auth agent
* strip old comment
* changes from feedback
* strip appengine indirect dependency
2020-01-09 14:56:34 -08:00
ncabatoff
fde5e55ce9
Handle otherName SANs in CSRs ( #6163 )
...
If a CSR contains a SAN of type otherName, encoded in UTF-8, and the signing role specifies use_csr_sans, the otherName SAN will be included in the signed cert's SAN extension.
Allow single star in allowed_other_sans to match any OtherName. Update documentation to clarify globbing behaviour.
2019-12-11 10:16:44 -05:00
Chris Hoffman
ea0974b578
if storing the certificate, always generate/sign the certificate on the primary ( #7904 )
2019-12-05 13:50:28 -05:00
Denis Subbotin
e9cdd451d1
Don't allow duplicate SAN names in PKI-issued certs ( #7605 )
...
* fix https://github.com/hashicorp/vault/issues/6571
* fix test TestBackend_OID_SANs because now SANs are alphabetic sorted
2019-10-28 12:31:56 -04:00
Jeff Mitchell
4b5572bf35
Don't continue in a few places in pki tidy if value is nil ( #7589 )
...
Fixes #7588
2019-10-15 09:55:08 -04:00
Jeff Mitchell
3c03f8d7e0
Don't try to revoke certs from PKI on perf standby ( #7173 )
...
It needs to do a write for the CRL and to move to the revoked prefix
2019-07-23 08:40:08 -04:00
Jeff Mitchell
7b8c0b58f1
Call goimports as well as gofmt when doing a make fmt
( #7148 )
...
Closes #7147
2019-07-18 21:04:56 -04:00
Madalyn
a2606ddccf
update OpenAPI output to use DisplayAttributes struct ( #6928 )
2019-06-21 11:08:08 -04:00
Nick Cabatoff
7380c2fd9d
Fix a test bug I introduced in 1d13290b361314466f76e251826f60c92aa67bb7 by failing to update my PR to the latest master before merging.
2019-05-09 11:59:22 -04:00
ncabatoff
c48936c4fd
Refactor cert util ( #6676 )
...
Break dataBundle into two pieces: inputBundle, which contains data that
is specific to the pki backend, and creationBundle, which is a more
generic bundle of validated inputs given to certificate creation/signing routines.
Move functions that only take creationBundle to certutil and make them public.
2019-05-09 11:43:11 -04:00
Mark Gritter
4cab0047a1
Fix test to use stable order to generate expected result. ( #6692 )
2019-05-07 14:01:49 -05:00
mgritter
2d3d6a856b
gofmt fixes.
2019-05-02 16:29:41 -07:00
Jim Kalafut
2835131117
Apply suggestions from code review
...
Co-Authored-By: mgritter <mgritter@gmail.com>
2019-05-02 18:02:15 -05:00
mgritter
4e22fb6704
Ensure OU entries are not reordered.
2019-05-02 14:31:29 -07:00
Jeff Mitchell
213b9fd1cf
Update to api 1.0.1 and sdk 0.1.8
2019-04-15 14:10:07 -04:00
Jeff Mitchell
9ebc57581d
Switch to go modules ( #6585 )
...
* Switch to go modules
* Make fmt
2019-04-13 03:44:06 -04:00
Jeff Mitchell
28e2ce8577
Fix build breakages
2019-04-12 22:01:13 -04:00
Jeff Mitchell
8bcb533a1b
Create sdk/ and api/ submodules ( #6583 )
2019-04-12 17:54:35 -04:00
Matt Greenfield
080d4652f0
Fix uri_sans param being ignored when use_csr_values=false ( #6505 )
2019-04-01 16:08:22 -04:00
T.K
453f1ac109
changed misspelled english words ( #6432 )
2019-03-19 09:32:45 -04:00
madalynrose
625f0c7546
Update OpenAPI responses to include information the UI can use ( #6204 )
2019-02-14 12:42:44 -05:00
ncabatoff
3e3498073e
Fix #5973 on windows by disregarding errors when querying legacy cert path. ( #6013 )
2019-01-08 18:08:21 -08:00
Jim Kalafut
d0e2badbae
Run goimports across the repository ( #6010 )
...
The result will still pass gofmtcheck and won't trigger additional
changes if someone isn't using goimports, but it will avoid the
piecemeal imports changes we've been seeing.
2019-01-08 16:48:57 -08:00
Lukasz Jagiello
76008b2e1e
Remove an empty line for /pki/ca_chain ( #5779 )
...
This PR fix #5778 .
Easy test case to reproduce the problem:
https://play.golang.org/p/CAMdrOHT7C1
Since `certStr` is empty string during first iteration `strings.Join()`
will merge empty line with first CA cert.
Extra `strings.TrimSpace` call will remove that empty line, before
certificate will be return.
2018-12-12 15:38:35 -05:00
Jeff Mitchell
c178d05e07
Properly continue if cert entry is nil when tidying ( #5933 )
...
Fixes #5931
2018-12-11 11:28:14 -05:00
Calvin Leung Huang
e6ec67fb8f
Use inclusive range on cert role diff comparison ( #5737 )
2018-11-08 12:15:12 -08:00
Jeff Mitchell
fa26beeaed
fmt
2018-11-07 16:52:01 -05:00
Becca Petrin
7bd22e6779
Run all builtins as plugins ( #5536 )
2018-11-06 17:21:24 -08:00
Calvin Leung Huang
20faa90ee3
Use Truncate instead of Round on duration diff ( #5691 )
2018-11-05 17:32:33 -05:00
Calvin Leung Huang
1a4e8fe53d
Round time diff to nearest second to reduce flakiness ( #5688 )
2018-11-05 16:49:25 -05:00
Jeff Mitchell
6c488921ff
Fix website/path-help docs around pki/tidy
2018-10-30 21:33:30 -04:00
Balazs Nagy
ca5c60642e
Use tidy_revoked_certs instead of tidy_revocation_list ( #5608 )
2018-10-29 19:29:35 -04:00
Jeff Mitchell
5e2cc31cb6
Remove now-spurious ttl check and logic from sign-verbatim. ( #5552 )
...
This endpoint eventually goes through generateCreationBundle where we
already have the right checks.
Also add expiration to returned value to match output when using root
generation.
Fixes #5549
2018-10-19 11:13:59 -04:00
Jeff Mitchell
4217ced72d
Re-add default NotBefore duration in PKI ( #5482 )
...
Fixes #5481
2018-10-10 09:42:37 -04:00