GithubHelp home page GithubHelp logo

martezr / vault-plugin-auth-vsphere Goto Github PK

View Code? Open in Web Editor NEW
18.0 3.0 3.0 2.43 MB

HashiCorp Vault auth plugin for authenticating VMware vSphere VMs

License: Mozilla Public License 2.0

Go 80.37% HCL 6.38% Shell 7.11% PowerShell 6.15%
vault vsphere vault-plugins hashicorp

vault-plugin-auth-vsphere's Introduction

HashiCorp Vault VMware vSphere Authentication Plugin

Build Status GoReportCard GitHub release license

This is a standalone backend plugin for use with HashiCorp Vault. This plugin allows for VMware vSphere virtual machines (VMs) to authenticate with Vault. This plugin requires the vAuth platform to be deployed and configured.

Getting Started

This is a Vault plugin and is meant to work with Vault. This guide assumes you have already installed Vault and have a basic understanding of how Vault works.

To learn specifically about how plugins work, see documentation on Vault plugins.

Setup

Download the latest plugin binary from the Releases page on GitHub and move the plugin binary into Vault's configured plugin_directory.

mv vault-plugin-auth-vsphere /etc/vault/plugins/vault-plugin-auth-vsphere

Calculate the checksum of the plugin and register it in Vault's plugin catalog. It is highly recommended that you use the published checksums on the Release page to verify integrity.

export SHA256_SUM=$(shasum -a 256 "/opt/vault/plugins/vault-plugin-auth-vsphere" | cut -d' ' -f1)
vault write sys/plugins/catalog/auth/vsphere command="vault-plugin-auth-vsphere" sha_256="${SHA256_SUM}

Enable authentication with the plugin.

vault auth enable vsphere

Configure the vAuth URL

vault write auth/vsphere/config vauth_url="https://vauth.grt.local"

Create a role and assign a policy to the role

vault write auth/vsphere/role/webapp policies=webapp

Developing

If you wish to work on this plugin, you'll first need Go installed on your machine (version 1.13+ is required).

Compile the plugin binary for use with Vault

env GOOS=linux GOARCH=amd64 go build -o plugins/vault-plugin-auth-vsphere cmd/vault-plugin-auth-vsphere/main.go

Run HashiCorp Vault in dev mode with the plugin automatically loaded

vault server -dev -dev-root-token-id=root -dev-listen-address=0.0.0.0:8200 -dev-plugin-dir=./plugins
export VAULT_ADDR="http://127.0.0.1:8200"

Enable the vSphere authentication plugin

vault auth enable -path="vsphere" -plugin-name="vault-plugin-auth-vsphere" plugin

License

Author: Martez Reed ([email protected])
Copyright: Copyright (c) 2019 Green Reed Technology
License: Apache License, Version 2.0

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

vault-plugin-auth-vsphere's People

Contributors

martezr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.