diff options
author | Aria <me@aria.rip> | 2023-09-25 00:12:03 +0100 |
---|---|---|
committer | Aria <me@aria.rip> | 2023-09-25 00:12:03 +0100 |
commit | 0bd62b1d8b13ad1d38f61a6388c1f2e292b191a5 (patch) | |
tree | 68cf96bbcd113061daab8adabdfc8cb4fccde27f /cmd |
fockin BOOOILLEEERPLAAATEEE
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/vault-plugin-kerberos-secrets/main.go | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/cmd/vault-plugin-kerberos-secrets/main.go b/cmd/vault-plugin-kerberos-secrets/main.go new file mode 100644 index 0000000..59396c0 --- /dev/null +++ b/cmd/vault-plugin-kerberos-secrets/main.go @@ -0,0 +1,30 @@ +package main + +import ( + "os" + + krb "git.tardisproject.uk/tcmal/vault-plugin-kerberos-secrets" + "github.com/hashicorp/go-hclog" + "github.com/hashicorp/vault/api" + "github.com/hashicorp/vault/sdk/plugin" +) + +func main() { + apiClientMeta := &api.PluginAPIClientMeta{} + flags := apiClientMeta.FlagSet() + flags.Parse(os.Args[1:]) + + tlsConfig := apiClientMeta.GetTLSConfig() + tlsProviderFunc := api.VaultPluginTLSProvider(tlsConfig) + + err := plugin.Serve(&plugin.ServeOpts{ + BackendFactoryFunc: krb.Factory, + TLSProviderFunc: tlsProviderFunc, + }) + if err != nil { + logger := hclog.New(&hclog.LoggerOptions{}) + + logger.Error("plugin shutting down", "error", err) + os.Exit(1) + } +} |