Skip to content

Commit

Permalink
feat: add redshift database plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
malnick committed Feb 6, 2020
1 parent d231add commit e009e72
Show file tree
Hide file tree
Showing 6 changed files with 1,088 additions and 4 deletions.
2 changes: 2 additions & 0 deletions helper/builtinplugins/registry.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@ import (
dbMssql "github.com/hashicorp/vault/plugins/database/mssql"
dbMysql "github.com/hashicorp/vault/plugins/database/mysql"
dbPostgres "github.com/hashicorp/vault/plugins/database/postgresql"
dbRedshift "github.com/hashicorp/vault/plugins/database/redshift"

logicalAd "github.com/hashicorp/vault-plugin-secrets-ad/plugin"
logicalAlicloud "github.com/hashicorp/vault-plugin-secrets-alicloud"
Expand Down Expand Up @@ -97,6 +98,7 @@ func newRegistry() *registry {
"mysql-legacy-database-plugin": dbMysql.New(credsutil.NoneLength, dbMysql.LegacyMetadataLen, dbMysql.LegacyUsernameLen),

"postgresql-database-plugin": dbPostgres.New,
"redshift-database-plugin": dbRedshift.New(true),
"mssql-database-plugin": dbMssql.New,
"cassandra-database-plugin": dbCass.New,
"mongodb-database-plugin": dbMongo.New,
Expand Down
21 changes: 21 additions & 0 deletions plugins/database/redshift/redshift-database-plugin/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
package main

import (
"log"
"os"

"github.com/hashicorp/vault/api"
"github.com/hashicorp/vault/plugins/database/redshift"
)

func main() {
apiClientMeta := &api.PluginAPIClientMeta{}
flags := apiClientMeta.FlagSet()
flags.Parse(os.Args[1:])

err := redshift.Run(apiClientMeta.GetTLSConfig())
if err != nil {
log.Println(err)
os.Exit(1)
}
}
Loading

0 comments on commit e009e72

Please sign in to comment.