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.
Below are the dependencies required to build T-Vault from source.
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.
./build_tvault.sh --build all --package tar
./install_tvault.shto install and start T-Vault and all of the dependent services.
Docker needs to be installed and running before performing this.
./build_tvault.sh --build all --package docker
docker run --privileged -it -p 443:443 -p 8200:8200 your_tvault_docker_image_id /bin/bashto start cloud vault and all of the dependent services
After completing the installation, you can access
Default installation, sets up vault with
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.
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.
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.
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 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'
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.
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.
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.
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服务器
描述 (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实现开始,将始终返回相同的实例,而每次出现不仅会创建自己的实例,甚至还会具有不同的实现类。有关更多详细信息,请参见此处。 原因是编译器生成了一个合成方法,该方法保留了该表达式的琐
我有一个关于方法用法的问题。 想象一下下面的代码: 是否有任何理由使用而不是(反之亦然)。我认为第二种选择更易读(当然是品味问题)。但是,有没有“真正”的理由让一个人优先呢?