Commit Graph

99 Commits

Author SHA1 Message Date
ncabatoff
0f1569b7f5
Merge multiple functions for creating consul containers into one. (#6612)
Merge both functions for creating mongodb containers into one.
Add retries to docker container cleanups.
Require $VAULT_ACC be set to enable AWS tests.
2019-04-22 12:26:10 -04:00
Jeff Mitchell
8054cc660f Update to api 1.0.1 and sdk 0.1.8 2019-04-15 14:10:07 -04:00
Jeff Mitchell
278bdd1f4e
Switch to go modules (#6585)
* Switch to go modules

* Make fmt
2019-04-13 03:44:06 -04:00
Jeff Mitchell
aa67ad63dd Fix more tests 2019-04-12 22:14:50 -04:00
Jeff Mitchell
f95571a361 Move ldaputil and tlsutil over to sdk 2019-04-12 18:26:54 -04:00
Jeff Mitchell
170521481d
Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
T.K
4bcf0ec963 changed misspelled english words (#6432) 2019-03-19 09:32:45 -04:00
Jeff Mitchell
449c68bd63 Fmt 2019-03-18 09:28:20 -04:00
Andrej van der Zee
8e6c0ac473 Cassandra plugin: Support for datacenter aware deployments (#6127)
* Added option 'local_datacenter' to Casssandra database plugin for DC aware Casssandra deployments.

* Fixed spelling errors in Cassandra database plugin.

* Added website documentation.

* Added local_datacenter to Cassanra database plugin.

* Reverted datacenter-aware change in deprecated Cassandra builtin secret engine.
2019-03-14 13:37:28 -07:00
Becca Petrin
b62e307876 add readme on mssql testing (#6199) 2019-02-13 09:28:28 -05:00
Andrej van der Zee
d41c72664f Added socket keep alive option to Cassandra plugin. (#6201) 2019-02-10 18:34:50 -05:00
Becca Petrin
06fffd7b27
Use null strings in MSSQL to prevent errs (#6099) 2019-02-08 10:04:54 -08:00
Becca Petrin
06864a5c06 dont automatically accept mssql eula (#6169) 2019-02-05 14:11:06 -08:00
ncabatoff
78edbf6d1f
Do the rotate-root query without prepared statements, as we do for create/revoke user. Fixes #6116. (#6119) 2019-02-05 16:02:48 -05:00
Becca Petrin
077aa1bf80
Don't run MSSQL revocations as a transaction (#6154) 2019-02-04 09:02:56 -08:00
Matthias Bartelmeß
4894e3b928 Typo in mongodb engine (#6125) 2019-01-29 11:44:45 -08:00
Becca Petrin
4537210236 Convert MSSQL tests to Docker (#6095)
* create working mssql docker container

* update tests
2019-01-24 07:24:31 -05:00
Brian Kassouf
d8e19be7b5
remove extra comment 2019-01-08 17:28:07 -08:00
Giacomo Tirabassi
726aa02038 Influxdb secret engine built-in plugin (#5924)
* intial work for influxdb secret plugin

* fixed typo

* added comment

* added documentation

* added tests

* fixed tests

* added vendoring

* minor testing issue with hardcoded values

* minor fixes
2019-01-08 17:26:16 -08:00
Jim Kalafut
a54603039d 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
Jim Kalafut
70408512ac
Simplify base62.Random (#5982)
Also move existing base62 encode/decode operations to their only points
of use.
2018-12-20 07:40:01 -08:00
Jeff Mitchell
48b057b6de Merge branch 'master-oss' into 1.0-beta-oss 2018-10-19 17:47:58 -04:00
Chris Hoffman
646fe183bf
Only run cassandra test with VAULT_ACC set 2018-10-19 11:35:21 -04:00
Jeff Mitchell
a58d313d2b
Batch tokens (#755) 2018-10-15 12:56:24 -04:00
Didi Kohen
7ef861b553 Allow usage of non-superusers for cassandra connection (#5493) 2018-10-15 11:06:03 -04:00
Konstantinos Tsanaktsidis
cf46961f75 Fix a panic in MongoDB backend with concurrent create/revoke (#5463)
When Vault is concurrently creating and revoking leases for MongoDB
users as part of the database secrets engine, and then loses connection
to MongoDB, it can panic. This occurrs because the RevokeUser path does
_not_ lock the mutex, but the CreateUser path does. Both threads of
execution can concurently decide to call c.session.Close() in
mongodb/connection_producer.go:119, and then mgo panics when the second
close attempt occurs.
2018-10-04 09:51:08 -04:00
Martin
f50f9cb278 only run cassandra RotateRootCred test when in Travis (#5420) 2018-09-27 10:43:33 -05:00
Jim Kalafut
181cacdd3d Make base62.Random truncation optional (#5100) 2018-08-14 12:38:25 -04:00
Jim Kalafut
fc3281e880
Consolidate base62 functions (#5099) 2018-08-14 08:44:30 -07:00
Calvin Leung Huang
ece7569aca Clean up container on connection failure, switch to ory/dockertest on package postgresql (#5050) 2018-08-07 09:56:33 -07:00
Jeff Mitchell
8580cd3292 Two-pronged fix for renew policy checking (#4960)
1) In backends, ensure they are now using TokenPolicies
2) Don't reassign auth.Policies until after expmgr registration as we
don't need them at that point

Fixes #4829
2018-07-24 12:03:11 -07:00
Jeff Mitchell
dba48d5265
Re-add dockertest and fix up imports and update script (#4909) 2018-07-11 17:49:13 -04:00
Chris Hoffman
2d132a1add
Fix MSSQL Root Rotation Statement (#4748)
* fixing default rotate statement for MSSQL

* only run with ACC
2018-06-12 12:11:48 -04:00
Jeff Mitchell
891ce7a975 Update go-retryablehttp vendor 2018-05-09 17:44:53 -04:00
Jim Kalafut
d831e5207f
Simplify password generator using base62 encoder (#4514) 2018-05-04 14:22:53 -07:00
Calvin Leung Huang
6fc57a91d8
Purge opened connections on retries during tests (#4452) 2018-04-26 11:28:58 -04:00
Calvin Leung Huang
964645d45e Explicitly use 5.7 and below to test mysql backends (#4429) 2018-04-23 13:03:02 -04:00
Becca Petrin
f23b14a8c2
Release database resources on each iteration of a loop (#4305) 2018-04-17 16:31:09 -07:00
Jeff Mitchell
5e35356f9f
Remove UTC call from SQL creds helper (#4336)
Unix() by definition is always number of seconds since Unix epoch UTC.
2018-04-11 10:33:40 -04:00
Jeff Mitchell
f4879cbe88 Fix some tests 2018-04-10 00:22:23 -04:00
Jeff Mitchell
c3b47f990b Fix tests from version update 2018-04-09 16:14:44 -04:00
Chris Hoffman
aac9ee83f4
Fix deadlock in root credential rotation (#4309)
* fix deadlock in root credential rotation

* add more logging of errors

* adding cassandra test
2018-04-08 13:34:59 -04:00
Chris Hoffman
44aa151b78
Database Root Credential Rotation (#3976)
* redoing connection handling

* a little more cleanup

* empty implementation of rotation

* updating rotate signature

* signature update

* updating interfaces again :(

* changing back to interface

* adding templated url support and rotation for postgres

* adding correct username

* return updates

* updating statements to be a list

* adding error sanitizing middleware

* fixing log sanitizier

* adding postgres rotate test

* removing conf from rotate

* adding rotate command

* adding mysql rotate

* finishing up the endpoint in the db backend for rotate

* no more structs, just store raw config

* fixing tests

* adding db instance lock

* adding support for statement list in cassandra

* wip redoing interface to support BC

* adding falllback for Initialize implementation

* adding backwards compat for statements

* fix tests

* fix more tests

* fixing up tests, switching to new fields in statements

* fixing more tests

* adding mssql and mysql

* wrapping all the things in middleware, implementing templating for mongodb

* wrapping all db servers with error santizer

* fixing test

* store the name with the db instance

* adding rotate to cassandra

* adding compatibility translation to both server and plugin

* reordering a few things

* store the name with the db instance

* reordering

* adding a few more tests

* switch secret values from slice to map

* addressing some feedback

* reinstate execute plugin after resetting connection

* set database connection to closed

* switching secret values func to map[string]interface for potential future uses

* addressing feedback
2018-03-21 15:05:56 -04:00
Josh Soref
e43b76ef97 Spelling (#4119) 2018-03-20 14:54:10 -04:00
Calvin Leung Huang
dc186b63cc
CreateUser deadlock fix (#3761)
* Unlock the lock on CreateUser for Close call

* Let getConnection handle session reset, return c.session on Connection
2018-01-08 12:42:05 -05:00
Jeff Mitchell
8c4f369e50 Revert grabbing lock in database Connection funcs 2017-12-19 12:53:21 -05:00
Jeff Mitchell
7ef59df0b2 Add lock to sql connection as well 2017-12-19 10:38:26 -05:00
Jeff Mitchell
28e8fd1ca7 Add lock and close check on cassandra as well 2017-12-19 10:26:46 -05:00
Jeff Mitchell
3ba108f51e Ping the mongo session when the connection is retrieved.
This was in the deprecated backend where it fixed a similar issue a long
time ago but for some reason didn't make it over. Additionally the
function wasn't being locked properly.

Hopefully fixes #2973
2017-12-19 10:11:04 -05:00
Brian Kassouf
1eec51abff
plugins/database: use context with plugins that use database/sql package (#3691) 2017-12-15 10:26:17 -08:00