Interface for event subscription plugins; SQS plugin (#24352)

Initial version of an internal plugin interface for event subscription plugins,
and an AWS SQS plugin as an example.

Co-authored-by: Tom Proctor <tomhjp@users.noreply.github.com>
This commit is contained in:
Christopher Swenson
2024-02-05 13:17:07 -08:00
committed by GitHub
parent 84bba4e3b7
commit 8f6dfaaf67
14 changed files with 656 additions and 4 deletions

View File

@@ -11,6 +11,8 @@ import (
"github.com/hashicorp/cli"
"github.com/hashicorp/vault/audit"
"github.com/hashicorp/vault/builtin/plugin"
"github.com/hashicorp/vault/plugins/event"
"github.com/hashicorp/vault/plugins/event/sqs"
"github.com/hashicorp/vault/sdk/logical"
"github.com/hashicorp/vault/sdk/physical"
"github.com/hashicorp/vault/version"
@@ -185,6 +187,10 @@ var (
"plugin": plugin.Factory,
}
eventBackends = map[string]event.Factory{
"sqs": sqs.New,
}
logicalBackends = map[string]logical.Factory{
"plugin": plugin.Factory,
"database": logicalDb.Factory,
@@ -742,6 +748,7 @@ func initCommands(ui, serverCmdUi cli.Ui, runOpts *RunOptions) map[string]cli.Co
},
AuditBackends: auditBackends,
CredentialBackends: credentialBackends,
EventBackends: eventBackends,
LogicalBackends: logicalBackends,
PhysicalBackends: physicalBackends,