auth0/auth0-deploy-cli
关于
Auth0 Deploy CLI 可帮助你管理 Auth0 租户配置,并可作为独立 CLI 或 Node.js 模块集成到开发工作流中。
开发工具可以做什么
- Multi-Environment Oriented: Designed to help you test your applications' Auth0 integrations from feature branch all the way to production.
- Keyword Replacement: Shared resource configurations across all environments with dynamic keyword replacement.
- Versatile: Integrate into your CI/CD workflows either as a CLI or as a Node module.
实测星标增长
- 24小时
- 0
- 7天
- +1
- 15天
- +2
- 1个月
- 正在收集历史
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文
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.
Supported resource types: actions, branding, client grants, clients (applications), connections, databases, custom domains, email templates, emails, grants, guardian, hook secrets, log streams, organizations, pages, prompts, resource servers (APIs), roles, tenant settings, themes, forms, flows, self-service profiles, network ACLs, network ACL keys, client profiles, agents, portals.
🎢 Highlights • 📚 Documentation • 🚀 Getting Started • 📝 Feedback • 💬 Discussions
Highlights
- Multi-Environment Oriented: Designed to help you test your applications' Auth0 integrations from feature branch all the way to production.
- Keyword Replacement: Shared resource configurations across all environments with dynamic keyword replacement.
- Versatile: Integrate into your CI/CD workflows either as a CLI or as a Node module.
Documentation
- Using as a CLI
- Using as a Node Module
- Authenticating with Tenant
- Configuring the Deploy CLI
- Keyword Replacement
- Incorporating Into Multi-environment Workflows
- Excluding Resources From Management
- Resource-specific Documentation
- Available Resource Formats
- Terraform Provider
- How to Contribute
Getting Started
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_DELETEconfiguration and to test on development tenants prior to using in production.
Prerequisites
- Node version 20(v20.19.0) or greater
- Auth0 Tenant
Install the Deploy CLI
To run as a standalone command-line tool:
npm install -g auth0-deploy-cli
Create a dedicated Auth0 Application
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”
Warning The Deploy CLI's own client is unconfigurable by itself to prevent potentially destructive changes.
Client Scopes
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_DOMAINAUTH0_CLIENT_IDAUTH0_CLIENT_SECRET
These values can be found in the “Settings” and “Credentials“ tabs 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:
a0deploy export --format=yaml --output_folder=local
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:
a0deploy import --config_file=config.json --input_file local/tenant.yaml
Refer to Using as a CLI documentation for a comprehensive list of flags and options.
Feedback
Contributing
We appreciate feedback and contribution to this repo! Before you get started, please see the following:
Raise an issue
To provide feedback or report a bug, please raise an issue on our issue tracker.
Vulnerability Reporting
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.
探索相关项目
加载中…