Skip to content

Commit

Permalink
Merge branch 'master-oss' into entity-read-groups
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalnayak committed Nov 3, 2017
2 parents 5807394 + 68320d0 commit 5099cfe
Show file tree
Hide file tree
Showing 15 changed files with 83 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ DEPRECATIONS/CHANGES:
a string. This better matches the API elsewhere in Vault.

FEATURES:

* ** RSA Support for Transit Backend**: Transit backend can now generate RSA
keys which can be used for encryption and signing. [GH-3489]

Expand Down Expand Up @@ -50,6 +51,8 @@ BUG FIXES:
responses when requests were forwarded to the active node [GH-3485]
* physical/etcd3: Fix some listing issues due to how etcd3 does prefix
matching [GH-3406]
* physical/etcd3: Fix case where standbys can lose their etcd client lease
[GH-3031]
* physical/file: Fix listing when underscores are the first component of a
path [GH-3476]
* plugins: Allow response errors to be returned from backend plugins [GH-3412]
Expand Down
3 changes: 3 additions & 0 deletions builtin/credential/aws/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,9 @@ func Backend(conf *logical.BackendConfig) (*backend, error) {
LocalStorage: []string{
"whitelist/identity/",
},
SealWrapStorage: []string{
"config/client",
},
},
Paths: []*framework.Path{
pathLogin(b),
Expand Down
4 changes: 4 additions & 0 deletions builtin/credential/ldap/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ func Backend() *backend {
Unauthenticated: []string{
"login/*",
},

SealWrapStorage: []string{
"config",
},
},

Paths: append([]*framework.Path{
Expand Down
3 changes: 3 additions & 0 deletions builtin/credential/okta/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ func Backend() *backend {
Unauthenticated: []string{
"login/*",
},
SealWrapStorage: []string{
"config",
},
},

Paths: append([]*framework.Path{
Expand Down
4 changes: 4 additions & 0 deletions builtin/credential/radius/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ func Backend() *backend {
"login",
"login/*",
},

SealWrapStorage: []string{
"config",
},
},

Paths: append([]*framework.Path{
Expand Down
3 changes: 3 additions & 0 deletions builtin/logical/aws/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ func Backend() *backend {
LocalStorage: []string{
framework.WALPrefix,
},
SealWrapStorage: []string{
"config/root",
},
},

Paths: []*framework.Path{
Expand Down
6 changes: 6 additions & 0 deletions builtin/logical/cassandra/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func Backend() *backend {
b.Backend = &framework.Backend{
Help: strings.TrimSpace(backendHelp),

PathsSpecial: &logical.Paths{
SealWrapStorage: []string{
"config/connection",
},
},

Paths: []*framework.Path{
pathConfigConnection(&b),
pathRoles(&b),
Expand Down
6 changes: 6 additions & 0 deletions builtin/logical/consul/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,12 @@ func Factory(conf *logical.BackendConfig) (logical.Backend, error) {
func Backend() *backend {
var b backend
b.Backend = &framework.Backend{
PathsSpecial: &logical.Paths{
SealWrapStorage: []string{
"config/access",
},
},

Paths: []*framework.Path{
pathConfigAccess(),
pathListRoles(&b),
Expand Down
6 changes: 6 additions & 0 deletions builtin/logical/database/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ func Backend(conf *logical.BackendConfig) *databaseBackend {
b.Backend = &framework.Backend{
Help: strings.TrimSpace(backendHelp),

PathsSpecial: &logical.Paths{
SealWrapStorage: []string{
"config/*",
},
},

Paths: []*framework.Path{
pathListPluginConnection(&b),
pathConfigurePluginConnection(&b),
Expand Down
6 changes: 6 additions & 0 deletions builtin/logical/mongodb/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ func Backend() *framework.Backend {
b.Backend = &framework.Backend{
Help: strings.TrimSpace(backendHelp),

PathsSpecial: &logical.Paths{
SealWrapStorage: []string{
"config/connection",
},
},

Paths: []*framework.Path{
pathConfigConnection(&b),
pathConfigLease(&b),
Expand Down
6 changes: 6 additions & 0 deletions builtin/logical/mssql/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ func Backend() *backend {
b.Backend = &framework.Backend{
Help: strings.TrimSpace(backendHelp),

PathsSpecial: &logical.Paths{
SealWrapStorage: []string{
"config/connection",
},
},

Paths: []*framework.Path{
pathConfigConnection(&b),
pathConfigLease(&b),
Expand Down
6 changes: 6 additions & 0 deletions builtin/logical/mysql/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ func Backend() *backend {
b.Backend = &framework.Backend{
Help: strings.TrimSpace(backendHelp),

PathsSpecial: &logical.Paths{
SealWrapStorage: []string{
"config/connection",
},
},

Paths: []*framework.Path{
pathConfigConnection(&b),
pathConfigLease(&b),
Expand Down
6 changes: 6 additions & 0 deletions builtin/logical/postgresql/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ func Backend(conf *logical.BackendConfig) *backend {
b.Backend = &framework.Backend{
Help: strings.TrimSpace(backendHelp),

PathsSpecial: &logical.Paths{
SealWrapStorage: []string{
"config/connection",
},
},

Paths: []*framework.Path{
pathConfigConnection(&b),
pathConfigLease(&b),
Expand Down
6 changes: 6 additions & 0 deletions builtin/logical/rabbitmq/backend.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,12 @@ func Backend() *backend {
b.Backend = &framework.Backend{
Help: strings.TrimSpace(backendHelp),

PathsSpecial: &logical.Paths{
SealWrapStorage: []string{
"config/connection",
},
},

Paths: []*framework.Path{
pathConfigConnection(&b),
pathConfigLease(&b),
Expand Down
15 changes: 15 additions & 0 deletions physical/etcd/etcd3.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,21 @@ func (c *EtcdLock) Lock(stopCh <-chan struct{}) (<-chan struct{}, error) {
return nil, EtcdLockHeldError
}

select {
case _, ok := <-c.etcdSession.Done():
if !ok {
// The session's done channel is closed, so the session is over,
// and we need a new one
session, err := concurrency.NewSession(c.etcd, concurrency.WithTTL(etcd3LockTimeoutInSeconds))
if err != nil {
return nil, err
}
c.etcdSession = session
c.etcdMu = concurrency.NewMutex(session, c.prefix)
}
default:
}

ctx, cancel := context.WithCancel(context.Background())
go func() {
<-stopCh
Expand Down

0 comments on commit 5099cfe

Please sign in to comment.