In AutoSys, when an as-owner EEM policy is configured with broad permissions, users can set any value for a job's owner attribute. This article provides instructions on how to create an EEM filter that requires the job owner to be the same as the user submitting the job, preventing the use of arbitrary or incorrect owner values.
Any
R12.x, R24.x
This procedure will guide you through modifying the EEM as-owner policy. The goal is to create a filter that dynamically checks if the user creating a job (userA) is also specified as the job's owner.
Open a web browser and navigate to your EEM server's URL.
Log in with an EEM administrator account (e.g., EiamAdmin).
From the "Application" dropdown menu at the top right, select WorkloadAutomationAE.
as-owner policy or create a new one.as-owner Policyas-owner-self-only.In the "Identities" section, click Add Identity.
To make this rule apply to all users, select the All Identities group. This ensures that any user attempting to create a job will be evaluated by this policy.
*). This ensures the policy applies to any value specified in the owner attribute.execute and sendevent_jobexecute.This is the most critical step. You will add a filter that compares the user making the request with the value of the owner attribute.
In the "Filters" section of the policy configuration, click Add Filter.
In the text box, enter the following expression exactly as written:
request.resource == request.identity
request.resource: In an as-owner policy check, this variable holds the value of the owner attribute from the job definition (e.g., owner: userA).request.identity: This variable holds the ID of the user performing the action (e.g., the user logged in and running jil).Click Save to add the filter.
With this policy in place, here is how EEM will process requests from userA:
Scenario 1: Allowed Action (Correct Owner)
jil to insert a job with the following definition:jil insert_job: my_job job_type: CMD command: ls -l machine: localhost owner: userArequest.identity is userA.request.resource (the owner value) is userA.request.resource == request.identity evaluates to TRUE.Scenario 2: Denied Action (Incorrect Owner)
jil to insert a job with a different owner:jil insert_job: another_job job_type: CMD command: date machine: localhost owner: some_other_userrequest.identity is userA.request.resource (the owner value) is some_other_user.request.resource == request.identity evaluates to FALSE.By following these steps, you have successfully configured EEM to enforce that a job's owner must match the user creating the job.