security

Scope an automation identity to approved actions

Build an automation permission review around the operation, target, environment and approval conditions the workflow actually needs to perform.

TrustIvan · · 10 min read

The finance team wants a workflow to prepare a monthly renewal report. The first version reads an approved billing view and saves a draft in a private workspace. A later change asks it to notify an outside advisor. The same connector offers both operations, so adding a new workflow step could appear to be a small configuration change. The new step crosses a different boundary. It exposes a particular approved artifact to a particular recipient, and needs a separate authorization decision.

Review automation permissions one operation at a time. A useful record describes which principal acts, what it may do, where it may do it and what evidence the enforcement point produces. Treat read access, draft writes and delivery to another audience as separate capabilities. This is an application of least privilege to workloads as well as to people. NIST glossary definition of least privilege

Map the action to an enforcing system

Start with the latest approved workflow definition and a diagram of the resource path. Mark the initiating human or scheduler, the workload identity that calls the connector, any intermediate service that acts on its behalf, and the destination. The last system may see a gateway account while the gateway knows the original workflow principal. Record which identity each log independently observes. A human user appearing in the interface does not by itself prove that the API uses that person's authority.

For each step, name the API or other enforcement point, operation, target, account and environment. Identify the narrowest resource scope supported by the destination. A generic read scope may allow a whole account when the workflow only needs one reporting view. Where the destination supports a narrower view or a dedicated identity, evaluate it. Where it cannot express the boundary directly, document who controls the accessible data set and how access is verified.

Determine which part of the workflow can affect an external system. Rendering a draft and displaying a confirmation are application states. A separate record at the side-effecting service can establish what was actually sent, changed or written. Verify the configured permissions on the service performing the action. A transcript or output screen can explain an intention without establishing whether authorization was checked.

Scope the resource and the purpose

Write a permission line that another engineer can turn into an acceptance test. For the renewal report, the source might be a reviewed monthly view in the finance test tenant with no customer contact data. The destination might be a private draft folder with a retention policy under the finance owner. The workflow's expected output includes a report date, fixed column list and approximate record count. Those details help somebody decide whether access is broader than the task.

Consider claims made by an intermediate connector. A connector can expose an operation called “create report” that also changes a record or requests delivery as an optional parameter. Inspect the supported behavior with the destination owner. Define separately what the execution identity may read and where it may write. Treat tenant identifiers, audience and classification as protected inputs controlled by the application or policy layer. Record the approved default when the proposed action lacks necessary authorization details.

Agree on the lifetime of any temporary capability. The monthly draft may need standing narrow read access with periodic review. A one-time external delivery might require an approved recipient, report version, expiration and authorized operator. Link the review decision to those details so a later rerun does not inherit approval intended for a different document or a new audience.

Make the authorized path concrete

Use a test tenant with synthetic records. Assume the fictional workflow uses a reader principal for the billing view and a distinct draft writer for the private test folder. A human finance reviewer controls any release request. The schedule can complete the read and draft creation without an external-delivery permission. Operations owners agree on the following acceptance cases.

Test caseFixture conditionExpected decisionEvidence
Prepare the monthly draftRead view F1 for the approved sample monthAllow the read and private draft writeCaller identities, view, folder and linked run reference
Request a wider reportRequest contact fields absent from the approved viewKeep the request outside the authorized scopeDestination's readable field set and accountable review note
Request external deliveryA synthetic draft is ready but no send approval existsNo delivery event for the test requestRecorded decision and destination audit query
Approve one deliveryApproved sample file D22 and synthetic recipient Q1 before expirationSend the reviewed file through the designated route in the test tenantApproval identity and version, target and accepted result
Change the approved materialDraft changes to D23 after sign-offRoute the new version to reviewOriginal approval and distinct replacement version

Choose an operation with a harmless, observable outcome when testing a denied case. The “send” path above uses a synthetic recipient in a test system, with the designated operator's approval. Set the expected absence of an external delivery record against a known check window and verify the denied or pending decision directly. If the destination has eventual audit delivery, observe an authorized control transaction to establish whether records are currently arriving.

Compare the positive path to the expected workload rather than only to a successful status code. For example, verify that the initial report contains the planned field set and lands in the approved private draft folder. If the action completed against a different tenant or folder, it did not exercise the intended boundary and needs a revised test. Save an authorized run reference and the policy version for a second reviewer.

Bind approval to the action that runs

Approval needs a durable reference to the action and its scoped inputs. Record the action type, authorized resource and environment, selected document version if applicable, approver role, time and expiry. Validate those facts at the enforcement point before the action runs. Decide how the authorized path handles delayed jobs. If a job starts after approval expires, it needs the documented follow-up even if it entered the queue during the valid period.

Have an independent reviewer inspect a pending action before enabling a higher-impact path. Verify how the platform enforces reviewer roles and whether the initiating person can also approve. For example, deployment environments in GitHub Actions can be configured to restrict approval by the person who initiated a run where the relevant feature is supported. Treat those platform controls as evidence for the specific operation they protect. The remaining permissions still need review at the services used by the workflow. GitHub documentation on deployment environments

Keep approval and execution evidence related but distinct. An approved record shows permission was granted for a defined request. A delivery receipt shows what happened. If a write outcome is uncertain after an interruption, reconcile the destination before retrying according to the documented mechanism. A duplicate report in the external test inbox is a failure even when both delivery events have valid status.

Review delegated authority and cached access

Some workflow systems delegate a narrower operation to an intermediate principal. Record the initiating principal, the principal that executes the action, what can be delegated and the time limit. Verify that a downstream service checks the effective identity and current target. If the intermediate service uses a shared principal, inspect whether its internal authorization records connect the approved request to the destination's observation. A stable correlation ID may support the connection without carrying secrets.

Test ordinary lifecycle changes with a controlled rehearsal. Change the draft writer's allowed folder in the test definition, make the approved request against the new folder and confirm the old path's updated status after the relevant cache window. For a disabled workflow, inspect scheduled and queued jobs through the normal operator interface. Decide whether each can finish under already approved scope or should move to review. Save the policy version, clock and service that made the decision.

Ask whether all environments use equivalent controls. A preview and production workflow can share a name, while the preview writes to synthetic resources and production sees regulated records. Use a consistent decision structure, but record the environment and principal that each test actually measured. A staging success supports readiness for the production change. Production exposure still requires the team's approved release and verification steps.

Compare business impact to the review cost

Review additional permission requests starting from the specific work that is blocked. Requesting wider access while testing can remove a useful guardrail without explaining the missing authorized input. In the renewal example, a read permission for a second view could be appropriate after a data owner approves the need and records why the existing view cannot answer it. External delivery still has its own audience and duration. Capture the accountable owner for the new permission and the test that validates its use.

Use the same process when a rule is too restrictive. Save the expected authorized operation, deny outcome, policy version and test resource. A smaller correction can unblock the one needed operation without exposing another environment or data set. Rerun that case and the previously denied fixture requests to verify the rule still expresses the intended boundary.

For ongoing measurement, track sampled allowed, refused and technically failed operations by workflow and policy version. Review why a request was refused and whether it should have been proposed under the workflow's design. A lower denial rate may mean the application was updated to make appropriate requests. It could also follow a scope expansion that allowed previously disallowed actions. Compare which permission changed and which intended workflows succeeded before declaring an operational improvement.

Distinguish a policy decision from an interrupted request

Assume the synthetic recipient service is temporarily unavailable after approval of D22. The action log records a permitted request while the destination has no accepted delivery. The operator keeps the approval and execution dispositions separate. They confirm the recipient, file version and remaining approval lifetime before arranging any authorized recovery. If the approval expired while delivery was uncertain, follow the documented review path and resolve the original request so it cannot be mistaken for a second send.

Use three fixture outcomes for review. One request lacks authorization and is refused. The authorized D22 request reaches the recipient service after the approval is verified and gets a confirmed receipt. A separate request is authorized but its destination outcome is unknown. A second operator should be able to identify which system owns each observation and what evidence they would need before they could close the record.

Leave evidence for the next owner

Save the approved operation list, permitted identity, authorization source, test scope, representative allowed and denied outcomes and the controls for any side effect. Record an escalation owner for destination changes and a date to revisit permissions. A new owner should be able to identify what the workflow can do, where approval lives and what can still happen after a permission is removed. Attach separate records if service logs cannot prove the entire chain alone.

For a vendor evaluation, use the same synthetic data and approval cases in each candidate system. Ask someone else to identify what executes the operation, prove the target and action are within scope and locate the pending record when the approval no longer applies. Measure whether behavior is enforceable at the intended control point and if lifecycle changes retain the relevant evidence. The non-human identity security comparison covers additional questions about access issuance, review and action approval.