sf-plugin-permission-sets 0.0.0-dev.10 → 0.0.0-dev.11
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/README.md +29 -73
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -19,7 +19,6 @@ Stop clicking through Setup to grant access. Commit a YAML file, open a PR, let
|
|
|
19
19
|
- [Validations](#validations)
|
|
20
20
|
- [Modes](#modes)
|
|
21
21
|
- [Commands](#commands)
|
|
22
|
-
- [CI/CD](#cicd)
|
|
23
22
|
- [Inspiration & equivalents](#inspiration--equivalents)
|
|
24
23
|
- [Versioning](#versioning)
|
|
25
24
|
|
|
@@ -27,7 +26,7 @@ Stop clicking through Setup to grant access. Commit a YAML file, open a PR, let
|
|
|
27
26
|
|
|
28
27
|
## Why
|
|
29
28
|
|
|
30
|
-
Permission set assignments drift. People get access for a project and keep it forever. Offboarding misses a set. Nobody can answer "who can see X and why?" without a SOQL spelunking session.
|
|
29
|
+
Permission set assignments drift. People get access for a project and keep it forever. Offboarding misses a set. Nobody can answer "who can see X and why?" without a SOQL spelunking session. And in higher environments those grants happen by hand in Setup, with no review and no trail.
|
|
31
30
|
|
|
32
31
|
This plugin makes the desired state **declarative and reviewable**:
|
|
33
32
|
|
|
@@ -36,6 +35,8 @@ This plugin makes the desired state **declarative and reviewable**:
|
|
|
36
35
|
- ✅ **Safe by default:** deletions are opt-in and guarded by a delete threshold.
|
|
37
36
|
- ✅ **CI-native:** fully offline `check`, exit codes for gating, and `--json` on every command.
|
|
38
37
|
- ✅ **Flexible at the edges:** pick your file layout (by permission set or by user) and your sync mode.
|
|
38
|
+
- ✅ **GitOps for access, the SFDX way:** assignments live in source and ship through the same git and CI pipeline as your metadata, instead of being clicked into Setup by hand.
|
|
39
|
+
- ✅ **Fewer hands in Setup for higher environments:** because access is applied from git through CI, fewer people need direct Setup access in UAT and production, and every change is a reviewed pull request with a git audit trail.
|
|
39
40
|
|
|
40
41
|
## Install
|
|
41
42
|
|
|
@@ -202,11 +203,11 @@ FLAGS
|
|
|
202
203
|
--strict Treat warnings as errors.
|
|
203
204
|
|
|
204
205
|
CHECKS
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
206
|
+
- valid YAML & schema (unknown keys rejected)
|
|
207
|
+
- duplicate assignees / duplicate (user, target) pairs
|
|
208
|
+
- conflicting intent across files
|
|
209
|
+
- empty or malformed assignee usernames
|
|
210
|
+
- internal referential integrity
|
|
210
211
|
```
|
|
211
212
|
|
|
212
213
|
### `sf ps validate`
|
|
@@ -291,73 +292,28 @@ FLAGS
|
|
|
291
292
|
--permission-sets=<names> Comma-separated list to export (default: all assignable).
|
|
292
293
|
```
|
|
293
294
|
|
|
294
|
-
##
|
|
295
|
+
## Inspiration & equivalents
|
|
295
296
|
|
|
296
|
-
|
|
297
|
+
This plugin's command surface borrows ideas from tools you already know:
|
|
297
298
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
pull_request:
|
|
303
|
-
push:
|
|
304
|
-
branches: [main]
|
|
305
|
-
|
|
306
|
-
jobs:
|
|
307
|
-
check:
|
|
308
|
-
runs-on: ubuntu-latest
|
|
309
|
-
steps:
|
|
310
|
-
- uses: actions/checkout@v4
|
|
311
|
-
- run: npm install -g @salesforce/cli
|
|
312
|
-
- run: sf plugins install sf-plugin-permission-sets
|
|
313
|
-
- run: sf ps check --file "permissions/*.yml" --strict
|
|
314
|
-
|
|
315
|
-
plan:
|
|
316
|
-
if: github.event_name == 'pull_request'
|
|
317
|
-
needs: check
|
|
318
|
-
runs-on: ubuntu-latest
|
|
319
|
-
steps:
|
|
320
|
-
- uses: actions/checkout@v4
|
|
321
|
-
- run: npm install -g @salesforce/cli
|
|
322
|
-
- run: sf plugins install sf-plugin-permission-sets
|
|
323
|
-
# Auth via Sfdx auth URL stored in a secrets manager, never hardcode credentials
|
|
324
|
-
- run: echo "$SF_AUTH_URL" | sf org login sfdx-url --sfdx-url-stdin --alias target
|
|
325
|
-
env:
|
|
326
|
-
SF_AUTH_URL: ${{ secrets.SF_AUTH_URL }}
|
|
327
|
-
- run: sf ps plan -o target --file "permissions/*.yml" --mode sync --fail-on-drift
|
|
328
|
-
|
|
329
|
-
apply:
|
|
330
|
-
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
|
331
|
-
needs: check
|
|
332
|
-
runs-on: ubuntu-latest
|
|
333
|
-
steps:
|
|
334
|
-
- uses: actions/checkout@v4
|
|
335
|
-
- run: npm install -g @salesforce/cli
|
|
336
|
-
- run: sf plugins install sf-plugin-permission-sets
|
|
337
|
-
- run: echo "$SF_AUTH_URL" | sf org login sfdx-url --sfdx-url-stdin --alias target
|
|
338
|
-
env:
|
|
339
|
-
SF_AUTH_URL: ${{ secrets.SF_AUTH_URL }}
|
|
340
|
-
- run: sf ps apply -o target --file "permissions/*.yml" --mode sync --no-prompt --max-deletes 25
|
|
341
|
-
```
|
|
299
|
+
- [Terraform](https://developer.hashicorp.com/terraform/docs)
|
|
300
|
+
- [AWS CLI](https://docs.aws.amazon.com/cli/latest/userguide/)
|
|
301
|
+
- [AWS SAM](https://docs.aws.amazon.com/serverless-application-model/latest/developerguide/)
|
|
302
|
+
- [Salesforce CLI](https://developer.salesforce.com/docs/atlas.en-us.sfdx_cli_reference.meta/sfdx_cli_reference/cli_reference.htm)
|
|
342
303
|
|
|
343
|
-
|
|
304
|
+
## Versioning
|
|
344
305
|
|
|
345
|
-
|
|
306
|
+
Releases follow [semantic versioning](https://semver.org). Snapshots are automatic, real releases are a manual decision.
|
|
346
307
|
|
|
347
|
-
|
|
308
|
+
**Automatic, no action needed:**
|
|
348
309
|
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
| `ps check` | `terraform validate` | `sam validate --lint` | n/a |
|
|
352
|
-
| `ps validate` | `terraform plan` (refresh) | `cfn validate-template` | `project deploy validate` |
|
|
353
|
-
| `ps plan` | `terraform plan` | `cfn create-change-set` | `project deploy preview` |
|
|
354
|
-
| `ps apply` | `terraform apply` | `cfn execute-change-set` / `sam deploy` | `project deploy start` |
|
|
355
|
-
| `ps export` | `terraform import` | n/a | n/a |
|
|
356
|
-
| `--fail-on-drift` | drift in plan exit code | `cfn detect-stack-drift` | n/a |
|
|
310
|
+
- Every push to `main` publishes a snapshot `0.0.0-dev.<run>` to the `dev` dist-tag.
|
|
311
|
+
- Creating a release triggers CI to build, stamp the version from the tag, publish it with provenance, and smoke-test the result.
|
|
357
312
|
|
|
358
|
-
|
|
313
|
+
**Manual, you decide and trigger:**
|
|
359
314
|
|
|
360
|
-
|
|
315
|
+
- Choosing the version bump (patch, minor, or major).
|
|
316
|
+
- Creating the GitHub Release, which is what triggers the publish above.
|
|
361
317
|
|
|
362
318
|
| Bump | When | Example tag |
|
|
363
319
|
| --- | --- | --- |
|
|
@@ -365,19 +321,19 @@ Releases follow [semantic versioning](https://semver.org). You choose the bump b
|
|
|
365
321
|
| minor | new backward-compatible feature | `v0.2.0` |
|
|
366
322
|
| major | breaking change to a command, flag, or the YAML schema | `v1.0.0` |
|
|
367
323
|
|
|
368
|
-
| dist-tag | Source | Install |
|
|
369
|
-
| --- | --- | --- |
|
|
370
|
-
| `latest` | a GitHub Release with a normal tag like `v1.2.0` | `sf plugins install sf-plugin-permission-sets` |
|
|
371
|
-
| `next` | a Release whose tag has a hyphen, like `v1.3.0-beta.1` | `sf plugins install sf-plugin-permission-sets@next` |
|
|
372
|
-
| `dev` | every push to `main`, published as `0.0.0-dev.<run>` | `sf plugins install sf-plugin-permission-sets@dev` |
|
|
373
|
-
|
|
374
324
|
Cut a release with a tag off `main`:
|
|
375
325
|
|
|
376
326
|
```bash
|
|
377
327
|
gh release create v0.2.0 --target main --title v0.2.0 --notes "Add ps export"
|
|
378
328
|
```
|
|
379
329
|
|
|
380
|
-
|
|
330
|
+
| dist-tag | Published by | Install |
|
|
331
|
+
| --- | --- | --- |
|
|
332
|
+
| `latest` | manual release with a normal tag like `v1.2.0` | `sf plugins install sf-plugin-permission-sets` |
|
|
333
|
+
| `next` | manual release with a hyphenated tag like `v1.3.0-beta.1` | `sf plugins install sf-plugin-permission-sets@next` |
|
|
334
|
+
| `dev` | automatic on every push to `main` | `sf plugins install sf-plugin-permission-sets@dev` |
|
|
335
|
+
|
|
336
|
+
The `next` tag is selected whenever the version contains a hyphen, not by GitHub's prerelease checkbox.
|
|
381
337
|
|
|
382
338
|
## License
|
|
383
339
|
|
package/oclif.manifest.json
CHANGED