- sara.next
- Technology
- Auto-implementation configuration
Technology · Documentation
Auto-implementation configuration
Auto-implementation lets sara.next automatically make an access change — creation, modification or removal — in the target system once a request is approved, without manual intervention.
- guide
- Groovy
- SQL
- REST
Mechanism
How it works
The scheduler checks the queue every minute. This is how often the mechanism runs, not a guarantee of the time to make a change.
Queue
When an access request completes the approval process, it goes into the auto-implementation queue.
Scheduler
The scheduler runs every minute and processes requests from the queue.
Script
For each request the appropriate Groovy script is selected and executed on the configured SQL or REST connection. An optional verification script confirms that the change has been applied.
Result
The workflow receives "Implemented" or "Not implemented" — in the latter case with an error message.
Prerequisites
The connection first
Before you configure the scripts, define the connection they will use.
| Connection | Where in the panel | Fields |
|---|---|---|
| SQL | Administration → Configuration → SQL Connections | Name, system name, JDBC URL, user name, password |
| REST | Administration → Configuration → REST Connections | Name, system name, base URL, authentication type (None / Basic / Bearer / API Key), credentials |
The names of menu items, fields and buttons are given as they appear in the English version of the interface.
Configuration
Step-by-step configuration
Open the application configuration
Go to Administration → Applications and in the Actions column click the "Auto-implement config" button next to the chosen application.
Enable the mechanism
Tick the Enabled box.
Choose the type
In the Type field choose SQL or REST.
Select the connection
Choose the connection matching the type: SQL Connection or REST Connection.
Fill in the scripts
Fill in the script fields: Create, Replace, Modify, Delete and Verification.
Save
Click Save.
Variables
Variables available in scripts
All scripts receive the following variables.
| Variable | Type | Always available | Description |
|---|---|---|---|
user | User | Yes | The target user: the new user for Create and Modify, the user being swapped in for Replace. Properties: samAccountName, mail, givenName, surname. |
oldUser | User | No * | The previous user — available for Delete and Replace. In Delete scripts always use oldUser, not user. |
role | Role | Yes | The role being granted or revoked. Properties: id, name. |
dimensions | Map<String, String> | Yes | The dimension values of the current request, indexed by system name, e.g. dimensions["DB_NAME"]. |
request | AccessRequest | Yes | The access request. In Delete and Modify scripts you can read the previous dimension values via request.oldAtar?.dimensionValues. |
application | Application | Yes | The configured application. |
login | String | No * | Set only in the verification script. Contains the login to check: the new user for Create, Modify and Replace, the previous one for Delete. |
* oldUser and login do not occur in all script types — see the table of script types for details.
Script types
Five scripts and their tasks
| Script | When it runs | Available variables | Notes |
|---|---|---|---|
| Create | When new access is granted. | user, role, dimensions, request, application | — |
| Replace | When existing access is replaced (a different user or different dimensions). | user, oldUser, role, dimensions, request, application | If the script is empty, the system runs Delete → Create in sequence. |
| Modify | When existing access is modified (the same user, changed dimensions). | user, oldUser, role, dimensions, request, application | An empty Modify script is also replaced by the Delete → Create sequence. |
| Delete | When access is revoked. | oldUser, role, dimensions, request, application | Take the login of the access being revoked from oldUser, and the previous dimension values from request.oldAtar?.dimensionValues. |
| Verification | After the implementation script, to confirm that the change was made. | as above, plus login | The result is interpreted depending on the request type. |
The Delete → Create fallback may mean a brief loss of access. For critical systems it is worth preparing dedicated Modify and Replace scripts.
Verification
Verification logic by request type
The verification script runs after the implementation script and confirms that the change has been applied. It has access to the login variable: for Create, Modify and Replace this is the new user, for Delete — the previous one.
| Request type | Expected verification result |
|---|---|
Create | true — the user exists in the target system |
Modify | true — the new state exists in the target system |
Replace | true for the new user and false for the previous one |
Delete | false — the user no longer exists (inverted logic) |
Inversion for Delete: the scheduler inverts the result itself. The script is written as if it were checking for presence — verification passes when the user is not found.
Read more
Examples and diagnostics
Configure auto-implementation with our team
We will walk through the connection, scripts and verification using your application as an example.