GithubHelp home page GithubHelp logo

copeia / hashicorp.vagrant_vault_oracledb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aphorise/hashicorp.vagrant_vault_oracledb

0.0 0.0 0.0 1.26 MB

A Vagrantfile demonstrating Vault Database Secrets Engine with Oracle & rotations.

Shell 100.00%

hashicorp.vagrant_vault_oracledb's Introduction

HashiCorp vagrant demo of vault with Oracle-DB Secrets Engine.

This repo contains a Vagrantfile mock of a Vault server setup with Vault Database Secrets Engine enabled & configured to Oracle DB.

Screenshot

Makeup & Concept

                                .……………………………………….50
 Severs: Oracle & Vault         ┊   Oracle-DB   ┊
                                ┊    Database   ┊
                                └………………………………………┘
                                       ⤊
                                       ⤊
 other vault databases & roles ....____⤊______.51
 .┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄.    |  vault1   |   .┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄.
 |database4/rotate-root/oracle╲   |  oracle   |   |database1/rotate-root/oracle╲
 |database4/roles/my-role4    ┊╌╌╌|  plugins: |╌╌╌|database1/roles/my-role1    ┊
 ╰┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄╯   |___________|   ╰┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄╯
           .┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄|┄┄┄!.   |┄┄|┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄.
           |database3/rotate-root/oracle╲  |database2/rotate-root/oracle╲
           |database3/roles/my-role3    ┊  |database2/roles/my-role2    ┊
           ╰┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄╯  ╰┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄╯

Prerequisites

Ensure that you already have the following hardware & software requirements:

HARDWARE
  • RAM 7+ Gb Free at least (ensure you're not hitting SWAP either or are < 100Mb)
  • CPU 6+ Cores Free at least (2 or more per instance better)
  • Network interface allowing IP assignment and interconnection in VirtualBox bridged mode for all instances.
SOFTWARE

Usage & Workflow

Refer to the contents of Vagrantfile for the number of instances, resources, Network, IP and provisioning steps. The variable VPLUGIN_INSTANCES specific the number of Vault database mounts to be configured and the same number of users are also created on the db.

The provided .sh script are installer helpers that download the latest vault binaries (or specific versions) and sets configurations for Oracle DB Plugin.

# // in root of this repo:
wget https://download.oracle.com/otn-pub/otn_software/db-express/oracle-database-xe-18c-1.0-1.x86_64.rpm

vagrant up ;
# // ... output of provisioning steps.
vagrant global-status ; # should show running nodes
  # id       name    provider   state   directory
  # -------------------------------------------------------------------------------
  # 2a42e67  db         virtualbox running /home/auser/hashicorp.vagrant_vault_oracledb
  # 03a90a4  vault1     virtualbox running /home/auser/hashicorp.vagrant_vault_oracledb

# // SSH to vault1
vagrant ssh vault1 ;
# // ...
#vagrant@vault1:~$ \ # perform root-rotate on all Oracle-DB mounts & my-role
./vault_oracledb_test.sh
  # ROOT ROTATED: 96 Oracle-DB mounts in 9 seconds.
  # CRED ROTATED: 96 roles in Oracle-DB mounts in 84 seconds.
  # END
#// connecting to database:
sqlplus system/password@//db.test:1521/XEPDB1

# // SSH to db:
vault ssh db
# // ...
#vagrant@db:~$ \ # 
sudo su - oracle
. oraenv
XE
export ORACLE_PDB_SID=XEPDB1
sqlplus / as sysdba

# // ---------------------------------------------------------------------------
# when completely done:
vagrant destroy -f ; # ... destroy al
vagrant box remove -f oraclelinux/7 --provider virtualbox ; # ... delete box images

Notes

This repo is intended as a mere practise / training exercise.

See also more information at:

Reference material used:


hashicorp.vagrant_vault_oracledb's People

Contributors

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