mongodbatlas

package module
v0.0.0-...-8c4c394 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2020 License: MPL-2.0 Imports: 14 Imported by: 0

README

HashiCorp Vault Database Secrets Engine - MongoDB Atlas plugin

MongoDB Atlas is one of the supported plugins for the HashiCorp Vault Database Secrets Engine and allows for the programmatic generation of unique, ephemeral MongoDB Database User credentials in MongoDB Atlas Projects.

The plugin is included in version 1.4 of Vault.

This repository will be archived in the near future as the code developed here is now hosted within HashiCorp's repo: https://github.com/hashicorp/vault-plugin-database-mongodbatlas/. Any PRs or issues should be filed there. Please see Vault's main README for more information - https://github.com/hashicorp/vault.

Support, Bugs and Feature Requests

Support for the HashiCorp Vault Database Secrets Engine - MongoDB Atlas is provided under MongoDB Atlas support plans. Please submit support questions within the Atlas UI. Vault support is via HashiCorp.

Bugs should be filed under the Issues section of the Vault repo - https://github.com/hashicorp/vault.

Feature requests can be submitted at https://feedback.mongodb.com/forums/924145-atlas - just select the Vault plugin as the category or vote for an already suggested feature.

Please note: Hashicorp takes Vault's security and their users' trust very seriously, as does MongoDB.

If you believe you have found a security issue in Vault or with this plugin, please responsibly disclose by contacting HashiCorp at security@hashicorp.com and contact MongoDB directly via security@mongodb.com or open a ticket (link is external).

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New() (interface{}, error)

func Run

func Run(apiTLSConfig *api.TLSConfig) error

Run instantiates a MongoDBAtlas object, and runs the RPC server for the plugin

Types

type MongoDBAtlas

type MongoDBAtlas struct {
	credsutil.CredentialsProducer
	// contains filtered or unexported fields
}

func (MongoDBAtlas) Close

func (c MongoDBAtlas) Close() error

Close terminates the database connection.

func (MongoDBAtlas) Connection

func (c MongoDBAtlas) Connection(_ context.Context) (interface{}, error)

func (*MongoDBAtlas) CreateUser

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

func (MongoDBAtlas) Init

func (c MongoDBAtlas) Init(ctx context.Context, conf map[string]interface{}, verifyConnection bool) (map[string]interface{}, error)

Initialize parses connection configuration.

func (MongoDBAtlas) Initialize

func (c MongoDBAtlas) Initialize(ctx context.Context, conf map[string]interface{}, verifyConnection bool) error

func (*MongoDBAtlas) RenewUser

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

RenewUser is not supported on MongoDB, so this is a no-op.

func (*MongoDBAtlas) RevokeUser

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

RevokeUser drops the specified user from the authentication database. If none is provided in the revocation statement, the default "admin" authentication database will be assumed.

func (*MongoDBAtlas) RotateRootCredentials

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

RotateRootCredentials is not currently supported on MongoDB

func (*MongoDBAtlas) SetCredentials

func (m *MongoDBAtlas) SetCredentials(ctx context.Context, statements dbplugin.Statements, staticUser dbplugin.StaticUserConfig) (username, password string, err error)

SetCredentials uses provided information to set/create a user in the database. Unlike CreateUser, this method requires a username be provided and uses the name given, instead of generating a name. This is used for creating and setting the password of static accounts, as well as rolling back passwords in the database in the event an updated database fails to save in Vault's storage.

func (*MongoDBAtlas) Type

func (m *MongoDBAtlas) Type() (string, error)

Type returns the TypeName for this backend

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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