auth0-deploy-cli 9.0.0-beta.1 → 9.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +2 -357
- package/CHANGELOG.md +162 -6
- package/CLAUDE.md +138 -2
- package/README.md +1 -1
- package/lib/context/defaults.d.ts +7 -0
- package/lib/context/defaults.js +74 -30
- package/lib/context/directory/handlers/actionModules.js +8 -5
- package/lib/context/directory/handlers/actions.js +8 -4
- package/lib/context/directory/handlers/attackProtection.js +1 -1
- package/lib/context/directory/handlers/branding.js +4 -1
- package/lib/context/directory/handlers/clientAuthCredentials.d.ts +5 -0
- package/lib/context/directory/handlers/clientAuthCredentials.js +13 -0
- package/lib/context/directory/handlers/clientGrants.js +78 -24
- package/lib/context/directory/handlers/clients.js +20 -3
- package/lib/context/directory/handlers/connections.js +19 -5
- package/lib/context/directory/handlers/databases.js +2 -4
- package/lib/context/directory/handlers/emailTemplates.js +5 -0
- package/lib/context/directory/handlers/guardianEmailFactorSettings.d.ts +5 -0
- package/lib/context/directory/handlers/guardianEmailFactorSettings.js +38 -0
- package/lib/context/directory/handlers/guardianPhoneFactorSettings.d.ts +5 -0
- package/lib/context/directory/handlers/guardianPhoneFactorSettings.js +38 -0
- package/lib/context/directory/handlers/guardianSettings.d.ts +5 -0
- package/lib/context/directory/handlers/guardianSettings.js +38 -0
- package/lib/context/directory/handlers/hooks.js +8 -1
- package/lib/context/directory/handlers/index.js +12 -0
- package/lib/context/directory/handlers/networkACLKeys.d.ts +6 -0
- package/lib/context/directory/handlers/networkACLKeys.js +54 -0
- package/lib/context/directory/handlers/prompts.js +7 -3
- package/lib/context/directory/handlers/rateLimitPolicies.d.ts +6 -0
- package/lib/context/directory/handlers/rateLimitPolicies.js +53 -0
- package/lib/context/directory/handlers/rules.js +8 -1
- package/lib/context/directory/index.js +4 -7
- package/lib/context/index.js +31 -31
- package/lib/context/yaml/handlers/attackProtection.js +1 -1
- package/lib/context/yaml/handlers/branding.js +4 -1
- package/lib/context/yaml/handlers/clientAuthCredentials.d.ts +5 -0
- package/lib/context/yaml/handlers/clientAuthCredentials.js +13 -0
- package/lib/context/yaml/handlers/clients.js +19 -1
- package/lib/context/yaml/handlers/connections.js +8 -1
- package/lib/context/yaml/handlers/flows.js +3 -0
- package/lib/context/yaml/handlers/forms.js +3 -0
- package/lib/context/yaml/handlers/guardianEmailFactorSettings.d.ts +5 -0
- package/lib/context/yaml/handlers/guardianEmailFactorSettings.js +15 -0
- package/lib/context/yaml/handlers/guardianPhoneFactorSettings.d.ts +5 -0
- package/lib/context/yaml/handlers/guardianPhoneFactorSettings.js +15 -0
- package/lib/context/yaml/handlers/guardianSettings.d.ts +5 -0
- package/lib/context/yaml/handlers/guardianSettings.js +15 -0
- package/lib/context/yaml/handlers/index.js +12 -0
- package/lib/context/yaml/handlers/networkACLKeys.d.ts +6 -0
- package/lib/context/yaml/handlers/networkACLKeys.js +42 -0
- package/lib/context/yaml/handlers/prompts.js +3 -1
- package/lib/context/yaml/handlers/rateLimitPolicies.d.ts +6 -0
- package/lib/context/yaml/handlers/rateLimitPolicies.js +27 -0
- package/lib/context/yaml/index.js +3 -5
- package/lib/keywordPreservation.d.ts +1 -1
- package/lib/keywordPreservation.js +2 -1
- package/lib/readonly.js +5 -0
- package/lib/tools/auth0/handlers/attackProtection.js +19 -6
- package/lib/tools/auth0/handlers/clientAuthCredentials.d.ts +27 -0
- package/lib/tools/auth0/handlers/clientAuthCredentials.js +234 -0
- package/lib/tools/auth0/handlers/clientAuthCredentialsPre.d.ts +38 -0
- package/lib/tools/auth0/handlers/clientAuthCredentialsPre.js +123 -0
- package/lib/tools/auth0/handlers/clientGrants.d.ts +1 -1
- package/lib/tools/auth0/handlers/clients.d.ts +106 -0
- package/lib/tools/auth0/handlers/clients.js +206 -2
- package/lib/tools/auth0/handlers/connectionProfiles.d.ts +27 -0
- package/lib/tools/auth0/handlers/connectionProfiles.js +30 -0
- package/lib/tools/auth0/handlers/connections.d.ts +32 -6
- package/lib/tools/auth0/handlers/connections.js +49 -7
- package/lib/tools/auth0/handlers/databases.d.ts +28 -0
- package/lib/tools/auth0/handlers/databases.js +58 -24
- package/lib/tools/auth0/handlers/default.d.ts +23 -0
- package/lib/tools/auth0/handlers/default.js +47 -29
- package/lib/tools/auth0/handlers/eventStreams.js +10 -2
- package/lib/tools/auth0/handlers/guardianEmailFactorSettings.d.ts +22 -0
- package/lib/tools/auth0/handlers/guardianEmailFactorSettings.js +77 -0
- package/lib/tools/auth0/handlers/guardianFactorTemplates.js +13 -4
- package/lib/tools/auth0/handlers/guardianPhoneFactorMessageTypes.js +11 -9
- package/lib/tools/auth0/handlers/guardianPhoneFactorSelectedProvider.js +11 -9
- package/lib/tools/auth0/handlers/guardianPhoneFactorSettings.d.ts +22 -0
- package/lib/tools/auth0/handlers/guardianPhoneFactorSettings.js +77 -0
- package/lib/tools/auth0/handlers/guardianPolicies.js +11 -1
- package/lib/tools/auth0/handlers/guardianSettings.d.ts +30 -0
- package/lib/tools/auth0/handlers/guardianSettings.js +85 -0
- package/lib/tools/auth0/handlers/hooks.js +1 -1
- package/lib/tools/auth0/handlers/index.js +16 -0
- package/lib/tools/auth0/handlers/networkACLKeys.d.ts +45 -0
- package/lib/tools/auth0/handlers/networkACLKeys.js +177 -0
- package/lib/tools/auth0/handlers/networkACLs.d.ts +132 -2
- package/lib/tools/auth0/handlers/networkACLs.js +100 -16
- package/lib/tools/auth0/handlers/organizations.d.ts +33 -1
- package/lib/tools/auth0/handlers/organizations.js +177 -19
- package/lib/tools/auth0/handlers/phoneProvider.js +10 -2
- package/lib/tools/auth0/handlers/phoneTemplates.d.ts +4 -1
- package/lib/tools/auth0/handlers/phoneTemplates.js +67 -10
- package/lib/tools/auth0/handlers/prompts.js +1 -1
- package/lib/tools/auth0/handlers/rateLimitPolicies.d.ts +81 -0
- package/lib/tools/auth0/handlers/rateLimitPolicies.js +203 -0
- package/lib/tools/auth0/handlers/resourceServers.d.ts +44 -0
- package/lib/tools/auth0/handlers/resourceServers.js +44 -0
- package/lib/tools/auth0/handlers/riskAssessment.d.ts +1 -1
- package/lib/tools/auth0/handlers/riskAssessment.js +19 -1
- package/lib/tools/auth0/handlers/roles.d.ts +4 -0
- package/lib/tools/auth0/handlers/roles.js +10 -0
- package/lib/tools/auth0/handlers/rules.js +19 -7
- package/lib/tools/auth0/handlers/tenant.d.ts +45 -0
- package/lib/tools/auth0/handlers/tenant.js +48 -0
- package/lib/tools/auth0/handlers/themes.d.ts +37 -1
- package/lib/tools/auth0/handlers/themes.js +64 -0
- package/lib/tools/auth0/handlers/tokenExchangeProfiles.js +3 -1
- package/lib/tools/auth0/index.js +12 -6
- package/lib/tools/calculateDryRunChanges.js +12 -8
- package/lib/tools/constants.d.ts +2 -0
- package/lib/tools/constants.js +3 -0
- package/lib/tools/utils.d.ts +3 -0
- package/lib/tools/utils.js +41 -2
- package/lib/types.d.ts +9 -1
- package/lib/utils.d.ts +6 -0
- package/lib/utils.js +17 -2
- package/package.json +2 -2
- package/references/code-style.md +133 -0
- package/references/commands.md +98 -0
- package/references/docs-update.md +34 -0
- package/references/git-workflow.md +135 -0
- package/references/pitfalls.md +62 -0
- package/references/testing.md +118 -0
package/AGENTS.md
CHANGED
|
@@ -1,358 +1,3 @@
|
|
|
1
|
-
#
|
|
1
|
+
# AI Agent Guidelines for auth0-deploy-cli
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
The Auth0 Deploy CLI is a TypeScript-based tool for managing Auth0 tenant configurations through bidirectional sync (export/import) operations. It supports both YAML and directory formats with dynamic keyword replacement for multi-environment workflows.
|
|
6
|
-
|
|
7
|
-
**Key Capabilities:**
|
|
8
|
-
|
|
9
|
-
- Export Auth0 tenant configurations to local files (YAML or directory structure)
|
|
10
|
-
- Import configurations from local files to Auth0 tenants
|
|
11
|
-
- Keyword replacement for multi-environment deployments
|
|
12
|
-
- Resource-specific handlers for 30+ Auth0 resource types
|
|
13
|
-
|
|
14
|
-
## Setup Commands
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
# Install dependencies
|
|
18
|
-
npm install
|
|
19
|
-
|
|
20
|
-
# Build TypeScript to JavaScript
|
|
21
|
-
npm run build
|
|
22
|
-
|
|
23
|
-
# Build in watch mode during development
|
|
24
|
-
npm run dev
|
|
25
|
-
|
|
26
|
-
# Run unit tests
|
|
27
|
-
npm test
|
|
28
|
-
|
|
29
|
-
# Run E2E tests (requires Auth0 tenant)
|
|
30
|
-
npm run test:e2e:node-module
|
|
31
|
-
npm run test:e2e:cli
|
|
32
|
-
|
|
33
|
-
# Run linter
|
|
34
|
-
npm run lint
|
|
35
|
-
```
|
|
36
|
-
|
|
37
|
-
## Development Workflow
|
|
38
|
-
|
|
39
|
-
### Local Development Commands
|
|
40
|
-
|
|
41
|
-
Common operations for working with the CLI:
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
# Export tenant configuration to local/
|
|
45
|
-
npm run build && node lib/index.js export -c config-dev.json -f directory -o ./local/
|
|
46
|
-
|
|
47
|
-
# Import configuration
|
|
48
|
-
npm run build && node lib/index.js import -c config-dev.json -i ./local/tenant.json
|
|
49
|
-
|
|
50
|
-
# Export as YAML
|
|
51
|
-
npm run build && node lib/index.js export -c config-dev.json -f yaml -o ./local-export/
|
|
52
|
-
|
|
53
|
-
# Import from YAML
|
|
54
|
-
npm run build && node lib/index.js import -c config-dev.json -i ./local-export/tenant.yaml
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
### Build Process
|
|
58
|
-
|
|
59
|
-
- Source TypeScript files live in `src/`
|
|
60
|
-
- Compiled JavaScript output goes to `lib/` (published to npm)
|
|
61
|
-
- Always run `npm run build` before testing CLI changes
|
|
62
|
-
- Use `npm run dev` for watch mode during active development
|
|
63
|
-
|
|
64
|
-
### File Structure
|
|
65
|
-
|
|
66
|
-
```text
|
|
67
|
-
src/ # TypeScript source
|
|
68
|
-
├── index.ts # CLI entry point
|
|
69
|
-
├── commands/ # import.ts, export.ts
|
|
70
|
-
├── tools/ # Core logic (deploy.ts, calculateChanges.ts)
|
|
71
|
-
│ └── auth0/ # Auth0 API integration
|
|
72
|
-
│ ├── handlers/ # 30+ resource-specific handlers
|
|
73
|
-
│ └── schema/ # JSON validation schemas
|
|
74
|
-
└── context/ # Format parsers (yaml/, directory/)
|
|
75
|
-
|
|
76
|
-
test/ # Test suite mirrors src/
|
|
77
|
-
├── tools/auth0/handlers/ # Handler unit tests
|
|
78
|
-
├── context/ # Context parser tests
|
|
79
|
-
└── e2e/ # End-to-end tests
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
## Code Style & Conventions
|
|
83
|
-
|
|
84
|
-
### TypeScript Standards
|
|
85
|
-
|
|
86
|
-
- Use strict TypeScript configuration (`tsconfig.json`)
|
|
87
|
-
- Define types in `src/types.ts` for shared interfaces
|
|
88
|
-
- Follow existing patterns for handler implementations
|
|
89
|
-
- Use proper async/await patterns, avoid callbacks
|
|
90
|
-
|
|
91
|
-
### Handler Implementation Pattern
|
|
92
|
-
|
|
93
|
-
Every resource handler in `src/tools/auth0/handlers/` must implement:
|
|
94
|
-
|
|
95
|
-
```typescript
|
|
96
|
-
class ResourceHandler {
|
|
97
|
-
validate(); // Schema validation using AJV
|
|
98
|
-
processChanges(); // CRUD operations with API calls
|
|
99
|
-
calcChanges(); // Determine create/update/delete ops
|
|
100
|
-
dump(); // Format for export
|
|
101
|
-
getType(); // Fetch from Auth0 API
|
|
102
|
-
}
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
### Configuration Management
|
|
106
|
-
|
|
107
|
-
- All environment variables prefixed with `AUTH0_`
|
|
108
|
-
- Config priority: CLI args → env vars → config files → defaults
|
|
109
|
-
- Support both direct values and JSON serialization for complex types
|
|
110
|
-
|
|
111
|
-
### Error Handling
|
|
112
|
-
|
|
113
|
-
- Use `ValidationError` class from `src/tools/validationError.ts`
|
|
114
|
-
- Provide clear, actionable error messages
|
|
115
|
-
- Preserve context when bubbling errors up
|
|
116
|
-
- Validate early before making API calls
|
|
117
|
-
|
|
118
|
-
## Testing Instructions
|
|
119
|
-
|
|
120
|
-
### Running Tests
|
|
121
|
-
|
|
122
|
-
```bash
|
|
123
|
-
# Unit tests only (fast)
|
|
124
|
-
npm test
|
|
125
|
-
|
|
126
|
-
# E2E tests as node module
|
|
127
|
-
npm run test:e2e:node-module
|
|
128
|
-
|
|
129
|
-
# E2E tests as CLI (requires real tenant credentials)
|
|
130
|
-
npm run test:e2e:cli
|
|
131
|
-
```
|
|
132
|
-
|
|
133
|
-
### Test Structure
|
|
134
|
-
|
|
135
|
-
- Unit tests mirror `src/` directory structure in `test/`
|
|
136
|
-
- Use `.test.js` or `.test.ts` extensions
|
|
137
|
-
- Handler tests use sinon stubs for Auth0 clients
|
|
138
|
-
- Context tests use temporary directories with fixtures
|
|
139
|
-
- E2E tests require real Auth0 tenant (configured via env vars)
|
|
140
|
-
|
|
141
|
-
### Writing Handler Tests
|
|
142
|
-
|
|
143
|
-
Pattern for testing resource handlers:
|
|
144
|
-
|
|
145
|
-
```javascript
|
|
146
|
-
const mockClient = {
|
|
147
|
-
resource: {
|
|
148
|
-
getAll: sinon.stub(),
|
|
149
|
-
create: sinon.stub(),
|
|
150
|
-
update: sinon.stub(),
|
|
151
|
-
delete: sinon.stub(),
|
|
152
|
-
},
|
|
153
|
-
};
|
|
154
|
-
|
|
155
|
-
const mockConfig = (key) => {
|
|
156
|
-
const config = {
|
|
157
|
-
AUTH0_ALLOW_DELETE: true,
|
|
158
|
-
AUTH0_EXCLUDED: [],
|
|
159
|
-
};
|
|
160
|
-
return config[key];
|
|
161
|
-
};
|
|
162
|
-
```
|
|
163
|
-
|
|
164
|
-
### Test Coverage Requirements
|
|
165
|
-
|
|
166
|
-
- Add tests for any new handlers or features
|
|
167
|
-
- Test both success and error paths
|
|
168
|
-
- Check resource identifier mapping logic
|
|
169
|
-
- Test keyword replacement in context parsers
|
|
170
|
-
|
|
171
|
-
### Running Specific Tests
|
|
172
|
-
|
|
173
|
-
```bash
|
|
174
|
-
# Run specific test file
|
|
175
|
-
npm test -- test/tools/auth0/handlers/clients.test.js
|
|
176
|
-
|
|
177
|
-
# Run tests matching pattern
|
|
178
|
-
npm test -- --grep "should validate clients"
|
|
179
|
-
```
|
|
180
|
-
|
|
181
|
-
## Common Development Tasks
|
|
182
|
-
|
|
183
|
-
### Adding a New Resource Handler
|
|
184
|
-
|
|
185
|
-
1. Create handler in `src/tools/auth0/handlers/<resource>.ts`
|
|
186
|
-
2. Implement all required methods (validate, processChanges, dump, etc.)
|
|
187
|
-
3. Add resource type to `src/tools/constants.ts`
|
|
188
|
-
4. Create JSON schema in `src/tools/auth0/schema/`
|
|
189
|
-
5. Write unit tests in `test/tools/auth0/handlers/<resource>.test.js`
|
|
190
|
-
6. Add E2E test coverage if applicable
|
|
191
|
-
7. Update documentation in `docs/resource-specific-documentation.md`
|
|
192
|
-
|
|
193
|
-
### Working with Context Parsers
|
|
194
|
-
|
|
195
|
-
- **DirectoryContext** (`src/context/directory/`): Loads nested JSON files
|
|
196
|
-
- **YAMLContext** (`src/context/yaml/`): Parses single YAML file
|
|
197
|
-
- Both support keyword patterns: `@@KEY@@` (JSON-stringified) and `##KEY##` (literal)
|
|
198
|
-
- Test with fixtures in `test/context/{directory,yaml}/`
|
|
199
|
-
|
|
200
|
-
### Configuration Testing
|
|
201
|
-
|
|
202
|
-
- Mock config functions return expected values for each key
|
|
203
|
-
- Test resource exclusion with `AUTH0_EXCLUDED` and `AUTH0_EXCLUDED_*` patterns
|
|
204
|
-
- Test property exclusion with `EXCLUDED_PROPS` and `INCLUDED_PROPS`
|
|
205
|
-
- Verify keyword replacement mappings work correctly
|
|
206
|
-
|
|
207
|
-
## Pull Request Guidelines
|
|
208
|
-
|
|
209
|
-
### Before Committing
|
|
210
|
-
|
|
211
|
-
```bash
|
|
212
|
-
# Always run before commit
|
|
213
|
-
npm run build
|
|
214
|
-
npm test
|
|
215
|
-
npm run lint
|
|
216
|
-
```
|
|
217
|
-
|
|
218
|
-
### PR Checklist
|
|
219
|
-
|
|
220
|
-
- [ ] All tests pass locally
|
|
221
|
-
- [ ] New code has corresponding tests
|
|
222
|
-
- [ ] TypeScript compiles without errors
|
|
223
|
-
- [ ] Updated relevant documentation in `docs/`
|
|
224
|
-
- [ ] Added entry to `CHANGELOG.md` if user-facing change
|
|
225
|
-
- [ ] Tested with both YAML and directory formats if applicable
|
|
226
|
-
- [ ] Checked backward compatibility
|
|
227
|
-
|
|
228
|
-
### Checklist for Every Feature or Fix
|
|
229
|
-
|
|
230
|
-
#### Completion
|
|
231
|
-
|
|
232
|
-
- [ ] Change is complete and matches the intended feature or fix
|
|
233
|
-
- [ ] TypeScript compiles and tests pass locally
|
|
234
|
-
|
|
235
|
-
#### Format and behavior
|
|
236
|
-
|
|
237
|
-
- [ ] Works for both YAML and directory flows when the resource supports both
|
|
238
|
-
- [ ] Keyword preservation still works as expected
|
|
239
|
-
- [ ] Sorted-key output stays stable; no unintended order changes were introduced
|
|
240
|
-
- [ ] Exported configs do not rely on IDs by default; resources should link by names where possible
|
|
241
|
-
|
|
242
|
-
#### Safety and compatibility
|
|
243
|
-
|
|
244
|
-
- [ ] Dry-run output is correct and non-destructive
|
|
245
|
-
- [ ] Unit tests cover the changed path and any important edge cases
|
|
246
|
-
- [ ] Backward compatibility was checked and no existing behavior was unintentionally broken
|
|
247
|
-
|
|
248
|
-
### Commit Message Format
|
|
249
|
-
|
|
250
|
-
Follow conventional commits style:
|
|
251
|
-
|
|
252
|
-
- `feat: add support for new resource type`
|
|
253
|
-
- `fix: resolve table formatting issue`
|
|
254
|
-
- `docs: update handler implementation guide`
|
|
255
|
-
- `test: add coverage for keyword replacement`
|
|
256
|
-
- `refactor: simplify change calculation logic`
|
|
257
|
-
|
|
258
|
-
## Security Considerations
|
|
259
|
-
|
|
260
|
-
### API Credentials
|
|
261
|
-
|
|
262
|
-
- Never commit Auth0 credentials or API keys
|
|
263
|
-
- Config files with credentials should be gitignored
|
|
264
|
-
- Use environment variables for sensitive data
|
|
265
|
-
- Example configs use `.json.example` suffix
|
|
266
|
-
|
|
267
|
-
### Validation & Safety
|
|
268
|
-
|
|
269
|
-
- All resources validated against JSON schemas before processing
|
|
270
|
-
- Delete operations require explicit `AUTH0_ALLOW_DELETE=true`
|
|
271
|
-
- Resource identifiers properly sanitized before API calls
|
|
272
|
-
|
|
273
|
-
### Testing with Real Tenants
|
|
274
|
-
|
|
275
|
-
- Use dedicated development tenants for E2E tests
|
|
276
|
-
- Never run E2E tests against production tenants
|
|
277
|
-
- Credentials stored in environment variables only
|
|
278
|
-
- Clean up test resources after test runs
|
|
279
|
-
|
|
280
|
-
## Debugging Tips
|
|
281
|
-
|
|
282
|
-
### Enable Debug Logging
|
|
283
|
-
|
|
284
|
-
```bash
|
|
285
|
-
export AUTH0_DEBUG=true
|
|
286
|
-
npm run build && node lib/index.js import -c config.json
|
|
287
|
-
```
|
|
288
|
-
|
|
289
|
-
### Common Issues
|
|
290
|
-
|
|
291
|
-
- **Build errors**: Check `tsconfig.json` and ensure all imports resolve
|
|
292
|
-
- **Handler not found**: Verify resource added to `src/tools/constants.ts`
|
|
293
|
-
- **Schema validation fails**: Check JSON schema in `src/tools/auth0/schema/`
|
|
294
|
-
- **Keyword replacement not working**: Verify mappings in config and context parser
|
|
295
|
-
|
|
296
|
-
### Useful Commands
|
|
297
|
-
|
|
298
|
-
```bash
|
|
299
|
-
# Check compiled output
|
|
300
|
-
cat lib/index.js
|
|
301
|
-
|
|
302
|
-
# Test CLI directly
|
|
303
|
-
node lib/index.js export -c config.json --output_folder ./test-output
|
|
304
|
-
|
|
305
|
-
# Run with verbose errors
|
|
306
|
-
NODE_ENV=development npm test
|
|
307
|
-
|
|
308
|
-
# Check Auth0 API pagination
|
|
309
|
-
AUTH0_DEBUG=true npm run test:e2e:node-module
|
|
310
|
-
```
|
|
311
|
-
|
|
312
|
-
## Architecture Notes
|
|
313
|
-
|
|
314
|
-
### Request Flow
|
|
315
|
-
|
|
316
|
-
1. **CLI Entry** (`src/index.ts`) → Command routing
|
|
317
|
-
2. **Commands** (`src/commands/import.ts`) → Load config and context
|
|
318
|
-
3. **Deploy** (`src/tools/deploy.ts`) → Orchestrate deployment
|
|
319
|
-
4. **Handlers** (`src/tools/auth0/handlers/*`) → Resource-specific logic
|
|
320
|
-
5. **Auth0 Client** (`src/tools/auth0/client.ts`) → Management API calls
|
|
321
|
-
|
|
322
|
-
### Change Calculation
|
|
323
|
-
|
|
324
|
-
- Compare local assets (from YAML/directory) with remote state (from API)
|
|
325
|
-
- Use resource identifiers (name, id, etc.) to match resources
|
|
326
|
-
- Determine CREATE (new), UPDATE (changed), DELETE (removed) operations
|
|
327
|
-
- Respect exclusion patterns and allow-delete config
|
|
328
|
-
|
|
329
|
-
## Additional Resources
|
|
330
|
-
|
|
331
|
-
- **Full documentation**: See `docs/` directory
|
|
332
|
-
- **Examples**: Check `examples/yaml/` and `examples/directory/`
|
|
333
|
-
- **Contributing**: Read `CONTRIBUTING.md`
|
|
334
|
-
- **Migration guide**: See `docs/v8_MIGRATION_GUIDE.md`
|
|
335
|
-
- **Issue templates**: `.github/ISSUE_TEMPLATE/`
|
|
336
|
-
|
|
337
|
-
## Quick Reference
|
|
338
|
-
|
|
339
|
-
### Environment Variables
|
|
340
|
-
|
|
341
|
-
```bash
|
|
342
|
-
AUTH0_DOMAIN # Tenant domain
|
|
343
|
-
AUTH0_CLIENT_ID # Client ID
|
|
344
|
-
AUTH0_CLIENT_SECRET # Client secret
|
|
345
|
-
AUTH0_ALLOW_DELETE=true # Enable deletions
|
|
346
|
-
AUTH0_KEYWORD_REPLACE_MAPPINGS # JSON mapping for replacements
|
|
347
|
-
AUTH0_EXCLUDED # Array of resources to exclude
|
|
348
|
-
AUTH0_DEBUG=true # Verbose logging
|
|
349
|
-
```
|
|
350
|
-
|
|
351
|
-
### Key Files to Know
|
|
352
|
-
|
|
353
|
-
- `src/tools/deploy.ts` - Main deployment orchestrator
|
|
354
|
-
- `src/tools/calculateChanges.ts` - Change detection logic
|
|
355
|
-
- `src/tools/constants.ts` - Supported resource types
|
|
356
|
-
- `src/configFactory.ts` - Configuration management
|
|
357
|
-
- `src/types.ts` - TypeScript type definitions
|
|
358
|
-
- `test/utils.js` - Test helper functions
|
|
3
|
+
@./CLAUDE.md for all coding guidelines, commands, project structure, code style, testing conventions, and boundaries.
|
package/CHANGELOG.md
CHANGED
|
@@ -7,11 +7,112 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
7
7
|
|
|
8
8
|
## [Unreleased]
|
|
9
9
|
|
|
10
|
-
## [9.0.0
|
|
10
|
+
## [9.0.0] - 2026-09-18
|
|
11
11
|
|
|
12
|
-
###
|
|
12
|
+
### Changed
|
|
13
|
+
|
|
14
|
+
- **⚠️ Breaking changes:**
|
|
15
|
+
- **Config file handlers (import): path traversal is now a hard error.** A file reference that resolves outside the config directory now aborts the import with an error instead of logging a deprecation warning (the warning shipped in 8.43.0 and 8.44.0). This applies to every file-backed field in both directory and YAML formats: action `code`, rule/hook `script`, database `customScripts`, client `custom_login_page`, connection/email-template/branding `body`, prompt partials, and flow/form bodies. Move any out-of-tree references (`../` relative paths or absolute paths) inside your config directory. Blocked references fail with `Path traversal blocked: "<input>" resolves to "<resolved>" which is outside the config directory "<root>".` before any Management API call. `a0deploy export` is unaffected. [#1498]
|
|
16
|
+
- **`AUTH0_DOMAIN` environment variable: must now be a bare host.** The `node-auth0` v7 upgrade validates the domain more strictly and rejects values that include a scheme or a trailing slash (for example `https://tenant.auth0.com/`); use a bare host such as `tenant.us.auth0.com`. This Management-API-only release also moves token acquisition to the SDK's managed auth, which auto-refreshes tokens during long-running import/export runs while preserving the previous fail-fast behavior on bad credentials. See the [node-auth0 v7 migration guide](https://github.com/auth0/node-auth0/blob/master/v7_MIGRATION_GUIDE.md). [#1491]
|
|
17
|
+
|
|
18
|
+
### Added
|
|
19
|
+
|
|
20
|
+
- Add handlers for MFA advanced factor configuration (phone/email OTP and Guardian settings). [#1497]
|
|
21
|
+
- Add support for the `post-credential-validation` action trigger. [#1494]
|
|
22
|
+
- Add anonymous sessions support to tenant, clients, and resource servers. [#1496]
|
|
23
|
+
- Support `enforce_permission_ceiling` and `enforce_self_assignment_restriction` on `my_organization_configuration` (EA). [#1495]
|
|
24
|
+
- Support tenants without the `riskAssessment` and `guardianPolicies` entitlement by handling `insufficient_entitlement` 403 responses gracefully instead of failing the run. [#1493]
|
|
25
|
+
|
|
26
|
+
### Fixed
|
|
27
|
+
|
|
28
|
+
- Surface the real API error on `tokenExchangeProfiles` 403 responses. [#1492]
|
|
29
|
+
- Honor `kid` and other credential fields on `private_key_jwt`/mTLS credential creation. [#1489]
|
|
30
|
+
- Apply `AUTH0_INCLUDED_CONNECTIONS` on export. [#1442]
|
|
31
|
+
- Prevent client grant loss and duplication in directory-format exports. [#1473]
|
|
32
|
+
|
|
33
|
+
## [8.45.0] - 2026-09-09
|
|
34
|
+
|
|
35
|
+
### Added
|
|
36
|
+
|
|
37
|
+
- Support `b2b_integration_configuration` for Enterprise Connect (EA). [#1486]
|
|
38
|
+
- Add `networkACLKeys` handler for HMAC signature key management. [#1480]
|
|
39
|
+
- Support `match_all` in network ACL rules for unconditional block/allow. [#1483]
|
|
40
|
+
- Add `otp_settings` support for database connections. [#1481]
|
|
41
|
+
|
|
42
|
+
### Fixed
|
|
43
|
+
|
|
44
|
+
- Prevent export crash when a handler has no identifiers during keyword preservation. [#1487]
|
|
45
|
+
- Catch `feature_not_enabled` via `err.body.errorCode` and 400 status in organizations handler. [#1482]
|
|
46
|
+
- Prevent false `enabled_clients` diff in database dry-run. [#1479]
|
|
47
|
+
|
|
48
|
+
## [8.44.0] - 2026-08-26
|
|
49
|
+
|
|
50
|
+
### Added
|
|
51
|
+
|
|
52
|
+
- Support `third_party_client_access` and `cross_app_access_resource_app` on clients and connections. [#1471]
|
|
53
|
+
|
|
54
|
+
### Fixed
|
|
55
|
+
|
|
56
|
+
- Warn on path traversal in file references and fix double-path resolution in YAML connections handler. [#1477]
|
|
57
|
+
- Strip `form_submission_mode` and `form_submission_behavior` from `bruteForceProtection` on export and import. [#1476]
|
|
58
|
+
- Include empty credentials for custom phone provider on import and export to prevent 400 errors. [#1474]
|
|
59
|
+
- Preserve keyword placeholder strings for all email provider credentials. [#1470]
|
|
60
|
+
- Preserve `idpinitiated.enabled:false` on SAML connection export instead of emitting `undefined_clientId`. [#1465]
|
|
61
|
+
- Apply 429 backoff to organization connection writes to prevent rate-limit failures. [#1464]
|
|
62
|
+
- Resolve dry-run reporting bugs across multiple asset types. [#1462]
|
|
63
|
+
- Skip organization PATCH when no top-level properties have changed. [#1461]
|
|
64
|
+
- Sort `attackProtection` arrays on export to prevent spurious diffs. [#1460]
|
|
65
|
+
|
|
66
|
+
## [8.43.0] - 2026-08-12
|
|
67
|
+
|
|
68
|
+
### Added
|
|
69
|
+
|
|
70
|
+
- Add org-to-app entitlement (EA) support for organizations. [#1454]
|
|
71
|
+
- Support full group metadata for Google Workspace directory sync (GA). [#1456]
|
|
72
|
+
|
|
73
|
+
### Fixed
|
|
74
|
+
|
|
75
|
+
- Create phone templates on import instead of skipping when they have no ID. [#1457]
|
|
76
|
+
- Address path traversal vulnerability and false warnings in config file handlers. [#1449]
|
|
77
|
+
- Exclude org-scoped roles from tenant export by filtering `type='tenant'`. [#1453]
|
|
78
|
+
- Strip read-only field from roles to fix export/import round-trip. [#1445]
|
|
79
|
+
|
|
80
|
+
## [8.42.0] - 2026-07-30
|
|
81
|
+
|
|
82
|
+
### Added
|
|
83
|
+
|
|
84
|
+
- Add UL identifier input support for themes and tenant settings. [#1433]
|
|
85
|
+
- Add `token_vault_privileged_access` support for clients. [#1430]
|
|
86
|
+
- Add `auth0_managed` field support for network ACLs (Curated Blocklists - EA). [#1435]
|
|
87
|
+
- Add Cross App Access (XAA) resource app support for connections and clients. [#1431]
|
|
88
|
+
- Add `cross_app_access_requesting_app` support for connections (EA). [#1422]
|
|
89
|
+
|
|
90
|
+
### Fixed
|
|
91
|
+
|
|
92
|
+
- Prevent dry-run crash on `clientAuthCredentials` handler. [#1438]
|
|
93
|
+
- Resolve spurious dry-run diffs for rules, themes, and hooks. [#1437]
|
|
94
|
+
- Strip unresolved placeholders on deploy instead of throwing. [#1436]
|
|
95
|
+
- Handle 403 entitlement errors for bot detection and captcha on export. [#1434]
|
|
96
|
+
- Warn and skip deprecated guardian phone provider on 403 during import. [#1429]
|
|
97
|
+
- Add `use_scope_descriptions_for_consent` to allowed tenant flags. [#1428]
|
|
98
|
+
|
|
99
|
+
## [8.41.0] - 2026-07-16
|
|
100
|
+
|
|
101
|
+
### Added
|
|
102
|
+
|
|
103
|
+
- Add `third_party_client_access` support for organizations. [#1421]
|
|
104
|
+
|
|
105
|
+
## [8.40.0] - 2026-07-09
|
|
106
|
+
|
|
107
|
+
### Added
|
|
108
|
+
|
|
109
|
+
- Add client credential lifecycle management for Private Key JWT and mTLS authentication methods. [#1417]
|
|
110
|
+
- Add Rate Limit Policies (EA) support. [#1395]
|
|
111
|
+
|
|
112
|
+
### Fixed
|
|
13
113
|
|
|
14
|
-
-
|
|
114
|
+
- Preserve `false` value for `default_head_tags_disabled` in screen renderer update. [#1416]
|
|
115
|
+
- Skip destination update for action event streams as the destination type cannot be changed after creation. [#1425]
|
|
15
116
|
|
|
16
117
|
## [8.39.0] - 2026-06-30
|
|
17
118
|
|
|
@@ -1848,6 +1949,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
1848
1949
|
[#1389]: https://github.com/auth0/auth0-deploy-cli/issues/1389
|
|
1849
1950
|
[#1391]: https://github.com/auth0/auth0-deploy-cli/issues/1391
|
|
1850
1951
|
[#1392]: https://github.com/auth0/auth0-deploy-cli/issues/1392
|
|
1952
|
+
[#1395]: https://github.com/auth0/auth0-deploy-cli/issues/1395
|
|
1851
1953
|
[#1396]: https://github.com/auth0/auth0-deploy-cli/issues/1396
|
|
1852
1954
|
[#1398]: https://github.com/auth0/auth0-deploy-cli/issues/1398
|
|
1853
1955
|
[#1400]: https://github.com/auth0/auth0-deploy-cli/issues/1400
|
|
@@ -1860,9 +1962,63 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
|
1860
1962
|
[#1409]: https://github.com/auth0/auth0-deploy-cli/issues/1409
|
|
1861
1963
|
[#1411]: https://github.com/auth0/auth0-deploy-cli/issues/1411
|
|
1862
1964
|
[#1412]: https://github.com/auth0/auth0-deploy-cli/issues/1412
|
|
1863
|
-
[#
|
|
1864
|
-
[
|
|
1865
|
-
[
|
|
1965
|
+
[#1416]: https://github.com/auth0/auth0-deploy-cli/issues/1416
|
|
1966
|
+
[#1417]: https://github.com/auth0/auth0-deploy-cli/issues/1417
|
|
1967
|
+
[#1421]: https://github.com/auth0/auth0-deploy-cli/issues/1421
|
|
1968
|
+
[#1422]: https://github.com/auth0/auth0-deploy-cli/issues/1422
|
|
1969
|
+
[#1425]: https://github.com/auth0/auth0-deploy-cli/issues/1425
|
|
1970
|
+
[#1428]: https://github.com/auth0/auth0-deploy-cli/issues/1428
|
|
1971
|
+
[#1429]: https://github.com/auth0/auth0-deploy-cli/issues/1429
|
|
1972
|
+
[#1430]: https://github.com/auth0/auth0-deploy-cli/issues/1430
|
|
1973
|
+
[#1431]: https://github.com/auth0/auth0-deploy-cli/issues/1431
|
|
1974
|
+
[#1433]: https://github.com/auth0/auth0-deploy-cli/issues/1433
|
|
1975
|
+
[#1434]: https://github.com/auth0/auth0-deploy-cli/issues/1434
|
|
1976
|
+
[#1435]: https://github.com/auth0/auth0-deploy-cli/issues/1435
|
|
1977
|
+
[#1436]: https://github.com/auth0/auth0-deploy-cli/issues/1436
|
|
1978
|
+
[#1437]: https://github.com/auth0/auth0-deploy-cli/issues/1437
|
|
1979
|
+
[#1438]: https://github.com/auth0/auth0-deploy-cli/issues/1438
|
|
1980
|
+
[#1442]: https://github.com/auth0/auth0-deploy-cli/issues/1442
|
|
1981
|
+
[#1445]: https://github.com/auth0/auth0-deploy-cli/issues/1445
|
|
1982
|
+
[#1449]: https://github.com/auth0/auth0-deploy-cli/issues/1449
|
|
1983
|
+
[#1453]: https://github.com/auth0/auth0-deploy-cli/issues/1453
|
|
1984
|
+
[#1454]: https://github.com/auth0/auth0-deploy-cli/issues/1454
|
|
1985
|
+
[#1456]: https://github.com/auth0/auth0-deploy-cli/issues/1456
|
|
1986
|
+
[#1457]: https://github.com/auth0/auth0-deploy-cli/issues/1457
|
|
1987
|
+
[#1460]: https://github.com/auth0/auth0-deploy-cli/issues/1460
|
|
1988
|
+
[#1461]: https://github.com/auth0/auth0-deploy-cli/issues/1461
|
|
1989
|
+
[#1462]: https://github.com/auth0/auth0-deploy-cli/issues/1462
|
|
1990
|
+
[#1464]: https://github.com/auth0/auth0-deploy-cli/issues/1464
|
|
1991
|
+
[#1465]: https://github.com/auth0/auth0-deploy-cli/issues/1465
|
|
1992
|
+
[#1470]: https://github.com/auth0/auth0-deploy-cli/issues/1470
|
|
1993
|
+
[#1471]: https://github.com/auth0/auth0-deploy-cli/issues/1471
|
|
1994
|
+
[#1473]: https://github.com/auth0/auth0-deploy-cli/issues/1473
|
|
1995
|
+
[#1474]: https://github.com/auth0/auth0-deploy-cli/issues/1474
|
|
1996
|
+
[#1476]: https://github.com/auth0/auth0-deploy-cli/issues/1476
|
|
1997
|
+
[#1477]: https://github.com/auth0/auth0-deploy-cli/issues/1477
|
|
1998
|
+
[#1479]: https://github.com/auth0/auth0-deploy-cli/issues/1479
|
|
1999
|
+
[#1480]: https://github.com/auth0/auth0-deploy-cli/issues/1480
|
|
2000
|
+
[#1481]: https://github.com/auth0/auth0-deploy-cli/issues/1481
|
|
2001
|
+
[#1482]: https://github.com/auth0/auth0-deploy-cli/issues/1482
|
|
2002
|
+
[#1483]: https://github.com/auth0/auth0-deploy-cli/issues/1483
|
|
2003
|
+
[#1486]: https://github.com/auth0/auth0-deploy-cli/issues/1486
|
|
2004
|
+
[#1487]: https://github.com/auth0/auth0-deploy-cli/issues/1487
|
|
2005
|
+
[#1489]: https://github.com/auth0/auth0-deploy-cli/issues/1489
|
|
2006
|
+
[#1491]: https://github.com/auth0/auth0-deploy-cli/issues/1491
|
|
2007
|
+
[#1492]: https://github.com/auth0/auth0-deploy-cli/issues/1492
|
|
2008
|
+
[#1493]: https://github.com/auth0/auth0-deploy-cli/issues/1493
|
|
2009
|
+
[#1494]: https://github.com/auth0/auth0-deploy-cli/issues/1494
|
|
2010
|
+
[#1495]: https://github.com/auth0/auth0-deploy-cli/issues/1495
|
|
2011
|
+
[#1496]: https://github.com/auth0/auth0-deploy-cli/issues/1496
|
|
2012
|
+
[#1497]: https://github.com/auth0/auth0-deploy-cli/issues/1497
|
|
2013
|
+
[#1498]: https://github.com/auth0/auth0-deploy-cli/issues/1498
|
|
2014
|
+
[Unreleased]: https://github.com/auth0/auth0-deploy-cli/compare/v9.0.0...HEAD
|
|
2015
|
+
[9.0.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.45.0...v9.0.0
|
|
2016
|
+
[8.45.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.44.0...v8.45.0
|
|
2017
|
+
[8.44.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.43.0...v8.44.0
|
|
2018
|
+
[8.43.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.42.0...v8.43.0
|
|
2019
|
+
[8.42.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.41.0...v8.42.0
|
|
2020
|
+
[8.41.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.40.0...v8.41.0
|
|
2021
|
+
[8.40.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.39.0...v8.40.0
|
|
1866
2022
|
[8.39.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.38.0...v8.39.0
|
|
1867
2023
|
[8.38.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.37.0...v8.38.0
|
|
1868
2024
|
[8.37.0]: https://github.com/auth0/auth0-deploy-cli/compare/v8.36.0...v8.37.0
|