refactor(apl)!: rename authz/authn config keys #111
Open
araujof wants to merge 3 commits into
Open
Conversation
Rename the CPEX/APL config keys for clarity (breaking change): identity -> authentication (global, route, and policy-group scope) policy -> authorization.pre_invocation (or flat pre_invocation) post_policy -> authorization.post_invocation (or flat post_invocation) The two authorization phases parse equivalently whether written nested under an `authorization:` block or flat on the section. The field-pipeline keys `args:` / `result:` are intentionally left unchanged: they stay aligned with the `args.*` / `result.*` attribute namespaces that predicates and interpolation read, so renaming only the config block would have introduced a new inconsistency. Legacy `policy:` / `post_policy:` / `identity:` keys are rejected loudly at parse/load time rather than silently ignored, so a dropped authorization or authentication block can never fail open. Internal APL IR (`CompiledRoute`, `Phase`) is unchanged. Refs #105 Signed-off-by: Frederico Araujo <frederico.araujo@ibm.com>
Update every config example and field reference to the renamed keys (authentication, authorization.pre_invocation / post_invocation), show both the nested and flat authorization forms, and add a BREAKING migration entry to the changelog. The `args:` / `result:` field-pipeline keys and the `args.*` / `result.*` attribute vocabulary are unchanged. Refs #105 Signed-off-by: Frederico Araujo <frederico.araujo@ibm.com>
Replace the legacy "Attribute Policy Language" expansion with "Authorization Policy Language" across code doc-comments, the crate description, and docs, matching the README and 0.1.x overview. Refs #105 Signed-off-by: Frederico Araujo <frederico.araujo@ibm.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Renames the CPEX/APL authorization/authentication config keys for clarity. Breaking change (pre-1.0): old key names no longer parse.
identity:authentication:(global, route, policy-group)policy:authorization.pre_invocation:(or flatpre_invocation:)post_policy:authorization.post_invocation:(or flatpost_invocation:)The two authorization phases parse equivalently whether nested under an
authorization:block or written flat on the section.Closes #105.
Deliberately not renamed
The field-pipeline keys
args:/result:stay as-is. They're aligned with theargs.*/result.*attribute namespaces that predicates and interpolation read (require(args.include_ssn),${args.repo_name},args.ssn | redact) — renaming only the config block would have introduced a new inconsistency. (The issue originally proposedinputs/outputs; we tried it and rolled it back for exactly this reason.)Internal APL IR (
CompiledRoute,Phase) and the runtime attribute namespaces are unchanged.Fail-closed by design
Legacy
policy:/post_policy:/identity:keys are rejected loudly at parse/load time (in both the apl-core parser and cpex-core config loader) rather than silently ignored — a dropped authorization or authentication block would otherwise fail open.Example
Also
Testing
cargo fmt --check,cargo clippy --workspace --all-targets, and fullcargo test --workspace(all 55 suites) pass.praxis-demos/demos/cpexconfigs were migrated to the new surface (separate PR in that repo) and verified to load throughinstall_builtins+load_config_yaml.