The Auth0 Deploy CLI is a tool that helps you manage your Auth0 tenant configuration. It integrates into your development workflows as a standalone CLI or as a node module.
This guide will help you to a working implementation of the Deploy CLI tool used as a standalone CLI. There are three main steps before the Deploy CLI can be run:
Warning
This tool can be destructive to your Auth0 tenant.
It is recommended to be familiar with the AUTH0_ALLOW_DELETE configuration and to test on development tenants prior to using in production.
In order for the Deploy CLI to call the Management API, a dedicated Auth0 application must be created to make calls on behalf of the tool.
From the Auth0 dashboard, navigate to Applications > Applications
Click “Create Application”
On Create application page:
a. Name it “Deploy CLI” or similar
b. Select “Machine to Machine Applications” as application type
c. Click “Create”
On the “Authorize Machine to Machine Application” page
a. Select “Auth0 Management API”
b. Select the appropriate permissions for the resources you wish to manage. Refer to the Client Scopes section for more information.
c. Click “Authorize”
The designated application needs to be granted scopes in order to allow the Deploy CLI to execute Management operations.
The principle of least privilege is abided, so it will operate within the set of permissions granted. At a minimum, read:clients need to be selected, but is is recommended to select read:, create: and update: permissions for all resource types within management purview. To enable deletions, the delete: scopes are also necessary.
Configure the Deploy CLI
The Deploy CLI can be configured two ways, through a config.json file and through environment variables. The decision to choose one or both would depend on your specific use case and preferences. More comprehensive information about configuring the tool can be found on the Configuring the Deploy CLI page. However, for this example, the simplest way to get going is by setting the following environment variables:
AUTH0_DOMAIN
AUTH0_CLIENT_ID
AUTH0_CLIENT_SECRET
These values can be found in the “Settings” tab within the Auth0 application created in the previous step.
Calling the Deploy CLI
Finally, with above complete, the Deploy CLI export command can be run:
Once the process completes, observe the resource configuration files generated in the local directory. Then, run the import command, which pushes configuration from the local machine to your Auth0 tenant:
Please do not report security vulnerabilities on the public Github issue tracker. The Responsible Disclosure Program details the procedure for disclosing security issues.
Auth0 is an easy to implement, adaptable authentication and authorization platform. To learn more checkout Why Auth0?
This project is licensed under the MIT license. See the LICENSE file for more info.
[7.17.0] - 2023-03-03
Added
Keyword preservation on export to prevent overwriting of keyword markers in most instances. Enabled through the AUTH0_PRESERVE_KEYWORDS boolean configuration property. See also: Preserving Keywords on Export [#738],[#740],[#741],[#744],[#745],[#751],[#754],[#757],[#758],[#760]
Fixed
Enabled wrapping of @@ARRAY_REPLACE@@ keyword markers with single quotes in YAML resource configuration files [#760]
FAQs
A command line tool for deploying updates to your Auth0 tenant
The npm package auth0-deploy-cli receives a total of 26,988 weekly downloads. As such, auth0-deploy-cli popularity was classified as popular.
We found that auth0-deploy-cli demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago.It has 48 open source maintainers collaborating on the project.
Package last updated on 03 Mar 2023
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Noxia, a new dark web bulletproof host, offers dirt cheap servers for Python, Node.js, Go, and Rust, enabling cybercriminals to distribute malware and execute supply chain attacks.
Socket safeguards companies from software supply chain attacks by detecting and preventing threats in open source code and empowering developers to secure their applications and critical services against malware and other security risks.
Socket is launching Ruby support for all users. Enhance your Rails projects with AI-powered security scans for vulnerabilities and supply chain threats. Now in Beta!