Armon Dadgar
553107a667
logical/framework: Panic if routing pattern is blank
2015-04-01 22:12:03 -07:00
Armon Dadgar
67bffd5f14
logical/framework: automatically anchor
2015-04-01 17:53:02 -07:00
Mitchell Hashimoto
fa9445fe1d
logical/framework: add PolicyMap
2015-04-01 15:46:37 -07:00
Mitchell Hashimoto
c948d9ac66
logical/testing: helper to test auth
2015-04-01 15:46:37 -07:00
Mitchell Hashimoto
235c10514c
logical: GoStringer for Auth
2015-04-01 15:46:37 -07:00
Mitchell Hashimoto
015ff4790f
logical/testing: support unauthenticated requests
2015-04-01 15:46:37 -07:00
Mitchell Hashimoto
10425cdb8a
logical/framework: PathMap can get missing things
2015-04-01 15:46:37 -07:00
Mitchell Hashimoto
9fff9ba0b3
logical: validation should allow 0 leases
2015-03-31 21:11:23 -07:00
Mitchell Hashimoto
4cbe26b726
misc typos
2015-03-31 17:27:04 -07:00
Mitchell Hashimoto
a74d398eb9
logical/testing: tokens for acceptance tests
2015-03-31 17:26:31 -07:00
Armon Dadgar
fef98675f1
logical/framework: Added missing case for TypeMap
2015-03-31 16:45:08 -07:00
Armon Dadgar
2ab45f5787
logical/framework: Adding TypeMap
2015-03-31 16:45:08 -07:00
Mitchell Hashimoto
00632c6a49
vault: keep the connection info around for auth
2015-03-30 20:55:01 -07:00
Mitchell Hashimoto
b8ad949b1d
vault: get rid of HangleLogin
2015-03-30 20:26:39 -07:00
Mitchell Hashimoto
6d5cd534ca
logical: add Redirect to response
2015-03-30 17:56:24 -07:00
Mitchell Hashimoto
77e35fd5f4
logical: move cred stuff over here
2015-03-30 17:46:18 -07:00
Mitchell Hashimoto
c67357342c
logical: add credential info to logical backend structures
2015-03-30 14:23:32 -07:00
Armon Dadgar
5cbecba333
logical: Special error for permission denied
2015-03-24 11:23:59 -07:00
Armon Dadgar
db2e1388fc
vault: Adding ClientToken
2015-03-24 11:09:25 -07:00
Mitchell Hashimoto
26583fb05f
logical/framework: auto-extend leases if requested
2015-03-21 16:20:30 +01:00
Mitchell Hashimoto
a04df95177
logical/testing: immediate rollback, ignore RollbackMinAge
2015-03-21 11:18:33 +01:00
Mitchell Hashimoto
c872e0f788
logical/framework: rollback should return error, easier API
2015-03-21 11:08:13 +01:00
Mitchell Hashimoto
c9e64725d7
logical/framework: rollback needs to have access to request for storage
2015-03-21 11:03:59 +01:00
Mitchell Hashimoto
3456d9276c
logical/aws
2015-03-20 19:03:20 +01:00
Mitchell Hashimoto
2ce92edd0f
logical/framework: can specify InternalData for secret
2015-03-20 17:59:48 +01:00
Mitchell Hashimoto
92e200f150
logical/testing: rollback/revoke secrets, error dangling secrets
2015-03-20 17:20:55 +01:00
Mitchell Hashimoto
e6ab3a3771
vault: clean up VaultID duplications, make secret responses clearer
...
/cc @armon - This is a reasonably major refactor that I think cleans up
a lot of the logic with secrets in responses. The reason for the
refactor is that while implementing Renew/Revoke in logical/framework I
found the existing API to be really awkward to work with.
Primarily, we needed a way to send down internal data for Vault core to
store since not all the data you need to revoke a key is always sent
down to the user (for example the user than AWS key belongs to).
At first, I was doing this manually in logical/framework with
req.Storage, but this is going to be such a common event that I think
its something core should assist with. Additionally, I think the added
context for secrets will be useful in the future when we have a Vault
API for returning orphaned out keys: we can also return the internal
data that might help an operator.
So this leads me to this refactor. I've removed most of the fields in
`logical.Response` and replaced it with a single `*Secret` pointer. If
this is non-nil, then the response represents a secret. The Secret
struct encapsulates all the lease info and such.
It also has some fields on it that are only populated at _request_ time
for Revoke/Renew operations. There is precedent for this sort of
behavior in the Go stdlib where http.Request/http.Response have fields
that differ based on client/server. I copied this style.
All core unit tests pass. The APIs fail for obvious reasons but I'll fix
that up in the next commit.
2015-03-19 23:11:42 +01:00
Mitchell Hashimoto
163bfa62a6
logical/framework: support renew
2015-03-19 20:20:57 +01:00
Mitchell Hashimoto
b54dc20aff
logical/framework: revoke support
2015-03-19 19:41:41 +01:00
Mitchell Hashimoto
6c1ecc8a15
logical/framework: can specify renew/revoke functins for secret
2015-03-19 15:07:45 +01:00
Mitchell Hashimoto
b5757ae49a
logical/framework: add methods to look up secret and gen response
2015-03-19 14:59:01 +01:00
Mitchell Hashimoto
ef56daa3bc
logical/framework: use custom request wrapper
2015-03-19 14:39:25 +01:00
Armon Dadgar
c7f0d38e1a
vault: Allow passing in credential backends
2015-03-18 15:21:41 -07:00
Mitchell Hashimoto
f4cc32e126
logical/framework: test for minimum age
2015-03-17 20:42:35 -05:00
Mitchell Hashimoto
56fb620b2d
logical/framework: only rollback old enough WAL entries
2015-03-17 20:39:46 -05:00
Mitchell Hashimoto
93f828ec0d
logical/framework: WAL entry supports "kind"
2015-03-17 20:39:46 -05:00
Mitchell Hashimoto
e77f79b317
logical/framework: rollback support
2015-03-17 20:39:46 -05:00
Mitchell Hashimoto
79af0e5d9e
logical/framework: WAL should live here
2015-03-17 20:39:45 -05:00
Mitchell Hashimoto
2a4a58732d
logical: WAL methods
2015-03-17 20:39:45 -05:00
Mitchell Hashimoto
4f4794ea64
vault: RollbackManager
...
There are some major TODO items here, and it isn't hooked into the core
yet, but the basic functionality is there.
2015-03-17 20:39:45 -05:00
Armon Dadgar
e69df0e947
all: Removing fields from Lease
2015-03-16 13:29:51 -07:00
Mitchell Hashimoto
1be431df51
vault: system using the framework
2015-03-15 17:35:59 -07:00
Mitchell Hashimoto
1f88dd2d92
logical/testing: acceptance testttttttt
2015-03-15 16:52:19 -07:00
Mitchell Hashimoto
12566c645c
logical/framework, logical/testing
2015-03-15 16:39:49 -07:00
Mitchell Hashimoto
9b42fe3c99
vault: convert to logical.Request and friends
2015-03-15 14:53:41 -07:00
Mitchell Hashimoto
68918feebe
vault: Passthrough backend uses logical.Backend
2015-03-15 14:27:06 -07:00
Mitchell Hashimoto
923ff65959
logical: put structs here, vault uses them
2015-03-15 14:27:06 -07:00
Armon Dadgar
424fb7cd8d
vault: Moving generic backend into package
2015-03-11 15:50:42 -07:00
Armon Dadgar
f557b435af
logical: Adding generic backend
2015-03-05 16:35:09 -08:00