credentials and authentication of your organization. • It encrypts & provides access to any secrets. • Every secret is associated with a lease. Clients have to renew there secret within the lease period. • A secret is anything that you want to tightly control access to, such as API keys, passwords, certificates, and more.
stored in Vault. Vault encrypts these secrets prior to writing them to persistent storage, so gaining access to the raw storage isn't enough to access your secrets. Vault can write to disk, Consul, and more. 2 Dynamic Secrets: Vault can generate secrets on-demand for some systems, such as AWS or SQL databases. For example, when an application needs to access an S3 bucket, it asks Vault for credentials, and Vault will generate an AWS keypair with valid permissions on demand. After creating these dynamic secrets, Vault will also automatically revoke them after the lease is up. 3 Leasing and Renewal: All secrets in Vault have a lease associated with it. At the end of the lease, Vault will automatically revoke that secret. Clients are able to renew leases via built-in renew APIs. 4 Revocation: Vault has built-in support for secret revocation. Vault can revoke not only single secrets, but a tree of secrets, for example all secrets read by a specific user, or all secrets of a particular type. Revocation assists in key rolling as well as locking down systems in the case of an intrusion.
List - List data or secrets in Vault • Token-create - Create a new auth token • Mounts - Lists mounted backends in Vault • Policies - List the policies on the server • Audit - Lists enabled audit backends in Vault • Ssh - Initiate an SSH session • Rotate - Rotates the backend encryption key used to persist data • Unseal/Seal - Unseal/Seal Vault
where a secret is divided into parts, giving each participant its own unique part, where some of the parts or all of them are needed in order to reconstruct the secret. • Threshold is the number of shares you need at least in order to recover your secret. You can restore your secret only when you have more than or equal to the number of threshold. • For Vault, we split the master key into 5 shares, any 3 of which are required to reconstruct the master key. • For more Info: http://kimh.github.io/blog/en/security/protect-your-sec ret-key-with-shamirs-secret-sharing/
$ vault audit-enable file file_path=/var/log/vault_audit.log • Check the log file using: $ sudo cat /var/log/vault_audit.log • Any number of file audit logs can be created by enabling it with different paths. $ vault audit-enable -path="vault_audit_1" file file_path=/home/user/vault_audit.log • Can also enable syslog, socket: $ vault audit-enable syslog $ vault audit-enable socket $ vault audit-enable socket address="127.0.0.1:9090" socket_type="tcp"
$ vault mount ssh • Writing SSH Role with User and CIDR $ vault write ssh/roles/otp_key_role \ key_type=otp \ default_user=ramit \ cidr_list=192.168.x.x/y • Configure sshd daemon in pam: $ vim /etc/pam.d/sshd
the performance of different libraries and subsystems. • These metrics are aggregated on a 10 second interval and are retained for 1 minute. • You'll note that log entries are prefixed with the metric type as follows: [C] is a counter [G] is a gauge [S] is a summary • For more info: https://www.vaultproject.io/docs/internals/telemetry.html
in-transit. • It encrypts data from applications while still storing that encrypted data in some primary data store. • It can also sign and verify data; generate hashes and HMACs of data; and act as a source of random bytes. • It allows the same key to be used for multiple purposes by deriving a new key based on a user-supplied context value. • Mount transit on vault $ vault mount transit • create a named encryption key: $ vault write -f transit/keys/foo • Validate the key foo $ vault read transit/keys/foo
--add supervisord • Start Service with supervisord sudo service supervisord start supervisorctl • For more info on supervisor: https://serversforhackers.com/c/monitoring-processes-with-supervisord
commonly referred to as public key cryptography (PKI). • With public key cryptography, two keys are created, one public, one private. Anything encrypted with either key can only be decrypted with its corresponding key. • Thus if a message or data stream were encrypted with the server's private key, it can be decrypted only using its corresponding public key, ensuring that the data only could have come from the server. • Openssl toolkit is used to generate an RSA Private Key and CSR (Certificate Signing Request). It can also be used to generate self-signed certificates which can be used for testing purposes or internal usage. • Make a Directory $ mkdir .ssl && cd .ssl • Generate a private key with a password, 1024 bit encrypted $ openssl genrsa -des3 -out server.key 1024 • Generate a CSR (Certificate Signing Request) $ openssl req -new -key server.key -out server.csr