Coder Social home page Coder Social logo

wasatch-fed / dhs-saml-okta-starter Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 80 KB

OKTA nodejs typescript starter for the federal government projects. SAML SSO

Home Page: https://github.com/wasatch-fed/dhs-saml-okta-starter

JavaScript 10.58% Dockerfile 6.37% TypeScript 73.15% Handlebars 9.91%
dhs nestjs nodejs okta sso-authentication typescript saml saml-idp saml-service-provider piv

dhs-saml-okta-starter's Introduction

Description

OKTA SAML nodejs TypeScript starter repository for DHS.

Nest nodejs backend framework.

Okta for SAML.

Installation

$ pnpm install

Running the app

# development
$ pnpm run start

# watch mode
$ pnpm run start:dev

# production mode
$ pnpm run start:prod

# docker 
$ docker compose up -d

Generate key and cert

Create the server private key

openssl genrsa -out oktapk.key 2048

Create the certificate signing request (CSR)

openssl req -new -key oktapk.key -out servercert.csr

Sign the certificate using the private key and CSR

openssl x509 -req -days 3650 -in servercert.csr -signkey oktapk.key -out dhscert.crt

Generate Metadata

http://localhost:3000/auth/meta

Make sure to add config folder in the root directory of project and store cert and private key, refer saml.strategy.ts

OKTA Authentication Process

DHS OKTA will generate a 509 certificate with an entity Id and IDP entry point. Please ensure that the application callback URL is passed, as it will be called after a successful authentication request. A SAML response will then be generated with user information.

.env file

Create .env file in the project with following keys and provide valid information

# public cert
SAML_SERVER_PUBLIC_CERT=<PLACEHOLDER>
# private key
SAML_SERVER_PRIVATE_KEY=<PLACEHOLDER>
# entry point
OKTA_SAML_ENTRY_POINT=<PLACEHOLDER>
# issuer
OKTA_SAML_ISSUER=<PLACEHOLDER>
# app callback url
OKTA_SAML_CALLBACK_URL=<PLACEHOLDER>

Contact

[email protected]

Screens

After starting the application navigate to http://localhost:3000/ will display page with login button.

image

Submit action should take to DHS SSO OKTA application for the authentication.

image

dhs-saml-okta-starter's People

Contributors

rahuldongre-us avatar wasatch-fed avatar

Watchers

 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.