Commit Graph

480 Commits

Author SHA1 Message Date
Jim Kalafut
430d9f9b36 Add OIDC token generation to Identity (#6900)
* Add OIDC token generation to Identity

There are a few open TODOs and some remaining cleanup, but this is
functionally complete and ready for review.

(Tests will being added soon.)

* Simplified key update endpoint

* Cache the config

* Fix Issuer handling

* Suppose base64-encoded templates (#6919)

* Cache JWKS and switch to go-cache (#6918)

* Address review comments

* Add warning if neither Issue nor api_addr are set

* adds tests (#6937)

* adds help synopsis and descriptions to the framework path for the oid… (#6930)

* adds help synopsis and descriptions to the framework path for the oidc backend

* Update vault/identity_store_oidc.go

Co-Authored-By: Jim Kalafut <jim@kalafut.net>

* Add Now parameter to PopulateStringInput

* Addressing review comments

* Refactor template processing to improve mode-specific handling

* adds a test for the periodic func (#6943)

* adds a test for the periodic func

* removes commented out code

* adds a comment

* Add comments
2019-06-21 10:23:39 -07:00
Jeff Mitchell
7c0b290f5d
Don't return an error if storagepacker is told to delete no items (#6941)
Just be idempotent -- nothing to delete means nothing to do
2019-06-20 17:46:58 -04:00
Jeff Mitchell
0f0027b7a0
Port some stuff (#6939)
* Port some fixes

* Sync some updates
2019-06-20 16:02:11 -04:00
Brian Kassouf
b435028f3f
Raft Storage Backend (#6888)
* Work on raft backend

* Add logstore locally

* Add encryptor and unsealable interfaces

* Add clustering support to raft

* Remove client and handler

* Bootstrap raft on init

* Cleanup raft logic a bit

* More raft work

* Work on TLS config

* More work on bootstrapping

* Fix build

* More work on bootstrapping

* More bootstrapping work

* fix build

* Remove consul dep

* Fix build

* merged oss/master into raft-storage

* Work on bootstrapping

* Get bootstrapping to work

* Clean up FMS and node-id

* Update local node ID logic

* Cleanup node-id change

* Work on snapshotting

* Raft: Add remove peer API (#906)

* Add remove peer API

* Add some comments

* Fix existing snapshotting (#909)

* Raft get peers API (#912)

* Read raft configuration

* address review feedback

* Use the Leadership Transfer API to step-down the active node (#918)

* Raft join and unseal using Shamir keys (#917)

* Raft join using shamir

* Store AEAD instead of master key

* Split the raft join process to answer the challenge after a successful unseal

* get the follower to standby state

* Make unseal work

* minor changes

* Some input checks

* reuse the shamir seal access instead of new default seal access

* refactor joinRaftSendAnswer function

* Synchronously send answer in auto-unseal case

* Address review feedback

* Raft snapshots (#910)

* Fix existing snapshotting

* implement the noop snapshotting

* Add comments and switch log libraries

* add some snapshot tests

* add snapshot test file

* add TODO

* More work on raft snapshotting

* progress on the ConfigStore strategy

* Don't use two buckets

* Update the snapshot store logic to hide the file logic

* Add more backend tests

* Cleanup code a bit

* [WIP] Raft recovery (#938)

* Add recovery functionality

* remove fmt.Printfs

* Fix a few fsm bugs

* Add max size value for raft backend (#942)

* Add max size value for raft backend

* Include physical.ErrValueTooLarge in the message

* Raft snapshot Take/Restore API  (#926)

* Inital work on raft snapshot APIs

* Always redirect snapshot install/download requests

* More work on the snapshot APIs

* Cleanup code a bit

* On restore handle special cases

* Use the seal to encrypt the sha sum file

* Add sealer mechanism and fix some bugs

* Call restore while state lock is held

* Send restore cb trigger through raft log

* Make error messages nicer

* Add test helpers

* Add snapshot test

* Add shamir unseal test

* Add more raft snapshot API tests

* Fix locking

* Change working to initalize

* Add underlying raw object to test cluster core

* Move leaderUUID to core

* Add raft TLS rotation logic (#950)

* Add TLS rotation logic

* Cleanup logic a bit

* Add/Remove from follower state on add/remove peer

* add comments

* Update more comments

* Update request_forwarding_service.proto

* Make sure we populate all nodes in the followerstate obj

* Update times

* Apply review feedback

* Add more raft config setting (#947)

* Add performance config setting

* Add more config options and fix tests

* Test Raft Recovery (#944)

* Test raft recovery

* Leave out a node during recovery

* remove unused struct

* Update physical/raft/snapshot_test.go

* Update physical/raft/snapshot_test.go

* fix vendoring

* Switch to new raft interface

* Remove unused files

* Switch a gogo -> proto instance

* Remove unneeded vault dep in go.sum

* Update helper/testhelpers/testhelpers.go

Co-Authored-By: Calvin Leung Huang <cleung2010@gmail.com>

* Update vault/cluster/cluster.go

* track active key within the keyring itself (#6915)

* track active key within the keyring itself

* lookup and store using the active key ID

* update docstring

* minor refactor

* Small text fixes (#6912)

* Update physical/raft/raft.go

Co-Authored-By: Calvin Leung Huang <cleung2010@gmail.com>

* review feedback

* Move raft logical system into separate file

* Update help text a bit

* Enforce cluster addr is set and use it for raft bootstrapping

* Fix tests

* fix http test panic

* Pull in latest raft-snapshot library

* Add comment
2019-06-20 12:14:58 -07:00
Becca Petrin
51f52175ab merge master 2019-06-19 10:24:45 -07:00
Becca Petrin
d5f333005a fix failing region test 2019-06-18 09:50:38 -07:00
Becca Petrin
4ebfba2c2b Merge branch 'opensource-master' into add-elasticsearch-auth 2019-06-17 11:12:51 -07:00
ncabatoff
1f3ec37a57
Add core.coreNumber field, used to differentiate multiple cores/clusters when running tests (#6855)
This is not used or exposed in prod.

Remove some test-specific code from the cluster-building helpers. The corresponding additions go on the ent side.
2019-06-10 14:07:16 -04:00
Becca Petrin
04c3bae2ef add elasticsearch database engine 2019-06-10 09:19:11 -07:00
Becca Petrin
a732b22f11 add PCF auth method, agent, and cli handler 2019-06-06 12:26:04 -07:00
vishalnayak
9be1128201 Expose PutBucket 2019-05-09 10:43:19 -04:00
vishalnayak
41dcb2ca72 fix test 2019-05-07 19:42:44 -04:00
Vishal Nayak
9adbdc4e81
Make linter happy (#6693) 2019-05-07 17:13:42 -04:00
Vishal Nayak
c80bd1b34f
Storage packer V1 updates (#6531)
* spv1 updates

* fix tests
2019-05-07 15:29:51 -04:00
Jeff Mitchell
f7bb5a2e56
Port over some SP v2 bits (#6516)
* Port over some SP v2 bits

Specifically:

* Add too-large handling to Physical (Consul only for now)
* Contextify some identity funcs
* Update SP protos

* Add size limiting to inmem storage
2019-05-01 13:47:41 -04:00
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
Brian Kassouf
7ec1fe75a9
Move cluster logic out of vault package (#6601)
* Move cluster logic out of vault package

* Dedup heartbeat and fix tests

* Fix test
2019-04-17 13:50:31 -07: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
fccfeef238 Sync a few things over 2019-04-13 00:04:44 -04:00
Jeff Mitchell
1d5aeccb60 Update protobufs, sdk changes 2019-04-12 23:13:14 -04:00
Becca Petrin
936192c392
Merge pull request #6268 from hashicorp/6234-aws-region
Add region to CLI for generating AWS login data
2019-04-12 16:15:38 -07:00
Becca Petrin
797edb7754 dont test files in CI 2019-04-12 15:40:45 -07:00
Jeff Mitchell
f95571a361 Move ldaputil and tlsutil over to sdk 2019-04-12 18:26:54 -04:00
Jeff Mitchell
6388efd4f0 Move useragent to sdk 2019-04-12 18:17:49 -04:00
Jeff Mitchell
a920c10be6 Move password to sdk 2019-04-12 18:12:13 -04:00
Jeff Mitchell
7ae6fb56ff Move policyutil to sdk 2019-04-12 18:08:46 -04:00
Jeff Mitchell
cf03949594 Move cidrutil to sdk 2019-04-12 18:03:59 -04:00
Jeff Mitchell
170521481d
Create sdk/ and api/ submodules (#6583) 2019-04-12 17:54:35 -04:00
Becca Petrin
cd37917df5 Merge branch 'opensource-master' into 6234-aws-region 2019-04-12 11:13:17 -07:00
Jeff Mitchell
c9a3d174a3 Sync over 2019-04-11 11:12:37 -04:00
Jeff Mitchell
cc6cf52452 Add some extra flexibility to GetPerfReplicatedClusters 2019-04-08 11:25:04 -04:00
Jeff Mitchell
5413d50063 Sync testhelper file 2019-04-04 15:36:43 -04:00
ncabatoff
0f4a4eb6db Apply the bits from ent pr 852 that are relevant to OSS. (#6528) 2019-04-04 13:02:44 -04:00
Becca Petrin
8d7d80bb28 Merge branch 'opensource-master' into 6234-aws-region 2019-04-03 11:37:33 -07:00
Artem Alexandrov
8ade9c18ef Fix getCN during group fetching in auth/ldap (#6518)
* Fix getCN during group fetching in auth/ldap

* #6518 Change strings.ToLower to strings.EqualFold
2019-04-02 16:25:03 -07:00
Becca Petrin
043ca6263e merge master 2019-04-01 13:52:44 -07:00
Jeff Mitchell
416d29761f Sync over 2019-03-25 12:43:16 -04:00
Jeff Mitchell
bdd2ba8c66 Remove unneeded build flag 2019-03-25 11:26:11 -04:00
Jeff Mitchell
208c76d345
Migrate from SermoDigital go Square JOSE (#6445) 2019-03-20 14:54:03 -04:00
T.K
4bcf0ec963 changed misspelled english words (#6432) 2019-03-19 09:32:45 -04:00
Jeff Mitchell
88741e9956 Sync over 2019-03-18 09:33:01 -04:00
Michel Vocks
61299b0502
Added upstream changes from enterprise to OSS (#6419) 2019-03-15 14:25:05 +01:00
Vishal Nayak
3c7c593bca Agent: Listener refactoring and socket file system permissions (#6397)
* Listener refactoring and file system permissions

* added listenerutil and move some common code there

* Added test for verifying socket file permissions

* Change default port of agent to 8200

* address review feedback

* Address review feedback

* Read socket options from listener config
2019-03-14 11:53:14 -07:00
Becca Petrin
74037a92d0 merge master 2019-03-05 09:39:53 -08:00
Jeff Mitchell
ad6641a40c Minor syncs 2019-03-04 13:35:22 -05:00
Michel Vocks
9617832784
Print warning when 'tls_cipher_suites' includes blacklisted cipher suites (#6300)
* Implemented a warning when tls_cipher_suites includes only cipher suites which are not supprted by the HTTP/2 spec

* Added test for cipher suites

* Added hard fail on startup when all defined cipher suites are blacklisted. Added warning when some ciphers are blacklisted.

* Replaced hard failure with warning. Removed bad cipher util function and replaced it by external library.

* Added missing dependency. Fixed renaming of package name.
2019-03-01 16:48:06 +01:00
Becca Petrin
73a2280626
Support env vars for STS region (#6284) 2019-02-28 09:31:06 -08:00
Calvin Leung Huang
2e0bef841a
agent/caching: use const for cache-clear path (#6271) 2019-02-21 14:53:34 -08:00
Brian Kassouf
760954c077 make fmt 2019-02-20 12:12:21 -08:00