OpenBudget/budgetkey-ng2-auth

Name: budgetkey-ng2-auth

Owner: ?????? ?? ??????

Description: null

Forked from: OriHoch/budgetkey-ng2-auth

Created: 2018-01-08 10:41:44.0

Updated: 2018-04-03 09:22:51.0

Pushed: 2018-04-03 09:22:50.0

Homepage: null

Size: 61

Language: TypeScript

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

budgetkey-ng2-auth

Install

Install latest Node 8

install
Start example app
start

Example app is available at http://localhost:4000

Install source into container app

Allows to debug the app integration in a container app

run install-into ../target-app-directory
Start the auth server

The docker compose environment starts everything required to run a local auth server for testing

It requires secret files / environment variables for the ssl and tokens, see below on a suggested method to create new ones

Once you have the required files, start the environment:

er-compose up

Auth server is available at https://localhost:8001/auth/check

Generate required auth tokens and certificate

To get GitHub OAuth keys, create a new OAuth App with the following details:

Following commands generates the required keys and creates the secret.env file which is used to provide parameters to the auth server, see datahq/auth for more details.

ssl genrsa -out secret.tmpkey 2048
ssl rsa -in secret.tmpkey -out secret-private.pem -outform pem
ssl rsa -in secret.tmpkey -out secret-public.pem -outform pem -pubout
 "PRIVATE_KEY=`echo $(cat secret-private.pem)`
IC_KEY=`echo $(cat secret-public.pem)`
LE_KEY=
LE_SECRET=
UB_KEY=
UB_SECRET=
BASE_URL=postgresql://postgres:123456@db:5432/postgres
RNAL_ADDRESS=" > secret.env
ecret.tmpkey secret-private.pem secret-public.pem

Generate self-signed ssl certificates for traefik:

ssl req -new -newkey rsa:4096 -days 365 -nodes -x509 -subj "/C=US/ST=Denial/L=Springfield/O=Dis/CN=localhost" -keyout traefik.key -out traefik.crt

This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.