Generate a Terraform-style before/after diff for plan visualization. member_policy_removals lists the per-member policies a successful apply also deletes, with the access each deletion revokes. Apply_blockers lists why the apply would refuse before it changes anything. With save=true the same operation also saves the plan, from the same read of the target, and returns it as saved_plan.
Returns before/after diff, risk, apply_blockers and deduplicated warning_details (code, object, text, check_before_apply). Group warnings by code (other if uncoded).
Parameters
Policy ID (UUID)
Also save the shown plan for POST /plans/{id}/apply and return it as saved_plan. The target state is read once for both. The plan expires like one from POST /policies/{id}/plan.
Responses
OK
PlanDiffResponse · 20 fields
Effect of successful execution on inspected existing MariaDB databases and global privileges. Unknown assessments block confirmation. Sessions describes cached privilege protection over every execution prefix. Removed patterns change grant coverage for future databases, separately from the enumerated existing databases. Runtime failures require a fresh access check.
7 fields
preservedreducedunknownpreservedclosedunknownReasons the apply refuses before it changes anything, such as group members whose kubeconfigs still wait for the re-issue after a sign-in source change. Empty when the apply can run.
3 fields
member_credentials_pending service_account_incomplete account_not_created_by_principal The people the blocker concerns, sorted by name: group members, or the person of a personal rule for account_not_created_by_principal. Empty for a target blocker.
3 fields
For account_not_created_by_principal, the account on the target, for example maria@%. Empty for other blockers.
Name of the member.
The service account of a MariaDB target as its last check found it (access model MD-P1): the account Principal connects with, the privileges of the contract it lacks with what each one breaks, and the command a database administrator runs. The sentences come from the static contract. Only the account name and the command built from it come from the target. A target response carries it from GET /targets/{id} and from an update (PUT or PATCH /targets/{id}), which answers with the check of a replaced connection, and not before the first check.
6 fields
The target whose service account was checked. "Check again" checks it.
ready when the account holds every privilege of the contract. Incomplete blocks changes.
readyincompleteThe account as MariaDB writes it, for example "principal@%".
The GRANT statements a database administrator runs to meet the contract. Absent when ready or when the account name can't be written into a command safely.
When the check ran.
State snapshots (optional, for detailed inspection)
Validation
Dependency graph for visualization
2 fields
3 fields
"depends_on", "references"
5 fields
Target the plan was computed for
Per-member policies a successful apply deletes after it binds a group itself (Kubernetes direct group RBAC), with the access each deletion revokes. Empty when the apply removes none.
4 fields
Name of the member. Empty when the member is unknown in the organization.
Identity the member policy grants access to.
The per-member policy the apply deletes.
The access the deletion revokes from the member.
3 fields
Where a row of a rule came from: written in the rule, materialized from its template, or imported from the live account at adoption or by the one-off import after an upgrade. An imported row is part of the desired state like any other row.
ruletemplateimportedVersion of the rule a rule preview was built from. Apply sends it back as expected_version. Absent on drift plans.
Basic plan information
Resource diffs with before/after state
15 fields
Change information
+, ~, -, -/+, =
Human-readable address (e.g., "pg.role.app_reader")
Desired state (null for deletes)
Before/after state for diff visualization
Attribute-level changes for update operations
5 fields
add, remove, change. PostgreSQL role attributes report update
New value (null for removals)
Previous value (null for additions)
JSON path to attribute
Is this a sensitive value?
Dependencies
Engine description of the change. Technical wording that may name raw objects
The change in plain English: what happens to which object, such as "Grant SELECT on table public.orders in the shop database to user alice". Absent when Principal cannot describe the change.
Kubernetes: YAML manifest
Resource identification
role, grant, k8s-role, k8s-rolebinding
Risk assessment
Why a high or critical change got its risk level, in words without the level itself (risk_level carries it). Empty for a lower risk and when the row's own description already says it, as for SSH host changes.
Implementation details
Risk analysis
4 fields
6 fields
Why this is high risk
low, medium, high, critical
Human-readable risk summary
Present only with save=true when the apply can run (no apply_blockers and access_impact.status is not unknown). The plan saved from the same read of the target and the same rule version as these rows. POST /plans/{id}/apply with its plan_id applies exactly the rows above while exact_apply_supported is true. The rows and summary above are the only count of changes.
4 fields
Effect of successful execution on inspected existing MariaDB databases and global privileges. Unknown assessments block confirmation. Sessions describes cached privilege protection over every execution prefix. Removed patterns change grant coverage for future databases, separately from the enumerated existing databases. Runtime failures require a fresh access check.
7 fields
preservedreducedunknownpreservedclosedunknownTrue when POST /plans/{id}/apply runs this plan exactly. False applies the current state of the rule.
After this time POST /plans/{id}/apply refuses the plan as not applicable.
"policy" or "drift"
"pending": the plan has changes to apply or member policies to remove (member_policy_removals). "applied": the target already matches the policy. "error": the plan has validation errors. Empty only from servers that did not set it.
pendingappliederrorTerraform-style summary of the resource diffs. Member_policy_removals are not counted
10 fields
Breakdown by risk level
Breakdown by resource type
5 fields
ChangesCount is the actual number of changes (to_create + to_update + to_delete + to_replace) This is distinct from Total, which includes unchanged resources
Human-readable message
Terraform-style counts
The same warnings as warnings, one record each, with the code a screen groups them by. Repeats with the same code, object and text are dropped. Empty when the plan has no warnings.
4 fields
True when the administrator should act on this warning before Apply, false when it only reports what Apply does or leaves. Set by the code, the same for every engine.
What is wrong, for the administrator. One of role_missing, database_missing, state_partly_unread, privilege_reading_denied, wildcard_not_checked, revocations_skipped, privileges_left_as_is, account_import_pending, sessions_may_end, system_database_access, wildcard_grants_ambiguous, namespace_missing, host_needs_repair, account_not_managed, host_unreachable, host_key_changed, host_sudo_missing, host_refused_change, host_setup_blocks_access, account_not_assignable, group_missing, file_too_large, grant_option_missing, other. other marks a warning that has no code yet. Read its text. The table with the meaning of each code is in the error contract of the backend.
The object the warning is about, as the plan names it: a role, a database, database.schema, a table, a namespace or a host. Absent when the warning is about the whole target.
The warning in words, the same text as in warnings
Texts of the warnings, kept for older screens. Warning_details carries the same texts with codes
Bad Request - the policy ID is not a UUID, or save is not true or false
Conflict - the policy is in cleanup and read-only (details.cleanup_task_id names the task), or the group role name of a group rule is taken by a role Principal didn't create (code policy.group_role_taken, details.role names the role, detail and resolution come from the failure reason group_role_taken of ROLE_EXISTS)
Unprocessable Entity - the rule cannot be executed or planned on the target as written, for example a privilege on an object level that does not take it, Kubernetes guards that leave nothing to grant, or future objects with no known creators. Detail and field_errors name the fix Also when Principal doesn't manage the target of the rule or template (before v7.3 that answer was 403 authorization.denied).
Not Implemented - a rule uses a privilege the target engine does not support
Common errors: 401 403 404 429 503 504. They mean the same for every operation, see Errors.