Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
arun-babu committed Feb 5, 2020
1 parent 4eaa323 commit 63d5e15
Show file tree
Hide file tree
Showing 7 changed files with 22 additions and 68 deletions.
27 changes: 7 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,32 +12,19 @@ Quickstart
- docker-compose
# Setup

git clone https://github.com/iudx/iudx-sub-ca
git clone https://github.com/iudx/iudx-sub-ca
cd iudx-sub-ca
./install-sub-CA <cert/sub-ca.crt> <cert/sub-ca.key>
./setup

# After install

- NOTE: Either put your sub-ca.crt and sub-ca.key in **cert/** directory or give appropriate file path to install-sub-CA as arguments.
- The setup will generate a self-signed certificate in **cert/** folder. Please update the **cert/** folder with real certificates and keys.

- Configure the [conf.py](https://github.com/iudx/iudx-sub-ca/blob/master/server/conf.py "conf.py") in **server/** directory according to your organization's credentials and details.

# For creating Self-Signed Certificates (for testing)

cd scripts && ./create-cert
# To manage employees in your organization

# Setup with Self-Signed Certificate and Key

cd iudx-sub-ca
./install-self-signed-sub-CA

# To insert an employee, use insert_employee script in **scripts/** directory

cd scripts/ && chmod a+x ./insert_employee
./insert_employee <email-id> <firstname> <lastname> <title> <certificate-class>

# To see all inserted employees, use show_employees script in **scripts/** directory

cd scripts/ && chmod a+x ./show_employees
./show_employees
Update the server/employee_db.py and restrat the server

# To get docker logs

Expand Down
4 changes: 0 additions & 4 deletions install-self-signed-sub-CA

This file was deleted.

36 changes: 0 additions & 36 deletions install-sub-CA

This file was deleted.

8 changes: 0 additions & 8 deletions scripts/create-cert

This file was deleted.

File renamed without changes.
File renamed without changes.
15 changes: 15 additions & 0 deletions setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
mkdir -p cert

openssl genrsa -out cert/sub-ca.private.key 2048
openssl req -new -subj "/CN=localhost" -key cert/sub-ca.private.key -out cert/sub-ca.csr
openssl x509 -req -days 365 -in cert/sub-ca.csr -signkey cert/sub-ca.private.key -out cert/sub-ca.crt

echo
echo "===> Created self-signed certificates in 'cert/' folder"
echo

cd docker

docker-compose down -v
docker-compose up -d
chmod a+x ./run && ./run

0 comments on commit 63d5e15

Please sign in to comment.