GithubHelp home page GithubHelp logo

lkubb / vault-plugin-database-minio Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 1.0 65 KB

Vault database plugin which provides short-lived authorizations for MinIO

License: Mozilla Public License 2.0

Go 100.00%
devops minio s3 vault vault-plugins

vault-plugin-database-minio's Introduction

MinIO Vault Database Plugin

This plugin allows Vault to manage MinIO authentication and authorization.

Prerequisites

MinIO

After initialization, you will need to create a policy and dedicated user account for Vault.

The policy should look like this:

{
    "Version": "2012-10-17",
    "Statement": [
        {
            "Effect": "Allow",
            "Action": [
                "admin:CreateUser",
                "admin:ListGroups",
                "admin:EnableUser",
                "admin:GetPolicy",
                "admin:GetUser",
                "admin:RemoveUserFromGroup",
                "admin:ServerInfo",
                "admin:CreatePolicy",
                "admin:DisableGroup",
                "admin:EnableGroup",
                "admin:DisableUser",
                "admin:ListUserPolicies",
                "admin:DeleteUser",
                "admin:GetGroup",
                "admin:ListUsers",
                "admin:AddUserToGroup",
                "admin:AttachUserOrGroupPolicy",
                "admin:DeletePolicy"
            ]
        }
    ]
}

Proceed with creating the Vault user and assign it this policy.

Vault

First, ensure your Vault configuration defines plugin_directory and api_address correctly (the latter is used for inter-process communication, consider TLS certificates!).

Currently, there are no binary releases, hence you will need to compile this plugin, e.g.:

go build ./cmd/minio-database-plugin
# or gox -osarch="linux/amd64" ./cmd/minio-database-plugin

Then move the plugin into plugin_directory, ensure correct ownership/permissions and register it:

vault plugin register -sha256=${BINARY_SHA_SUM} minio-database-plugin

Configuration

Connection

  • host: FQDN/IP address of the MinIO API. Required.
  • port: The port the MinIO API server is listening on (int). Defaults to 9000.
  • username: The name of the dedicated Vault user. Required.
  • password: The initial password of the dedicated Vault user. Required.
  • tls: Whether to enable TLS. Defaults to false.
  • insecure_tls: Whether to skip verifying server certificates. Defaults to false.
  • tls_server_name: Specifies the name to use as the SNI host when connecting to the MinIO server via TLS.
  • tls_min_version: Minimum acceptable TLS version (string). Defaults to 1.2
  • pem_bundle: Specifies concatenated PEM blocks containing a certificate and private key; a certificate, private key, and issuing CA certificate; or just a CA certificate. Only one of pem_bundle or pem_json can be specified.
  • pem_json: Specifies JSON containing a certificate and private key; a certificate, private key, and issuing CA certificate; or just a CA certificate. The value in this field must be an encoded JSON object. For convenience, the format is the same as the output of the issue command from the pki secrets engine; see the pki documentation. Only one of pem_bundle or pem_json can be specified.
  • connect_timeout: Timeout for HTTP connections. Defaults to 5s.

Role

A role's creation_statements define which permissions the issued user will carry and, optionally, which groups the user will belong to. It should be a list containing a single, JSON-encoded string value. The JSON data can contain the following fields:

  • policy: IAM policy which will be created for each issued user account. This is the most secure method of assigning permissions.
  • static_policies: A string-valued list of existing policy names that should be assigned to a user account issued under this role. Mind that the policies themselves are not managed by Vault.
  • groups: A list of group names the issued user should be part of. Groups are created on demand. Mind that the associated policy itself is not managed by Vault.

Notes

  • This plugin is in very early development.
  • MinIO must be not be using the Gateway/Filesystem backends, otherwise you will see this error: This 'admin' API is not supported by server in 'mode-server-fs'. Noticeably, the TrueNAS CORE native S3 service is outdated in that respect. You can install the MinIO plugin though, which is more recent.

Related

vault-plugin-database-minio's People

Contributors

lkubb avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.