Commit Graph

37 Commits

Author SHA1 Message Date
Brian Kassouf
230ed81150
Fix some linting errors (#12860) 2021-10-18 17:29:47 -07:00
Rémi Lapeyre
f7ab7aa53e
Return 404 response when looking for a secret_id_accessor that does not exist (#12788)
* Return 404 response when looking for an secret_id_accessor that does not exist

Closes https://github.com/hashicorp/vault/issues/12660
2021-10-11 15:07:51 +01:00
Lars Lehtonen
adc55cc298
builtin/credential/approle: fix dropped test errors (#11990) 2021-07-05 11:00:12 -04:00
Marc Boudreau
2acf487f4a
Fix for Issue 11863 - Panic when creating/updating approle role with token_type (#11864)
* initializing resp variable with aa *logical.Response before using it to add warning for default-service or default-batch token type.  Also adding guard around code that sets resp to a new logical.Response further on in the function.

* adding changelog entry

* renaming changelog file to match PR number
2021-06-24 13:03:41 -04:00
Brian Kassouf
a24653cc5c
Run a more strict formatter over the code (#11312)
* Update tooling

* Run gofumpt

* go mod vendor
2021-04-08 09:43:39 -07:00
Calvin Leung Huang
298b9cde2f
approle: add ttl to the secret ID generation response (#10826)
* approle: add ttl to the secret ID generation response

* approle: move TTL derivation into helper func

* changelog: add changelog entry

* docs: update approle docs and api-docs pages
2021-02-03 16:32:16 -08:00
Calvin Leung Huang
5850e7bd36 sdk/logical: handle empty token type string values as TokenTypeDefault (#7273)
* sdk/logical: handle empty token type string values as TokenTypeDefault

* add test case for missing token_type value
2019-08-14 09:45:40 -04:00
ncabatoff
d771516dd3
Handle TokenType serialized as string or as uint8. (#7233) 2019-08-05 16:51:14 -04:00
Jeff Mitchell
121e3ce247
AppRole TokenUtil conversion (#7020) 2019-07-01 16:30:08 -04:00
Jeff Mitchell
7ae6fb56ff Move policyutil to sdk 2019-04-12 18:08:46 -04:00
Jeff Mitchell
170521481d
Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
Jeff Mitchell
a58d313d2b
Batch tokens (#755) 2018-10-15 12:56:24 -04:00
Becca Petrin
b3a711d717 Add bound cidrs to tokens in AppRole (#4680) 2018-06-19 22:57:11 -04:00
Vishal Nayak
818218637c approle: Fix role name case sensitivity issue 2018-06-05 18:53:27 -04:00
vishalnayak
a030db2af8 s/enable_local_secret_ids/local_secret_ids 2018-04-24 17:52:42 -04:00
vishalnayak
33256ab446 Add field read test 2018-04-24 15:48:07 -04:00
vishalnayak
42e95d4630 Add tests 2018-04-24 11:02:11 -04:00
vishalnayak
f39f4052a1 Add immutability test 2018-04-24 10:05:17 -04:00
vishalnayak
83aabbba05 Add enable_local_secret_ids to role read response 2018-04-24 09:53:36 -04:00
vishalnayak
184dac8cfc Upgrade secret ID prefix and fix tests 2018-04-23 16:31:51 -04:00
Vishal Nayak
1d8baa9b9c
approle: Use TypeCommaStringSlice for BoundCIDRList (#4078)
* Use TypeCommaStringSlice for Approle bound_cidr_list

* update docs

* Add comments in the test
2018-03-08 17:49:08 -05:00
Brian Kassouf
8142b42d95 Add context to storage backends and wire it through a lot of places (#3817) 2018-01-19 01:44:44 -05:00
Brian Kassouf
78adac0a24
Pass context to backends (#3750)
* Start work on passing context to backends

* More work on passing context

* Unindent logical system

* Unindent token store

* Unindent passthrough

* Unindent cubbyhole

* Fix tests

* use requestContext in rollback and expiration managers
2018-01-08 10:31:38 -08:00
Vishal Nayak
aef8a1893f Fix the casing problem in approle (#3665) 2017-12-11 16:41:17 -05:00
Vishal Nayak
017c0ec283
Avoid race conditions in AppRole (#3561)
* avoid race conditions in approle

* return a warning from role read if secondary index is missing

* Create a role ID index if a role is missing one

* Fix locking in approle read and add test

* address review feedback
2017-11-10 11:32:04 -05:00
Jeff Mitchell
2f6c2b88bb Sanitize policy behavior across backends (#3324)
Fixes #3323
Fixes #3318

* Fix tests

* Fix tests
2017-09-13 11:36:52 -04:00
Lars Lehtonen
730bb03c77 Fix swallowed errors in builtin (#2977) 2017-07-07 08:23:12 -04:00
Ben Gadbois
f80c851681 Fixing printf (and similar) issues (#2666) 2017-05-01 23:34:10 -04:00
Vishal Nayak
f4d74fe4cc AppRole: Support restricted use tokens (#2435)
* approle: added token_num_uses to the role

* approle: added RUD tests for token_num_uses on role

* approle: doc: added token_num_uses
2017-03-03 09:31:20 -05:00
Félix Cantournet
0d6d4211b8 all: test: Fix govet warnings
Fix calls to t.Fatal() with formatting.
Fixed some calls to Fatalf() with wrong formatting
2016-12-21 19:44:07 +01:00
vishalnayak
4caa09f6e6 Fix regression caused by not creating a role_id secondary index 2016-10-14 12:56:29 -04:00
vishalnayak
11614805e0 Make secret-id reading and deleting, a POST op instead of GET 2016-09-28 20:22:37 -04:00
vishalnayak
8ce3fa75ba Store the CIDR list in the secret ID storage entry.
Use the stored information to validate the source address and credential issue time.
Correct the logic used to verify BoundCIDRList on the role.
Reverify the subset requirements between secret ID and role during credential issue time.
2016-09-21 20:19:26 -04:00
vishalnayak
c93bded97b Added cidrutil helper 2016-09-21 13:58:32 -04:00
vishalnayak
166d67c0a8 Ensure at least one constraint on the role 2016-09-13 16:03:15 -04:00
vishalnayak
1a62fb64c2 Seperate endpoints for read/delete using secret-id and accessor 2016-08-21 14:42:49 -04:00
vishalnayak
59930fda8f AppRole authentication backend 2016-07-26 09:32:41 -04:00