oracle

package module
v0.1.5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 8, 2019 License: MPL-2.0 Imports: 15 Imported by: 1

README

vault-database-plugin-oracle

A Vault plugin for Oracle

This project uses the database plugin interface introduced in Vault version 0.7.1.

Build

For linux/amd64, pre-built binaries can be found at the releases page

For other platforms, there are not currently pre-built binaries available.

Before building, you will need to download the Oracle Instant Client library, which is available from Oracle. Download the SDK package to get the headers and download the Basic package to get the libraries for your platform. The libraries and headers should be installed at one of the standard locations for your platform (e.g. on macOS, /usr/local/include&/usr/local/lib or ~/include&~/lib).

Next, create a pkg-config file to point to the library. Create the file oci8.pc on your PKG_CONFIG_PATH.

An example oci8.pc for macOS is:

prefix=/usr/local

version=11.2
build=client64

libdir=${prefix}/lib
includedir=${prefix}/include

Name: oci8
Description: Oracle database engine
Version: ${version}
Libs: -L${libdir} -lclntsh
Libs.private:
Cflags: -I${includedir}

Then, git clone this repository into your $GOPATH and go build -o vault-plugin-database-oracle ./plugin from the project directory.

make test will run a basic test suite against a Docker version of Oracle.

Installation

The Vault plugin system is documented on the Vault documentation site.

You will need to define a plugin directory using the plugin_directory configuration directive, then place the vault-plugin-database-oracle executable generated above in the directory.

Register the plugin using

vault write sys/plugins/catalog/vault-plugin-database-oracle \
    sha_256=<expected SHA256 Hex value of the plugin binary> \
    command="vault-plugin-database-oracle"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() (interface{}, error)

New implements builtinplugins.BuiltinFactory

func Run

func Run(apiTLSConfig *api.TLSConfig) error

Run instantiates an Oracle object, and runs the RPC server for the plugin

Types

type Oracle

func (*Oracle) CreateUser

func (o *Oracle) CreateUser(ctx context.Context, statements dbplugin.Statements, usernameConfig dbplugin.UsernameConfig, expiration time.Time) (username string, password string, err error)

func (*Oracle) RenewUser

func (o *Oracle) RenewUser(ctx context.Context, statements dbplugin.Statements, username string, expiration time.Time) error

func (*Oracle) RevokeUser

func (o *Oracle) RevokeUser(ctx context.Context, statements dbplugin.Statements, username string) error

func (*Oracle) RotateRootCredentials added in v0.1.4

func (o *Oracle) RotateRootCredentials(ctx context.Context, statements []string) (map[string]interface{}, error)

func (*Oracle) Type

func (o *Oracle) Type() (string, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL