Git Product home page Git Product logo

cfn-auth0-provider's Introduction

cfn-auth0-provider

A CloudFormation custom resource provider for managing Auth0.com resources. When you deploy applications in Amazon ECS which uses Auth0.com for authentication and authorization, you need to configure Auth0 Clients and Resource Servers (APIs). With this Custom CloudFormation Provider you can deploy applications, ECS Services and the Auth0 configuration from a single Cloudformation module.

The provider supports both the Auth0 resources from the:

Installation

To install the custom resource provider, you first need to create an non-interactive application in Auth0 which is allowed to invoke the Auth0 Management API.

Add Auth0 CloudFormation Provider application

Please get an Auth0 administration API token manually, and set the following environment variables:

export AUTH0_API_TOKEN=

Add the Authorization Extension in Auth0

Unfortunately, we cannot add the authorization extension programmatically. Please follow the Auth0 Authorization Extension installation instructions and set the environment variable AUTH0_AUTHZ_API to point to the API.

export AUTH0_AUTHZ_API=<url of the authorization extension API>

At the moment of writing, the URL for the installation Authorization Extension version 2.4 is:

export  AUTH0_AUTHZ_API=https://${AUTH0_DOMAIN/auth0.com/webtask.io}/adf6e2f2b84784b57522e3b19dfc9201

Now create the application, by typing:

./bin/create-custom-auth0-provider-application -d $AUTH0_DOMAIN \
		-p $AWS_DEFAULT_PROFILE \
		-r $AWS_DEFAULT_REGION  \
		-u $AUTH0_AUTHZ_URL

This script will create the application in Auth0 and store its credentials of this application in the Parameter Store under /cfn-auth0-provider/tenant, /cfn-auth0-provider/client_id and /cfn-auth0-provider/client_secret respectively. The Authorization extension API URL will be stored under /cfn-auth0-provider/authorization_url

Deploy the provider

To deploy the provider, type:

aws cloudformation create-stack \
        --capabilities CAPABILITY_IAM \
        --stack-name cfn-auth0-provider \
        --template-body file://cloudformation/cfn-auth0-provider.json

aws cloudformation wait stack-create-complete  --stack-name cfn-auth0-provider

This CloudFormation template will use our pre-packaged provider from s3://binxio-public/lambdas/cfn-auth0-provider-latest.zip.

cfn-auth0-provider's People

Contributors

mvanholsteijn avatar skoppe 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.