Skip to content

Commit 7582a44

Browse files
benashzdrivera258
authored andcommitted
Stub updates for Ent (#30890)
1 parent 23477a2 commit 7582a44

File tree

4 files changed

+24
-1
lines changed

4 files changed

+24
-1
lines changed

changelog/30890.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:change
2+
logical/system: add ent stub for plugin catalog handling
3+
```

vault/logical_system.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,7 @@ func NewSystemBackend(core *Core, logger log.Logger, config *logical.BackendConf
203203
b.Backend.Paths = append(b.Backend.Paths, b.sealPaths()...)
204204
b.Backend.Paths = append(b.Backend.Paths, b.statusPaths()...)
205205
b.Backend.Paths = append(b.Backend.Paths, b.pluginsCatalogListPaths()...)
206-
b.Backend.Paths = append(b.Backend.Paths, b.pluginsCatalogCRUDPath())
206+
b.Backend.Paths = append(b.Backend.Paths, entWrappedPluginsCRUDPath(b)...)
207207
b.Backend.Paths = append(b.Backend.Paths, b.pluginsCatalogPinsListPath())
208208
b.Backend.Paths = append(b.Backend.Paths, b.pluginsCatalogPinsCRUDPath())
209209
b.Backend.Paths = append(b.Backend.Paths, b.pluginsReloadPath())

vault/logical_system_stubs_oss.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,7 @@ func (s *SystemBackend) makeSnapshotSource(ctx context.Context, _ *framework.Fie
3131
}
3232
return snapshots.NewManualSnapshotSource(body), nil
3333
}
34+
35+
func entWrappedPluginsCRUDPath(b *SystemBackend) []*framework.Path {
36+
return []*framework.Path{b.pluginsCatalogCRUDPath()}
37+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
// Copyright (c) HashiCorp, Inc.
2+
// SPDX-License-Identifier: BUSL-1.1
3+
4+
//go:build !enterprise
5+
6+
package plugincatalog
7+
8+
import (
9+
"context"
10+
11+
"github.com/hashicorp/vault/sdk/helper/pluginutil"
12+
)
13+
14+
func (c *PluginCatalog) entPrepareDownloadedPlugin(ctx context.Context, plugin pluginutil.SetPluginInput) (string, string, error) {
15+
return "", "", nil
16+
}

0 commit comments

Comments
 (0)