Giter Site home page Giter Site logo

auth0-cdktf-sample's Introduction

auth0-cdktf-sample

A list of CDK for Terraform sample implementions using Auth0 Terraform Provider.

Prerequisites

  • Instsall CDK for Terraform doc

Setup

  • Clone the repository
  • Run npm install to install dependencies
  • Run cdktf get to generate typescript definitions from auth0 provider
  • Copy .env.sample to .env, and populate the values for your tenant configurations
    • DOMAIN - Your domain
    • CLIENT_ID - Your deployment (machine to machine) client ID
    • CLIENT_SECRET - Your deployment (machine to machine) client secret

Usage

  • Deploy stacks cdktf deploy stack-name1 stack-name2 ...
  • Destroy stacks cdktf destroy stack-name1 stack-name2 ...

To Create Your Own Stack

  • Create a your-stack.ts file under src/stacks folder
  • Define your stack
  • Run cdktf deploy (Any stack definitions under src/stacks/* are dynamically loaded)

Sample Stacks

The following are the sample stacks available from this repository.

Machine to Machine

cdktf deploy basic-m2m

Deploys a stack containing the following resources

  • A Machine-to-Machine client
  • An API
  • Client Grants

Native

cdktf deploy basic-native
  • A Native client
  • An API
  • Client Grants
  • A connection
  • A user

Regular Web Application

cdktf deploy basic-rwa
  • A Regular Web App client
  • An API
  • Client Grants
  • A connection
  • A user

Single Page Application

cdktf deploy basic-spa
  • A Single Page Application client
  • An API
  • Client Grants
  • A connection
  • A user

Actions

cdktf deploy actions

Deploys a stack containing the following resources

  • Actions
    • src/scripts/actions/console-log.js as Console Log Action 1
    • src/scripts/actions/console-log.js as Console Log Action 2

Rules

cdktf deploy rules

Deploys a stack containing the following resources

  • Rules
    • src/scripts/rules/console-log.js as Console Log Rule 1
    • src/scripts/rules/console-log.js as Console Log Rule 2

Custom Database Scripts

cdktf deploy auto-import-bcrypt-pw

Deploys a stack containing the following resources

  • A SAP client
  • An API
  • A connection
  • Custom database scripts
    • src/scripts/database/auto-import-bcrypt.login.js
    • src/scripts/database/auto-import-bcrypt.getUser.js

(WIP) SAML SP and IDP

cdktf deploy basic-saml-idp basic-saml-sp

basic-saml-idp deploys a stack containing the following resources

  • A Regular Web App client with SAML support
  • A datbase connection
  • A user

basic-saml-sp deploys a stack containing the following resources

  • A Regular Web App client
  • A SAML connection

The SP must be dployed in a different tenant than the IDP's. Required .env parameters:

  • SAML_SP_DOMAIN
  • SAML_SP_CLIENT_ID
  • SAML_SP_CLIENT_SECRET

Native with Android configuration

cdktf deploy basic-mobile-android

Required .env parameters:

  • MOBILE_ANDROID_CALLBACK

Native with iOS configuration

cdktf deploy basic-mobile-ios

Required .env parameters:

  • MOBILE_IOS_CALLBACK
  • MOBILE_IOS_LOGOUT

(WIP) Guardian SDK Android Application

cdktf deploy guardian-android-app

Important: Currently Auth0 Terraform Provider does not support updating Guardian resources

Required .env parameters:

  • GUARDIAN_AWS_ACCESS_KEY_ID
  • GUARDIAN_AWS_ACCESS_SECRET_KEY
  • GUARDIAN_AWS_REGION

Custom Domain with Cloudflare

cdktf deploy custom-domain

Deploys a stack containing the following resources

  • Custom Domain with Auth0 Managed Certificate
  • CName Record (at Cloudflare)

Required .env parameters:

  • CLOUDFLARE_API_TOKEN API Token at Cloudflare
  • CLOUDFLARE_ZONE_ID Zone ID at Cloudflare

Log Streaming with AWS EventBridge

cdktf deploy log-stream-aws

Deploys a stack containing the following resources

  • Auth0 Log Streaming (Event Bridge)
  • AWS EventBridge Bus
  • AWS EventBridge Rule
  • AWS EventBridge Target
  • AWS CloudWatch Log Group

Required .env parameters:

  • LOG_STREAM_AWS_ACCESS_KEY
  • LOG_STREAM_AWS_SECRET_KEY
  • LOG_STREAM_AWS_REGION
  • LOG_STREAM_AWS_ACCOUNT_ID

auth0-cdktf-sample's People

Contributors

sasaki-san avatar

Stargazers

Ruth Linehan avatar Luis Echegaray avatar Amin Abbaspour 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.