DocSec is a linux based python tool.It is designed to manage the secrets and credentials encrypted with the keys which are provided by the OPEN SOURCE PROJECT (Vault). Vault is also installed on docker to provide the light weight service , it also helps in maintaining the vault robustly without the loss of key even if container gets down. In this tool VAULT HTTP API has been used with the libraries of python to provide a TUI Tool for UI/UX.
- Operating System : Linux
- Python3 : Installed and Configured
- Permissions : Run as Root
- RAM : >2GB(Prefer)
- Space : Around 50MB (Later depends on Key Storage)
- Updates : Keep Code Updated by
git pull
Download the DocSec
git clone https://github.com/vaibhavpareek/docsec.git
Follow these Steps to Configure your own vault with this python tool.(Locally)
Same Steps can be followed on AWS Instance or Google GCP CLOUD Instance
pip3 install -r requirement.txt
Step 2 : Install Docker on Linux (Documentation for Installation)
apt-get install docker (Debian System)
For other OS refer Documentation
Step 3 : Download Vault Image from Docker HUB
docker pull vault:latest
docker volume create log_vol
docker volume create data_vol
docker run -dit --cap-add=IPC_LOCK
-e 'VAULT_DEV_ROOT_TOKEN_ID=<vault token>' -e 'VAULT_DEV_LISTEN_ADDRESS=0.0.0.0:<vault local port number>'
-p <vault public port number>:<vault local port number>
--name <vault server name> vault:latest
docker run -dit --cap-add=IPC_LOCK
-v data_vol:/vault/file -v log_vol:/vault/log
-e 'VAULT_ADDR=http://127.0.0.1:8200'
-e 'VAULT_LOCAL_CONFIG={"backend":{"file":{
"path":"/vault/file"
}
},
"ui":true,
"tls_disable":1}'
-p <vault public port number>:<vault local port number>
--name <vault server name> vault:latest server -dev
Replacable Variables(Including Brackets):
1. <vault token> : Replace with Vault Token Value
2. <vault local port number> : Provide any non-use Port Number Locally in Docker installed system(Default:8200)
3. <vault pubic port number> : Provide any non-use Port Number Publcally (Use for PATTING)
4. <vault server name> : Replace with any name for the running container
python3 main.py
1. docker container inspect <name of the vault server container> (To inspect whole container)
2. docker status <name of the vault server container> (To check the running status of the container)
3. docker stop/start/attach <name of the vault server container> (To Manage the running vault server)
docker exec -it <name of the vault server container> sh ( To get the shell excess)
1. vault status (To check the status)
2. vault login token=<token value>
3. vault operator init -> (To Initialize)
4. vault auth enable -path=token (To enable token method of logging in)
5. vault auth list (To list all the authentication methods)
Functionalities This Tool Provide
1. Create Own Key from multiple encrypting algorithms.
2. List All the Keys available in Vault.
3. Encrypt data of any credential file.
4. Decrypt data of credential file to get back the original content.
This project is licensed under the GPL License - see the LICENSE.md file for details
Version : 1.0.1 Next Version 🔜