当前位置: 首页 > 软件库 > 云计算 > >

t-vault

Simplified secrets management solution
授权协议 Apache-2.0 License
开发语言 Java
所属分类 云计算
软件类型 开源软件
地区 不详
投 递 者 满勇军
操作系统 跨平台
开源组织
适用人群 未知
 软件概览

T-Vault

T-Vault is built to simplify the process of secrets management. We wanted to build an intuitive and easy to use tool that application developers can easily adopt without sacrificing their agility while still following best practices for secrets management.It uses a few open source products internally including, at its heart Hashicorp Vault. Hashicorp vault provides the core functionality of safely storing secrets at rest and access control to those secrets. T-Vault builds on that base to provide a higher-level of abstraction called Safe. Safes are logical abstractions, internally using the concept of paths within vault.T-Vault simplifies the access management to secrets by hiding away all the complexities of managing policies.

A very intuitive web UI provides a nice layer of abstraction and hides all the complexities of managing paths, policies, token management, etc. T-Vault introduces two new personas, a 'Safe User' and 'Safe Administrator'. Both can create Safes and grant access to individuals or LDAP group or an application. They can also create and Manage Approles to use in their applications. Safe Administrators can manage Safes and AppRoles created by all the users. But non admin users can manage only the Safes and AppRoles created by himself. Individuals with access to a Safe can use the web UI or API to do CRUD operations on secrets within their Safe.

When a Safe is created, T-Vault automatically creates the paths and boilerplate policies for that path. It also saves metadata about the Safe internally within the vault. Granting access to an individual for Safe involves associating user to the predefined policy for the path associated with the Safe. App roles and AWS App roles creation and granting access to them works the same way.

This readme file provides instructions to download, install, configure and use T-Vault API and user portal.

Here is a quick demo video.

IMAGE ALT TEXT HERE

Table of Contents

  1. Installation
  2. Configuration
  3. Install in Production
  4. License

Installation

Installation on Linux

Installation-Prerequisites

Below are the dependencies required to build T-Vault from source.

  • JDK - Required to compile/build java source code
  • Maven - Required to build/package
  • Docker - Required if docker based deployment is preferred
  • Node and build tools (sudo yum install gcc-c++ make, sudo yum groupinstall 'Development Tools', bzip2)
  • Bower
  • Gulp

Installation Steps

You can build T-Vault from source using build_vault.sh. There are two packaging options available. The script can create a tar file or a docker image.

  • In case you choose 'tar' option, please make sure all the development tools are installed on Linux.
  • For the case of docker image, make sure docker service is running locally.

Tar based installation

  • Download source code (https://github.com/tmobile/t-vault).
  • Go to the parent directory of the source code tree and run the command
    ./build_tvault.sh --build all --package tar
  • This will build both T-Vault API and user portal and generate tar file tvault_all.tar.gz
  • Run the command
    ./install_tvault.sh
    to install and start T-Vault and all of the dependent services.

Docker container based installation

Docker needs to be installed and running before performing this.

  • Download source code (https://github.com/tmobile/t-vault).
  • Go to the parent directory of the source code tree and run the command
    ./build_tvault.sh --build all --package docker
  • This will build both T-Vault API and user portal and push the docker image to local docker hub
  • Run the command
    docker run --privileged -it -p 443:443 -p 8200:8200  your_tvault_docker_image_id /bin/bash
    to start cloud vault and all of the dependent services

How to access T-Vault Services

After completing the installation, you can access

  • The T-Vault User Portal using the URL https://your_ip_address
  • The T-Vault API using the URL https://your_ip_address:8080
  • The Vault Service using the URL https://your_ip_address:8200

T-Vault Configuration

Default Installation

Default installation, sets up vault with

  • AUTH BACKEND : Username Password
  • STORAGE BACKEND : File System

Default installation should be used only to test drive the tool, it should not be used in production environments. HA is not supported with the default installation.

The default installation sets up few default users so that you can explore the tool right away.

  1. safeadmin/safeadmin

    Safe Admin user. This user has all the privileges to create and manage safes. Post installation login with safeadmin to create safes and grant access to testuser1 & 2.

  2. vaultadmin/vaultadmin

    This is a Vault Admin user. By default this user is attached with policies to manage all the paths excepts for secret store mounts.

  3. testuser1/testuser1, testuser2/testuser2

    These two testusers doesnt have any previleges by default. You can grant access to these users and try out the functionalities of T-Vault.

T-Vault Configuration Options

T-Vault supports Following Auth Backends and Storage Backends.

Auth Backends

* Username Password
* LDAP
* AWS Authentication

Storage Backends

* Consul
* File System
* Dynamo DB

You can configure your installation with combination of any of the Auth Backend and Storage Backend listed above.

The installation script requires the vault configuration information. These configurations are managed from the parameters file.Sample T-Vault configuration parameters file.

###########################################################################
#                            Auth Backend                                 #
###########################################################################

# Allowed values for AUTH_BACKEND are userpass, ldap
AUTH_BACKEND=userpass
ENABLE_AWS=yes

###########################################################################
#                      LDAP Credentials                                   #
###########################################################################

#LDAP_URL='ldap://hostname.com:port'
#LDAP_GROUP_ATTR_NAME='cn'
#LDAP_USR_ATTR_NAME='---'
#USER_DN='---'
#GROUP_DN='----'
#BIND_DN='---'
#BIND_DN_PASS='---'
#TLS_ENABLED='false'
#VAULT_ADMIN_GROUP='---'
#SAFE_ADMIN_GROUP='---'

## The value for USE_UPNDOMAIN is either 'yes' or 'no'

#USE_UPNDOMAIN='yes'
#UPN_DOMAIN_URL='---'


##########################################################################
#                        Storage Backend                                 #
##########################################################################
# The possible values are 'File System' or 'Consul'
BACKEND='File System'

##########################################################################
#                         Consul Parameters                              #
##########################################################################

CONSUL_DATACENTER='dc1'
#CONSUL_ENCRYPT=''
CONSUL_RETRY_JOIN='127.0.0.1'
CONSUL_STORAGE_ADDRESS='127.0.0.1:8500'
CONSUL_STORAGE_PATH='tvault/tvault'
CONSUL_STORAGE_SERVICE_NAME='tvault'

##########################################################################
#                       Global                                           #
##########################################################################

SELF_SIGNED='y'

##########################################################################
#                         DynamoDB Parameters                            #
##########################################################################

#AWS_DYNAMODB_TABLE='tvault'
#AWS_DEFAULT_REGION='us-west-2'

Install in Production

Setup

For production installations use

1. AUTH BACKEND : LDAP
2. STORAGE BACKEND : Consul

Consul is the only storage backend that supports HA. When using LDAP as auth backend, you need to configure additional LDAP related parameters, two group names should be configured for setting up admin users for the T-Vault.

* SAFE_ADMIN_GROUP: All the members of this group will get safe admin privileges.
* VAULT_ADMIN_GROUP: All the members of this group will get vault admin privileges.

High Availability

T-Vault has following components

Component Description
Nginx Hosts the UI, acts as a proxy for T-Vault API and Vault's native http rest interface.
Springboot App T-Vault API layer
Hashicorp Vault As is Hashicorp Vault

Hashicorp Vault supports high availability with Consul as storage backend.

T-Vault UI, API and Vault is all bundled together into one unit. You can horizontally scale this unit and point it towards an HA Consul Cluster. If required you could split it up into multiple tiers and have load balancing and horizontal scaling for each of the layer.

Internally we have deployed our T-Vault on a container platform. The build scripts will create a readily usable tvault docker container (assuming with correct configuration file) which is then pushed to our container platform. We maintain a Consul cluster outside of the container platform.

Un-sealing

One of the challenges with open source version of vault is, how to unseal a new instance of vault in case of HA setup. We have built an automated unsealing process using KMS and IAM Roles. You can come up with a solution that works for you. Same way the distribution of the master keys can be added to the installation script based on your preference.

For standalone installations on VMs, where automatic un-sealing is not preferred, T-Vault has web pages to un-seal vault instances manually(https://host:port/#/unseal). Users have to enter 3 out of 5 keys in the un-seal web form (or whatever the threshold that was used). Key holders can go to the unseal page and enter the IP address of the sealed vault and enter their master key to start unsealing.

License

T-Vault is released under the Apache 2.0 License.

  • 问题描述 使用yum安装时出现如下错误: Errors during downloading metadata for repository 'AppStream':   - Status code: 404 for http://mirrors.cloud.aliyuncs.com/centos/8/AppStream/x86_64/os/repodata/repomd.xml (IP: 100

  • CentOS,是基于 Red Hat Linux 提供的可自由使用源代码的企业级 Linux 发行版本;是一个稳定,可预测,可管理和可复制的免费企业级计算平台。 下载地址: 阿里云开源镜像站资源目录 相关仓库: CentOS过期源(centos-vault):centos-vault镜像-centos-vault下载地址-centos-vault安装教程-阿里巴巴开源镜像站 CentOS arm源

  • spring vault 在使用Spring Boot和Spring Cloud的MicroServices –第1部分:概述中 ,我们简要介绍了什么是微服务以及如何使用SpringBoot和SpringCloud构建微服务。 在这篇文章中,我们将学习: Spring Cloud Config和Vault有什么需求? 创建我们的第一个微服务:catalog-service 创建Spring Clo

  • 在使用Spring Boot和Spring Cloud的MicroServices –第1部分:概述中 ,我们简要介绍了什么是微服务以及如何使用SpringBoot和SpringCloud构建微服务。 在这篇文章中,我们将学习: Spring Cloud Config和Vault有什么需求? 创建我们的第一个微服务:catalog-service 创建Spring Cloud Config服务器

 相关资料
  • \t

    描述 (Description) 字符\t匹配制表符。 例子 (Example) 以下示例显示了字符匹配的用法。 package com.wenjiangs; import java.util.regex.Matcher; import java.util.regex.Pattern; public class CharactersDemo { private static final St

  • 我只是想说清楚,我的意思是这样的- 另外,如果我访问第一个数组以外的元素,也会遇到同样的问题,即(INT*)arr+13。它会属于越界访问的条款吗?因为我是在第一个数组的边界之外访问的。

  • 描述 (Description) 如果存在这样的注释,则java.lang.reflect.Method.getAnnotation(Class《T》 annotationClass)方法返回指定类型的此元素的注释,否则为null。 声明 (Declaration) 以下是java.lang.reflect.Method.getAnnotation(Class《T》 annotationClass

  • 描述 (Description) 如果存在这样的注释,则java.lang.reflect.Field.getAnnotation(Class《T》 annotationClass)方法返回指定类型的此元素的注释,否则为null。 声明 (Declaration) 以下是java.lang.reflect.Field.getAnnotation(Class《T》 annotationClass)方

  • 描述 (Description) 如果存在这样的注释,则java.lang.reflect.Constructor.getAnnotation(Class《T》 annotationClass)方法返回指定类型的此元素的注释,否则为null。 声明 (Declaration) 以下是java.lang.reflect.Constructor.getAnnotation(Class《T》 annot

  • 描述 (Description) java.lang.reflect.AccessibleObject.getAnnotation(Class annotationClass) java.lang.reflect.AccessibleObject.getAnnotation(Class annotationClass) 如果存在这样的注释,则method返回此元素的指定类型的注释,否则返回null

  • 问题内容: 我对方法的使用有疑问。 想象以下代码: 有任何理由为什么你应该使用而不是(反之亦然)。我认为第二个选项更具可读性(当然是个人喜好了)。但是,有没有“真正的”理由为什么应该优先考虑呢? 问题答案: 从当前的JRE实现开始,将始终返回相同的实例,而每次出现不仅会创建自己的实例,甚至还会具有不同的实现类。有关更多详细信息,请参见此处。 原因是编译器生成了一个合成方法,该方法保留了该表达式的琐

  • 我有一个关于方法用法的问题。 想象一下下面的代码: 是否有任何理由使用而不是(反之亦然)。我认为第二种选择更易读(当然是品味问题)。但是,有没有“真正”的理由让一个人优先呢?