-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into biazmoreira/identity/group/consistency/fix
- Loading branch information
Showing
38 changed files
with
473 additions
and
220 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:improvement | ||
core: add support for reading certain sensitive seal wrap and managed key (enterprise) configuration values from the environment or files. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
```release-note:bug | ||
ui (enterprise): Fixes token renewal to ensure capability checks are performed in the relevant namespace, resolving 'Not authorized' errors for resources that users have permission to access. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: MPL-2.0 | ||
|
||
//go:build !enterprise | ||
|
||
package dbplugin | ||
|
||
import ( | ||
"github.com/hashicorp/vault/sdk/database/dbplugin/v5/proto" | ||
"github.com/hashicorp/vault/sdk/helper/pluginutil" | ||
) | ||
|
||
type entGRPCClient struct{} | ||
|
||
func (c gRPCClient) Close() error { | ||
ctx, cancel := getContextWithTimeout(pluginutil.PluginGRPCTimeoutClose) | ||
defer cancel() | ||
|
||
_, err := c.client.Close(ctx, &proto.Empty{}) | ||
if err != nil { | ||
if c.doneCtx.Err() != nil { | ||
return ErrPluginShutdown | ||
} | ||
return err | ||
} | ||
return nil | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: MPL-2.0 | ||
|
||
//go:build !enterprise | ||
|
||
package dbplugin | ||
|
||
import ( | ||
"github.com/hashicorp/vault/sdk/database/dbplugin/v5/proto" | ||
) | ||
|
||
var _ proto.DatabaseClient = fakeClient{} | ||
|
||
type fakeClient struct { | ||
initResp *proto.InitializeResponse | ||
initErr error | ||
|
||
newUserResp *proto.NewUserResponse | ||
newUserErr error | ||
|
||
updateUserResp *proto.UpdateUserResponse | ||
updateUserErr error | ||
|
||
deleteUserResp *proto.DeleteUserResponse | ||
deleteUserErr error | ||
|
||
typeResp *proto.TypeResponse | ||
typeErr error | ||
|
||
closeErr error | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
// Copyright (c) HashiCorp, Inc. | ||
// SPDX-License-Identifier: MPL-2.0 | ||
|
||
//go:build !enterprise | ||
|
||
package dbplugin | ||
|
||
import ( | ||
"context" | ||
|
||
"google.golang.org/grpc" | ||
|
||
"github.com/hashicorp/go-plugin" | ||
"github.com/hashicorp/vault/sdk/database/dbplugin/v5/proto" | ||
"github.com/hashicorp/vault/sdk/helper/pluginutil" | ||
"github.com/hashicorp/vault/sdk/logical" | ||
) | ||
|
||
// GRPCClient (Vault CE edition) initializes and returns a gRPCClient with Database and | ||
// PluginVersion gRPC clients. It implements GRPCClient() defined | ||
// by GRPCPlugin interface in go-plugin/plugin.go | ||
func (GRPCDatabasePlugin) GRPCClient(doneCtx context.Context, _ *plugin.GRPCBroker, c *grpc.ClientConn) (interface{}, error) { | ||
client := gRPCClient{ | ||
client: proto.NewDatabaseClient(c), | ||
versionClient: logical.NewPluginVersionClient(c), | ||
doneCtx: doneCtx, | ||
} | ||
return client, nil | ||
} | ||
|
||
// GRPCServer (Vault CE edition) registers multiplexing server if the plugin supports it, and | ||
// registers the Database and PluginVersion gRPC servers. It implements GRPCServer() defined | ||
// by GRPCPlugin interface in go-plugin/plugin.go | ||
func (d GRPCDatabasePlugin) GRPCServer(_ *plugin.GRPCBroker, s *grpc.Server) error { | ||
var server gRPCServer | ||
|
||
if d.Impl != nil { | ||
server = gRPCServer{singleImpl: d.Impl} | ||
} else { | ||
// multiplexing is supported | ||
server = gRPCServer{ | ||
factoryFunc: d.FactoryFunc, | ||
instances: make(map[string]Database), | ||
} | ||
|
||
// Multiplexing is enabled for this plugin, register the server so we | ||
// can tell the client in Vault. | ||
pluginutil.RegisterPluginMultiplexingServer(s, pluginutil.PluginMultiplexingServerImpl{ | ||
Supported: true, | ||
}) | ||
} | ||
|
||
proto.RegisterDatabaseServer(s, &server) | ||
logical.RegisterPluginVersionServer(s, &server) | ||
return nil | ||
} |
Oops, something went wrong.