Jeff Mitchell
8acbdefdf2
More porting from rep ( #2388 )
...
* More porting from rep
* Address review feedback
2017-02-16 16:29:30 -05:00
Jeff Mitchell
3789e8c427
Add cleanup functions to multiple DB backends. ( #2313 )
...
Ensure it's called on unmount, not just for seal.
2017-02-01 14:05:25 -05:00
Jeff Mitchell
454ddd4c48
Use dockertest.v2 ( #2247 )
...
New dockertest has a totally different API and will require some serious
refactoring. This will tide over until then by pinning the API version.
2017-01-09 13:46:54 -05:00
Jeff Mitchell
37df43d534
Postgres revocation sql, beta mode ( #1972 )
2016-10-05 13:52:59 -04:00
vishalnayak
e90acaeb6c
Refactor mysql's revoke SQL
2016-10-04 19:30:25 -04:00
Jim Weber
6b9b646e8a
removed an unused ok variable. Added warning and force use for default queries if role is nil
2016-10-04 17:15:29 -04:00
Jim Weber
1ec0a2d403
fixed an incorrect assignment
2016-10-03 21:51:40 -04:00
Jim Weber
1b591fb6d5
More resilient around cases of missing role names and using the default when needed.
2016-10-03 20:20:00 -04:00
Jim Weber
67d991f4ab
Refactored logic some to make sure we can always fall back to default revoke statments
...
Changed rolename to role
made default sql revoke statments a const
2016-10-03 15:59:56 -04:00
Jim Weber
179c07075a
fixed some more issues I had with the tests.
2016-10-03 15:58:09 -04:00
Jim Weber
aa5bb3b354
renamed rolname to role
2016-10-03 15:57:47 -04:00
Jim Weber
003d0df191
Reduced duplicated code and fixed comments and simple variable name mistakes
2016-10-03 14:53:05 -04:00
Jim Weber
10855b070f
Added test for revoking mysql user with wild card host and non-wildcard host
2016-10-02 22:28:54 -04:00
Jim Weber
47465e782c
saving role name to the Secret Internal data. Default revoke query added
...
The rolename is now saved to the secret internal data for fetching
later during the user revocation process. No longer deriving the role
name from request path
Added support for default revoke SQL statements that will provide the
same functionality as before. If not revoke SQL statements are provided
the default statements are used.
Cleaned up personal ignores from the .gitignore file
2016-10-02 18:53:16 -04:00
Jim Weber
eebd592f78
Getting role name from the creds path used in revocation
2016-09-23 16:57:08 -04:00
Jim Weber
f56f0b174c
secretCredsRevoke command no longer uses hardcoded query
...
The removal of a user from the db is now handled similar to the
creation. The SQL is read out of a key from the role and then executed
with values substituted for username.
2016-09-23 16:05:49 -04:00
Jim Weber
235d67e451
Added support for a revokeSQL key value pair to the role
2016-09-23 16:00:23 -04:00
Jeff Mitchell
357ecb4dfe
gofmt
2016-08-19 16:48:32 -04:00
Jeff Mitchell
7d1f0facb8
Add arbitrary string slice parsing.
...
Like the KV function, this supports either separated strings or JSON
strings, base64-encoded or not.
Fixes #1619 in theory.
2016-08-03 14:24:16 -04:00
Laura Bennett
c6cc73b3bd
Merge pull request #1635 from hashicorp/mysql-idle-conns
...
Added maximum idle connections to mysql to close hashicorp/vault#1616
2016-07-20 15:31:37 -04:00
Jeff Mitchell
6708b5d75f
Set defaults to handle upgrade cases.
...
Ping #1604
2016-07-20 14:07:19 -04:00
Jeff Mitchell
a8a2886538
Merge pull request #1604 from memory/mysql-displayname-2
...
concat role name and token displayname to form mysql username
2016-07-20 14:02:17 -04:00
Nathan J. Mehl
e824f6040b
use both role name and token display name to form mysql username
2016-07-20 10:17:00 -07:00
Laura Bennett
f5ed650966
whitespace error corrected
2016-07-20 12:00:05 -04:00
Nathan J. Mehl
83635c16b6
respond to feedback from @vishalnayak
...
- split out usernameLength and displaynameLength truncation values,
as they are different things
- fetch username and displayname lengths from the role, not from
the request parameters
- add appropriate defaults for username and displayname lengths
2016-07-20 06:36:51 -07:00
Laura Bennett
badaabc17d
max_idle_connections added
2016-07-20 09:26:26 -04:00
Laura Bennett
b99c692f0d
initial commit before rebase to stay current with master
2016-07-19 14:18:37 -04:00
vishalnayak
ca22b6cfdb
Remove unused VerifyConnection from storage entries of SQL backends
2016-07-19 11:55:49 -04:00
Nathan J. Mehl
417cf49bb7
allow overriding the default truncation length for mysql usernames
...
see https://github.com/hashicorp/vault/issues/1605
2016-07-12 17:05:43 -07:00
Nathan J. Mehl
0648160276
use role name rather than token displayname in generated mysql usernames
...
If a single token generates multiple myself roles, the generated mysql
username was previously prepended with the displayname of the vault
user; this makes the output of `show processlist` in mysql potentially
difficult to correlate with the roles actually in use without cross-
checking against the vault audit log.
See https://github.com/hashicorp/vault/pull/1603 for further discussion.
2016-07-10 15:57:47 -07:00
Jeff Mitchell
ef98d56fba
Have SQL backends Ping() before access.
...
If unsuccessful, reestablish connections as needed.
2016-07-01 12:02:17 -04:00
Jeff Mitchell
1ba78db242
Convert MySQL tests to Dockerized versions
2016-07-01 11:36:28 -04:00
Jeff Mitchell
d9fa64a07c
Add stmt close calls
2016-06-29 17:39:47 -04:00
Jeff Mitchell
fb9a4a15c5
Run prepare on the transaction, not the db
2016-06-29 17:20:41 -04:00
Vishal Nayak
3291ce6551
Merge pull request #1515 from hashicorp/sql-config-reading
...
Allow reading of config in sql backends
2016-06-21 10:07:34 -04:00
vishalnayak
ff90768684
Added warnings when configuring connection info in sql backends
2016-06-21 09:58:57 -04:00
vishalnayak
799bb9c286
Address review feedback
2016-06-17 10:11:39 -04:00
vishalnayak
adbfef8561
Allow reading of config in sql backends
2016-06-11 11:48:40 -04:00
vishalnayak
cfe0aa860e
Backend() functions should return 'backend' objects.
...
If they return pointers to 'framework.Backend' objects, the receiver functions can't be tested.
2016-06-10 15:53:02 -04:00
Jeff Mitchell
74a1e3bd61
Remove most Root paths
2016-05-31 23:42:54 +00:00
vishalnayak
ac5ceae0bd
Added AcceptanceTest boolean to logical.TestCase
2016-04-05 15:10:44 -04:00
vishalnayak
046d7f87b4
postgres: connection_url fix
2016-02-22 11:22:49 -05:00
Jeff Mitchell
9b57078b26
Some minor changes in mysql commenting and names
2016-02-19 16:44:52 -05:00
vishalnayak
b4cd7d019e
mysql: fix error message
2016-02-19 16:07:06 -05:00
vishalnayak
20342d9049
Don't deprecate value field yet
2016-02-19 16:07:06 -05:00
vishalnayak
d8f72887fc
Removed connectionString.ConnectionString
2016-02-19 16:07:05 -05:00
vishalnayak
5f19c77897
mysql: provide allow_verification option to disable connection_url check
2016-02-19 16:07:05 -05:00
Jeff Mitchell
2eb08d3bde
Make backends much more consistent:
...
1) Use the new LeaseExtend
2) Use default values controlled by mount tuning/system defaults instead
of a random hard coded value
3) Remove grace periods
2016-01-29 20:03:37 -05:00
Jeff Mitchell
abd71ce80e
Add list support for mysql roles
2016-01-28 15:04:25 -05: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