Nova-Skript
With the “Nova-Skript” add-on, administrators do extensive or recurring work in Nova with a short script, without the AI chat. A script calls the same functions as the admin chat – nova.search_users(…), nova.update_role(…), nova.assign_role_to_user(…) – and computes with their answers. Typical cases are:
- read a table from Excel – pasted or as a CSV file – and create entitlements or set descriptions from it,
- give every active person of an org unit a business role,
- rename entitlements by a pattern,
- evaluations over all pages of a list or with SQL.
Every script is simulated first: reading runs, every change is only recorded – with the state it will change. It is executed only after a confirmation. For the common changes to many identities without a line of code, there are bulk changes.
# Active persons without a manager – over all pages of the identity list
people = rows(nova.search_users, status="active", user_type="natural")
without = [p for p in people if not p.manager_id and not p.org_manager_name]
print(len(without), "of", len(people), "persons without a manager")
show(without, title="Without a manager", columns=["id", "name", "email"])Enabling and access
- Enabling: the add-on “Nova-Skript” under “Administration” → “Plugins”; Nova needs a restart afterwards.
- Where: as the page “Scripts” in the navigation – at the top in the “Monitoring” menu, in the sidebar under “Operations”.
- Who: administrators only. The page, the library and the runs are not accessible to other identities.
- Shared: All administrators see the same library with the same folders and the same runs. Any administrator can execute a simulated run, with their own rights.
- Disabling: The library with its folders and the runs with their logs and files are kept.
The editor
The page “Scripts” shows the library and the latest runs and next to them the editor. Below it are the run on screen and the tabs “Output”, “Simulation”, “Log”, “Steps”, “Files” and “SQL”.
The bar above the code holds the script's actions:
- “Simulate” starts the simulation, see Simulate, review, execute. Once this script's simulation has recorded changes, the button becomes “Execute … (n calls)”, after an interruption “Resume … (n calls open)”. Any edit of the script turns it back into “Simulate”, and so does a query in the tab “SQL”.
- “Debug” simulates as well and records every step on the way, see Debugging.
- “Check” checks at once. The message names the number of errors and warnings and puts the cursor on the first problem – or it reads “No problems found”.
- “Save” saves an own script where it lies; any other asks for title, description and folder, see Saving and copying. Next to it, “Unsaved changes” shows when there are any; without them, “Save” is disabled for an own script.
The bar also shows the result of the check while typing: the number of errors, warnings and notes, or “No problems found”. “Go to the first problem” puts the cursor on the first error, without errors on the first warning.
The page header holds “New script” and the menu “…” (“More actions for the script”) with “Discard changes” when there are unsaved changes, and for an own script “Save as a copy” and “Delete from the library”.
Address and ID. The browser's address names what the editor shows: /scripts/own/<ID> an own script, /scripts/builtin/<ID> a shipped one, /scripts/run/<No.> a run and /scripts a new script as long as it has not been simulated. A link to such an address opens what it names, with unsaved changes only after the question “Discard changes?”. If the script or run does not exist, a message appears and the address goes back to what the editor shows. Next to the heading is the script's ID, the one use() takes as well: “ID 12” for an own script, “ID 101_variables_numbers” for a shipped one. For a run whose title hides its number, it shows “Run #12”.
Suggestions. They appear while typing and with Ctrl+Space:
- after
nova., every function with its signature, its description, the endpoint's method and path and whether it reads or changes; - in
nova.update_role(, the parameters still missing, required ones first, with type and description; afterparameter=, the allowed values when there is a fixed choice; - in the text of a parameter that names a Nova object (
user_id,role_id,business_role_id,unit_id,system_idand similar) and inuser("…"),role("…"),business_role("…"),org_unit("…"),system("…"), the matching identities, entitlements, business roles, org units or target systems, searched while typing. The pick inserts the ID, a number without quotes; - otherwise the built-in functions, the script's variables and the keywords.
Check while typing. Shortly after every input, Nova checks the script without running it and underlines what is wrong:
- violations of the language, with the line;
- unknown names, functions and parameters, with the closest ones under “Did you mean:”; missing required parameters, values outside the allowed choice, values of the wrong type, secrets as parameters;
- IDs and names written in the script:
user_id=42must be an identity,role("Purchasing")must name exactly one entitlement. For a typo, the message “Did you mean:” offers up to five similar candidates; a click replaces the text. Where a name stands in place of the ID, it offers the ID. At most 100 different names and IDs are checked per check; - SQL written in the script, with the same rules as when it runs;
- calls of own functions, also of those from
use(): too many arguments, an unknown parameter name, a missing argument or one given twice; ause()that fits no script or more than one, or whose script is itself invalid; - notes: a changing function is recorded in the simulation and executed only after the confirmation. A far-reaching one – it deletes, revokes or overwrites – requires the number of calls to be typed at execution. Renaming an entitlement that belongs to a target system points out that the next import may overwrite the name.
Explanations. When the mouse pointer rests on nova.<function> or a built-in function, Nova shows the signature and description, for Nova functions also method and path.
Keys: Ctrl+Space suggestions, Ctrl+Enter “Simulate”, F9 sets or removes a breakpoint on the cursor's line, Tab indents, Esc and then Tab leaves the editor.
The language
Nova-Skript looks like Python and knows a part of it. A script runs in Nova's process, with an administrator's rights. Nova therefore never hands it to Python: it checks the script against a fixed list of allowed building blocks before the first step and then evaluates every step itself. What cannot be bounded does not exist.
Allowed
| Building block | Example |
|---|---|
Values: None, True, False, numbers, texts, lists, dictionaries with texts as keys; tuples become lists | names = ["Weber", "Schmidt"] |
| Assignment, also into lists and dictionaries and to several names | a, b = pair · d["k"] = 1 · n += 1 |
if, elif, else | if not p.manager_id: |
for … in … over lists, texts and dictionaries (their keys), with break, continue, pass | for i, name in enumerate(names, start=1): |
Arithmetic with + - * / // % (% with numbers only), comparisons, in, not in, is, and, or, not, x if condition else y | share = hits / total |
| Index and slice | names[-1] · text[0:3] |
| f-strings, also with a format | f"{share * 100:.0f} %" |
| List and dictionary comprehensions | [p.name for p in people if p.leave_date] · {r.id: r for r in roles} |
assert stops with the message when the condition does not hold | assert MAXIMUM <= 100, "too many" |
Own functions with def and return, see Own functions | def double(x, factor=2): · return x * factor |
Comments with #, texts over several lines with """ |
Fields: r.field reads a dictionary's field, like r["field"]. If the field does not exist, the script stops and names the fields that do; get(r, "field", "") returns a fallback instead. str(None) and f"{None}" give an empty text.
Not allowed – and why
| Not allowed | Instead | Reason |
|---|---|---|
import | – | no access to modules or the server |
lambda, def inside if, for or a function | def at the top level; for sorting sorted(list, by="field") | a function sees only its own variables and the names of its script |
class | dictionaries | values exist only as in JSON |
while | for i in range(n): or a loop over a list | every loop has a foreseeable end |
methods such as x.upper(), list.append(x) | upper(x), append(list, x) | Nova never calls a method of a Python object, only its own functions |
try, with, global, del | get() with a fallback, if | – |
sets {1, 2}, generators, *args, **kw, :=, ** as power, bit operators, for … else | lists, unique(), multiplication, a helper variable | only building blocks with bounded effort |
names starting with _ (_ alone is allowed) | other names | – |
assigning built-in names, for example len = 3 | other names | – |
nova.get_user_details(42) | nova.get_user_details(user_id=42) | Nova functions take named parameters only |
Regular expressions are missing for the same reason: some patterns take arbitrarily long.
Results of changes
A changing function returns no result in the simulation; its call is only recorded. The script may store the return value but not read it: new = nova.create_role(id="purchasing-read", name="Purchasing read") works, new.id stops the script. IDs the script assigns itself, here purchasing-read, it can keep using.
Limits
| Limit | Value |
|---|---|
| length of a script | 200,000 characters |
| steps – every evaluated expression counts | 2,000,000 |
| loop iterations, all loops and comprehensions together | 500,000 |
| text | 1,000,000 characters |
list, also range() | 100,000 elements |
| nesting of expressions | 60 levels |
| whole numbers | 256 bits |
| memory the script uses over the whole run | 256 MiB |
| run time of a simulation | 10 minutes |
reads per simulation: functions, rows(), sql() and the prior states of the pending changes | 20,000 |
| pending changes per simulation, SQL included | 5,000 |
rows() | 100,000 rows |
sql() | 100,000 rows and about 50 million characters, 60 seconds |
| arguments of a call of a changing function | 256,000 characters as JSON |
| output | 2,000 entries and 2 MB; a table shows at most 500 rows – its CSV download too – and, without columns=, at most 30 columns |
| calls of own functions inside each other | 40 |
scripts through use() per run | 20 |
| files per run | 10, each up to 2,000,000 bytes and 1,000,000 characters |
| steps when debugging | the first 5,000 steps complete, after them only steps on breakpoints, at most 500; about 3 MB in all, at most 60 variables per call, a preview of at most 120 characters per value |
Reaching a limit gives an error with the line; the run then cannot be executed. Files and the steps when debugging are the exception: Nova does not take a file that does not fit in the first place, and at its limit the debugger only records less.
What Nova functions, rows() and sql() return counts against the script's memory, and a text in it against the limit for texts. in, ==, min(), max() and sorted() over long lists and texts count as steps by their size; the run time and a cancel reach them too.
A long text that grows in a loop with text += piece is copied anew in every iteration, and every copy counts against the memory: after about 2,500 lines of 80 characters, the script stops. With append(lines, piece) into a list and join(lines, "\n") at the end, the same text comes out up to the limit of 1,000,000 characters.
Built-in functions
| Function | Meaning |
|---|---|
len(x) | number of elements of a list or dictionary, or of characters of a text |
str(x), int(x), float(x), bool(x) | the value as text, whole number, decimal number or truth value; int("42") reads a text, str(None) is empty |
round(x, n=0), abs(x) | rounded to n decimals, without n a whole number; the absolute value |
min(list), max(list), sum(list) | smallest and largest value, sum; min and max also take several arguments, for example max(a, b) |
range(stop), range(start, stop, step=1) | the numbers from start to before stop as a list |
sorted(list, by=None, reverse=False) | a sorted copy; by="field" sorts dictionaries by a field – an entry whose field is missing, None or an empty text comes last |
reversed(list), enumerate(list, start=0) | a reversed copy; pairs [number, element] |
keys(d), values(d), items(d) | keys, values and pairs [key, value] of a dictionary |
get(d, key, default=None) | a field of a dictionary or an element of a list, otherwise default |
append(list, x), extend(list, other) | appends one element or all elements of a second list |
unique(list) | the list without duplicates, in its original order |
any(list), all(list) | whether at least one element or every element of the list is true; False, None, 0 and anything empty are false. any([]) is False, all([]) is True |
contains(haystack, needle) | whether a text, a list or a dictionary (its keys) contains needle |
join(list, sep=""), split(s, sep=None) | join elements into one text; split a text, without sep at whitespace |
upper(s), lower(s), strip(s) | upper case, lower case; without whitespace at the edges |
replace(s, old, new), substr(s, start, length=None) | replace every occurrence; a part from start on (0 is the first character) |
startswith(s, prefix), endswith(s, suffix) | whether the text starts or ends so |
today() | today's business day as YYYY-MM-DD, by NOVA_TIMEZONE |
add_days(date, n) | the date n days later as YYYY-MM-DD, earlier for a negative n; add_days(today(), -90) is the day 90 days ago |
days_between(a, b) | the days from a to b as a whole number, negative when b is before a |
weekday(date) | the ISO weekday as a number: 1 = Monday to 7 = Sunday |
table(text, sep=None) | a copied CSV or Excel table as a list of dictionaries, see below |
file(name), files() | the text of a file attached to the run; the names of these files, see Reading files |
to_json(x) | the value as JSON text |
fail(message) | ends the script with this message |
rows(nova.<function>, **params) | all rows of a reading function over all pages as one list |
user(value), role(value), business_role(value), org_unit(value), system(value) | the ID of an identity, entitlement, business role, org unit or target system, see below |
sql(statement) | reads with one SELECT, see Reading with SQL |
sql_write(statement) | changes data with SQL, opt-in only, see Changing with SQL |
use(ref) | takes the own functions of another library script, see Functions from other scripts |
show(value, title=None, columns=None) | shows a value under “Output”, a list of dictionaries as a table |
print(*values, sep=" ") | writes text under “Output” |
Calculating with dates: add_days(), days_between() and weekday() take a date as text YYYY-MM-DD or an ISO timestamp as Nova's functions return it, for example 2026-11-22T08:30:00Z. Only the date counts, as written, without converting between time zones: days_between("2026-11-22T23:59:59Z", "2026-11-23T00:00:01Z") is 1. n is a whole number; 1.0 does not count. Any other text – 22.11.2026, 20261122, blanks at the edges, a day that does not exist such as 2026-02-30 – and a result outside the years 1 to 9999 stop the script; the message names the parameter.
True for a whole list: any() and all() take a list only, no dictionary and no text. They check every element before they answer: if the list holds the result of a pending change, the script stops, even when an earlier element would already decide the answer.
Reading tables: table() takes the first non-empty line as the header and detects the separator – tab, ; or , – itself. Cells in quotes may contain the separator; empty cells at the end of a line from spreadsheets are dropped. Every cell is a text; int() converts numbers. A line with the wrong number of cells stops the script with its number. An attached CSV file is read with table(file("name.csv")), see Reading files.
DATA = """
department;persons
Accounting;5
"Legal & Compliance";4
"""
for row in table(DATA):
print(row.department, int(row.persons) * 2)Own functions
What a script needs more than once it writes as a function of its own: with def at the top level of the script – not inside if, for or another function –, the result with return. Without return, a function returns None.
def full_name(first, last, title=""):
name = f"{first} {last}"
if title:
name = f"{title} {name}"
return name
print(full_name("Ada", "Lovelace"))
print(full_name(last="Hopper", first="Grace", title="Dr."))- Parameters: Arguments come by position or by the parameter's name. A default is a fixed value: a number, a text,
True,FalseorNone. There are no*args,**kwargs,*or/in the parameter list, no type annotations and no decorators. - Own variables: Every call has variables of its own. A function reads the names of its script, for example a setting at the top; what it assigns holds only in its call. It does not see the variables of a function it is called from.
- Recursion: A function may call itself, at most 40 calls inside each other.
- As a value: A function can be stored in a variable and called through it, but not printed, compared or handed to a Nova function.
- Check: The check in the editor knows the script's functions and checks every call: too many arguments, an unknown parameter name, a missing argument, one given twice.
Functions from other scripts: use()
use(ref) takes the own functions of another library script into the script that calls it. Helper functions are thus written once, in a script of their own, and used in many:
use("109_function_library") # “Function library: texts and lists”
for p in nova.search_users(limit=20).items:
print(anzeigename(p), normalisiere_email(get(p, "email") or ""))Which script:
refnames- an own script by its ID:
use(12)oruse("12"), also"own/12"or"own:12"; - a shipped one by its ID, for example
use("109_function_library"), also withbuiltin/orbuiltin:in front; - or a title: the one own or shipped script of that title, ignoring case, a shipped one by its German or English title.
The editor shows the ID next to the heading. If several scripts bear the title, the simulation stops and names them as candidates; if none fits, the message names similar ones.
- an own script by its ID:
What of it runs: Of the other script, only the
defblocks, the constants at the top level – a name set to a fixed value or to a list or dictionary of fixed values – and its ownuse()run. Reads, output and changes never run there. A library script may therefore end with examples: they run only when it is simulated itself.What is taken: the functions the other script defines itself. Such a function sees the names of its own script – its constants and what it loads with
use()in turn –, not those of the calling one.Once per run: A run loads every script only once, even when several
use()name it. Nova refuses scripts that load each other in a circle, and a run loads at most 20 scripts throughuse().Check: If
use()names its script with a fixed value, for exampleuse(12)oruse("My functions"), the check in the editor knows the functions from it and checks their calls; ause()that fits no script or more than one is reported there already. Otherwise the check reports these functions as unknown names.Errors: If the run stops in another script, for example in one of its functions, it names below the message that script's title and the line there, for a function also its name. The position in the editor is the call in the script itself – of the function or of
use().Evidence: The run records which scripts it loaded through
use(): with title, an identifier such asown:12orbuiltin:109_function_libraryand the SHA-256 of the text it ran. The simulation's fingerprint includes them; “Log as CSV” names each in a line “Script through use()”, the audit entryscript_run_executedunderuses.With the transport: An own script's ID is different in every installation. Scripts that travel with the configuration transport are therefore better off naming an own library script by its title.
Reading files
A CSV or text file, for example an export from Excel, reaches the script through the tab “Files”: drop it there or choose it. Attached files go to the run with every “Simulate” and “Debug” of the script until they are removed in the tab again; a file of the same name replaces the earlier one.
for row in table(file("list.csv")):
print(row.email, row.department)- In the script:
file("list.csv")returns the file's text,table(file("list.csv"))its rows andfiles()the names of the files attached to the run, as the tab shows them. If no file of that name is attached to the run, the script stops (“… is not attached to this run”) and names the attached ones. - Limits: at most 10 files per run, each up to 2,000,000 bytes and 1,000,000 characters, its name up to 120 characters.
- Character set: UTF-8 with or without a byte order mark and UTF-16 with a byte order mark; Nova reads any other file as Windows-1252, as Excel on Windows saves “CSV”.
- With the run: The run keeps every file with name, size, SHA-256, character set and the text as the script read it. The tab “Files” lists the files of the run on screen; “Download” delivers one as UTF-8 with a byte order mark. The simulation's fingerprint includes the files; “Log as CSV” names each in a line “File”, the audit entry
script_run_executedunderfiles.
Calling Nova functions
nova.<function>(parameter=value, …) calls the admin chat's function of the same name, with named parameters only. The suggestions after nova. show which exist: every function of the chat that calls an endpoint of Nova. Flows only the chat knows are missing; the check names them. export_data and export_document are missing too: they build a file for the chat. A script shows its rows with show(), and every table of the output can be downloaded as CSV – with the rows it shows, at most 500; more rows in several show(). There is no parameter confirm in a script – the simulation is what gets confirmed.
- As in the user interface: Every call goes through Nova's endpoint, as the administrator who simulates or executes – with the same rights check and validation, the same audit entries, the same provisioning log and the same provisioning as in the user interface or the chat.
- Answers: A reading function returns the endpoint's answer as a dictionary or list; Nova replaces secrets with a placeholder. A list with pages answers with
items,total,pageandpages. If a reading function fails, the script stops with the endpoint's message and the line. - All pages:
rows(nova.search_users, status="active")turns the pages itself and returns a list of all rows. This works with reading functions only. If a function has no pages, the check warns: then call the function directly. - Secrets: No function takes passwords, tokens or keys as parameters. They are entered in the user interface.
- Paths: A value that goes into the request's path, such as
keyinnova.get_setting(key=…), must not lead it to another endpoint: a/in it or a segment.or..stops the simulation – except for entitlement IDs, which may contain a/.
Names instead of IDs: user(), role(), business_role(), org_unit() and system() turn an ID, email address or name into the ID the functions expect – for org units also their visible number, written with its leading zeros as object_id writes it ("00000007"). A number without leading zeros is the unit's internal ID; IDs and visible numbers overlap. Nova first looks for the ID, then for an exactly equal name or email address, ignoring case. If nothing is found, the simulation stops and names up to five similar candidates; if several match exactly, it stops as “ambiguous”.
unit = nova.get_org_unit(unit_id=org_unit("IT-Sicherheit"))
role_id = business_role("Revision")
people = rows(nova.search_users, department=unit.object_id, user_type="natural", status="active")
for p in people:
nova.assign_role_to_user(user_id=p.id, business_role_id=role_id)Simulate, review, execute
Simulate. “Simulate” or Ctrl+Enter starts the simulation in the background, and so does “Debug”, which records every step (see Debugging). A script that violates the language is refused at once, with the error shown in the editor. In the simulation,
- reading functions,
rows()andsql()really run, as the simulating administrator – except the connection testscheck_system_healthandtest_source_system_connection, which store their result: they are recorded like changes, - every call of a changing function is only recorded: with its arguments, the request, for example
PUT /api/roles/…, and the state of the object it will change, as Nova reads it now, sql_write()runs in a transaction that is rolled back; the simulation notes how many rows would change,print()andshow()fill the tab “Output”.
Nothing changes. If the script stops with an error – also with
fail(),assertor a name that does not exist – the run is “Failed”, with message and line; “Show line …” jumps there. The output up to that point stays; the run cannot be executed.- reading functions,
Review the simulation. The tab “Simulation” shows every recorded call with number, line and request, under “Before → after” the current and the new value of every field the call sets, for example
department: "" → "IT". When an earlier call of the same simulation already changes the object, “before” is the value that earlier call sets. It also shows- far-reaching calls – they delete, revoke or overwrite – with the label “Far-reaching”,
- deletions with the object's name and “→ deleted”,
- SQL changes with the number of affected rows,
- calls without a readable prior state, for example those that create something, with “No prior state readable – no conflict check”,
- calls on an object that did not exist during the simulation, with a note saying so,
- a call that changes nothing with “Already so – no change”. It is executed too.
If the script only read, there is nothing to execute.
Execute. Once the simulation has recorded changes, “Simulate” in the editor's bar becomes “Execute … (n calls)”. The button opens the confirmation with the number of calls, the far-reaching ones among them and the SQL changes. If the open calls include a far-reaching one or an SQL change, execution becomes possible only once the number of open calls has been typed. The calls then run in the background one after the other in the simulation's order, as the administrator who executes; Nova stores every result at once.
Result. The tab “Log” shows every call with its result: “Done”, “Failed” with the endpoint's message, or “Conflict”. A failed call does not hold up the others. The run then shows as “Executed”, with failures or conflicts as “Executed with errors”.
The run also shows under “Monitoring” → “Jobs” (job “Script runs”, type “Script run”). Only one script run is active at any time, simulation or execution; Nova refuses a second one until the first has finished.
Only the confirmed simulation: The execution quotes the simulation's fingerprint, formed from the script and every recorded call, along with the scripts the run loaded through use() and the files attached to it. Exactly what this simulation recorded is executed; a run simulated anew needs its own confirmation. To apply a script again, simulate it again.
Debugging
“Debug” in the editor's bar simulates the script as “Simulate” does – the same simulation, which can be executed afterwards – and records every step on the way: every statement before it runs, with the variables that have changed since the previous step.
- Breakpoints: A click left of the line number sets a breakpoint, a red dot, a second click removes it; F9 does the same on the cursor's line. Breakpoints move with the text when lines are added or removed. Opening another script clears them; a run from “Debug” brings its own back when it is opened.
- The tab “Steps” opens after the run at the first breakpoint the script reached, otherwise at the first step; the editor highlights the step's line. “Start” and “Back” go to the first and to the previous step, “Step” to the next statement, into a function too, “Over call” over a function call, and “Continue” to the next breakpoint, without another one to the end.
- What it shows:
- “Step 12 of 40 · line 7”, inside a function also “in f()”, on a breakpoint “Breakpoint”;
- how far output and pending changes had got by then, for example “so far: outputs 3 · pending changes 2”, and how often each breakpoint was reached;
- the variables of every call in progress – the innermost first, “Script” last –, with a preview of the value, the type, with the length for texts, lists and dictionaries, and “changed” on those the previous statement changed; the result of a pending change shows there as “pending: nova.…”;
- last, “End” or “Stopped at the error”.
- Nothing runs while you step through: The simulation recorded everything beforehand. No run waits for a click or holds up the next one, and going back is always possible.
- Limits: Nova records the first 5,000 steps completely, after them only steps on lines with a breakpoint, at most 500, each with all variables; a notice says so then. The whole trace takes at most about 3 MB, a call shows at most 60 variables, a preview at most 120 characters.
- Functions from other scripts: Their steps name the script, for example “in script builtin:109_function_library”; the editor does not highlight their lines, and breakpoints apply only to lines of the script itself.
- Simulations only: The execution makes the recorded calls and records no steps. If the editor holds another text than the one debugged, the tab points it out: the lines of the steps belong to the debugged version.
Conflicts
Before every call for which the simulation read the object, Nova reads it again – with the same function as in the simulation. Compared are:
- whether the object still exists,
- the values of the fields the call sets.
If one of them differs, the call shows as “Conflict” in the log and is not executed (“Changed since the simulation – not executed. Please simulate again.”). The other calls keep running.
Not compared are:
- fields the call does not set – a change there is no conflict,
- calls that create something: before the creation there is no object that could be read,
- calls on objects the simulation did not find or could not read,
- SQL changes.
A script does not conflict with itself: if several calls change the same field, Nova simulates every later one against the value the earlier one sets. If the endpoint stores a value otherwise than it was sent – owner_id=0 clears the field –, Nova reads the object after the earlier call and compares the later one with what the earlier one left, on a resumption too. Two actions on the same object, for example two business roles for one identity, are no conflict either.
Cancel and resume
- Cancel: “Cancel” on the page or under “Monitoring” → “Jobs”.
- Simulation: It shows as “Cancelled” at once and stops after at most 25 more function calls, a script that only computes after about a second – with the output up to that point. A cancelled simulation can be discarded.
- Execution: It stops before the next call; the run is “Interrupted”, with the number of open calls. What has been executed stays executed. If it stops before its first call, the run stays “Simulated” and can be executed or discarded.
- Resume: “Resume …” – what “Simulate” in the editor's bar reads for an interrupted run – executes only the open calls of the same simulation; if far-reaching ones are among them, the number has to be typed again. If Nova restarts during an execution, the run likewise stays “Interrupted” and can be resumed. A call that was running when the execution stopped – Nova restarted, or its result could not be stored – is not sent again: the log shows it as “Failed” with the note that it is unknown whether it was made; check it by hand. An SQL change stores its result in the same transaction: while it is open, it did not happen, and the resumption runs it. If another administrator resumes, the remaining calls run as them.
- While it winds down: A cancelled run still finishes the call it is making. Until then it can be neither resumed nor discarded.
Log and audit log
Every run is its own log: the page shows the script as it was simulated, who created, simulated and – at every execution and resumption – executed the run and when, and every call with arguments, prior state and result. “Log as CSV” in the tab “Log” delivers this without the script as a file, UTF-8 with a byte order mark and ; as the separator:
- a header with run, status, the SHA-256 of script and simulation, the times of creation, simulation, every execution and end – with names for creation and execution –, the note
via = script:<No.>, a line “File” with name, size and SHA-256 per file attached to the run and a line “Script through use()” with title, identifier and SHA-256 per script loaded throughuse(); - one row per call with No., Line, Kind, Function, Call, Arguments, Result, Message, Done at, Executed by, Before and the endpoint's response.
A cell a spreadsheet would read as a formula (it starts with =, +, - or @) is written with a leading '.
An executed run cannot be deleted. A run that was never executed is discarded with “Discard simulation”.
In the “Audit Log”:
- Every entry the calls of a run write carries the origin
script:<No.>. The audit log shows “Script #No.”, under the actor “via script #No.”. “View in the audit log” in the run shows exactly these entries. Changes by hand between simulation and execution do not carry the origin. - Every execution, also every resumption, writes the entry
script_run_executedwith the simulation's counts and the results, along with the files attached to the run (files: name, size, SHA-256) and the scripts loaded throughuse()(uses: identifier, title, SHA-256). - Every SQL change writes
script_sql_writewith the statement and the number of rows. - Saving and deleting in the library write
script_savedandscript_deleted. Creating, renaming or moving a folder writesscript_folder_saved, deleting itscript_folder_deleted, moving a scriptscript_movedwith the old and the new place. Places appear there as paths, shipped folders by their German title, whatever language the actor works in – as in the entries of the configuration transport; a shipped folder this release no longer has by its place in the files, for examplereports/old.
Reading with SQL
sql("SELECT …") reads as a free report does: exactly one SELECT, read-only, on the released views in schema reporting, with a time and cost limit. The views are named like the tables: users, roles, composite_roles, composite_role_members, user_assignments, target_systems, user_system_accounts, org_units, org_unit_users, org_unit_roles, positions, position_holders and audit_log. What they leave out, for example password hashes and the target systems' connection settings, is described under Requirements. At most 100,000 rows and about 50 million characters are read: the rows come page by page, and reading stops at the first page past either – also with a LIMIT of the statement.
The result is a list of dictionaries; named columns read like fields:
per_type = sql("SELECT user_type, count(*) AS number FROM users GROUP BY user_type")
for row in per_type:
print(row.user_type, row.number)The check in the editor already reports any statement other than SELECT. The tab “SQL” has an editor of its own with the views and their columns: “Run query” simulates show(sql("…")), the rows appear under “Output”; “Insert into the script” puts the query into the script at the cursor.
Changing with SQL
sql_write("UPDATE …") changes data directly in the database. It is off until the installation switches it on with NOVA_SCRIPTING_SQL_WRITE=1 in the configuration and a restart. Without the opt-in, the check in the editor already reports an error, and the simulation stops at that line.
- Allowed: exactly one
INSERT,UPDATEorDELETEon an existing table in schemapublic. - Refused, in the check as in the simulation:
- the tables
audit_log,provisioning_eventsandapp_settingsand Nova-Skript's own tablesscript_library,script_folders,script_runs,script_run_callsandscript_run_files; - tables outside schema
public, also for reading in a subquery; - secrets: the tables
password_historyandlogin_otp_codes, the tables of the second factor (plugin_mfa_enrollment,plugin_mfa_backup_code) and the keys, codes and tokens of the OIDC plugin (plugin_oidc_signing_key,plugin_oidc_auth_code,plugin_oidc_token); the password hashpassword_hash, the connection settingsconfigof target and source systems and the hashclient_secret_hashof the OIDC clients in a statement that names their table; a whole row of these tables –u,u.*,*,to_jsonb(u), column aliases – and anINSERT INTO userswithout a column list; - any other statement, for example
SELECT,WITHorTRUNCATE; - commands such as
CREATE,ALTER,DROP,GRANT,LOCKorTABLEanywhere in the statement – a column of that name is written in double quotes; - a second statement, comments and a change inside the change, for example in a subquery or with
FOR UPDATE; - functions that leave the transaction, reset sequences or read files of the server, for example
pg_…,dblink,set_configorsetval; - a character outside ASCII, a non-breaking space too, outside texts in single and names in double quotes.
- the tables
- The database, too, runs only the one statement: it refuses a second one,
COMMIT,SETorCREATE. - In the simulation, the statement runs in a transaction that is rolled back; the simulation shows how many rows it would change.
- At execution, Nova requires the typed number of calls and warns in red. The statement has 30 seconds. It is committed in one transaction with its audit entry
script_sql_writeand its result in the log: no change without its audit entry. - Errors: The database's message appears when it names only parts of the statement, for example a column that does not exist. A message that can quote stored values – for example a value that does not fit its type – appears without its text, with its SQLSTATE.
With the opt-in on, the tab “SQL” also points this out in red.
Library
The library is a tree of folders and scripts: the shipped ones and the administrators' own. A shipped script can be opened, changed in the editor and simulated; it is saved as a script of one's own. Own scripts have a title (at most 200 characters) and a description (at most 2,000 characters). When an own script is deleted, its runs with their logs are kept.
- Order: In every folder, the folders come first – the shipped ones, then the own ones by name –, then the scripts, the same way. A folder shows how many scripts it holds with its subfolders; a click opens or closes it. The folder of the script in the editor opens by itself.
- Search: “Search scripts and folders” finds titles, descriptions, a script's kind, the descriptions of the shipped folders and the notice of a missing shipped folder (see Folders). A matching folder shows all its contents, a matching script the folders above it.
- Menu “…” on every row: an own folder has “New subfolder”, “Rename”, “Move …” and “Delete”, an own script “Move …” and “Delete”, a shipped script “Copy to own library” and a shipped folder “New subfolder here”.
Folders
- Shipped folders order the shipped scripts: “Basics”, “Reports”, “Changes”, “Safety and control” and “SQL”, the first three with subfolders (see Shipped scripts). Neither they nor their scripts can be renamed, moved or deleted.
- Own folders are created at the top level with “New folder” next to the title “Library”, inside a folder with “New subfolder” or “New subfolder here” in the menu “…”. Own folders and own scripts may also lie in shipped folders, for example an own script in “Reports › Identities”.
- Names: at most 100 characters, without “/” and without control characters; blanks at the edges are dropped. No second folder in the same folder may bear the name, ignoring case – not even a shipped one, by its German or its English title: at the top level there is therefore no own folder “basics”, nor one called “Grundlagen”.
- Depth: at most five folder levels in the whole tree, the shipped ones included. “Basics › Texts” therefore takes three more levels of own folders. Where no level fits any more, “New subfolder” is disabled.
- Deleting: only an empty folder. If it still holds scripts or subfolders, the dialog names their number and “Delete” stays disabled – move or delete its contents first.
- After an update: If a new release no longer ships a folder, the own folders and scripts in it appear at the top level, with the notice “Shipped folder missing in this release”; the search finds them by this notice too. They keep their place: if a later release ships the folder again, they lie in it again. Only a move gives them a new place – the dialog “Move …” then has no target folder chosen yet, and “Top level” can be confirmed too; after that the notice is gone.
Moving
Own folders and own scripts change their place in two ways:
- “Move …” in the menu “…” opens a dialog with the “Target folder”: the top level, a shipped or an own folder. This is also the way with the keyboard.
- Drag and drop: drag an own item with the mouse onto a folder; the folder that takes it is highlighted. Items drop onto folders only; the top level is reached through the dialog. Shipped folders and scripts cannot be dragged.
The same rules apply both ways: a folder never goes into itself or into one of its subfolders, and a target in which it would reach deeper than five levels with its subfolders is disabled. Moving a script does not change its text.
Saving and copying
- “Save” in the editor's bar saves an own script where it lies; only “Move …” changes its folder.
- A new own script – a newly written one, a changed shipped one, a run's script – and “Save as a copy” in the menu “…” of the page header ask for title, description and “Folder”. The default is the folder of the library script in the editor – for a shipped one its shipped folder –, otherwise the top level.
- “Copy to own library” on a shipped script opens it, asking first when the editor holds unsaved changes, and asks for title, description and folder straight away.
- “Delete from the library” in the menu “…” of the page header deletes the own script in the editor, as “Delete” on its row in the library does.
Shipped scripts
Nova ships 71 scripts in five folders. They, too, change something only after their simulation is confirmed. Their settings are at the top in capitals, for example the table DATEN or the limit HOECHSTENS. Title and description follow the interface language; the scripts themselves – comments, output texts and variable names – are written in German. What the examples create starts with skript-demo- – the id of an entitlement or business role, the name of an org unit; “Removing the script examples again” clears it away.
In the library, a script's kind stands under its title, then its description:
| Kind | Meaning |
|---|---|
| Basics | explains the language by example; changes nothing, some read from Nova |
| Read | evaluates and shows what it finds; changes nothing |
| Change | records changes through Nova functions, executed after the confirmation |
| SQL | reads with sql() or changes with sql_write() |
| Control | shows the debugger and safety limits that stop a simulation |
| Own | a script of one's own |
Basics
The language step by step. No script in this folder changes anything.
Language
- Language basics – variables, lists, dictionaries, loops, conditions, text functions and output in one script.
- Variables and numbers – calculating with
+ - * / // %, rounding, turning text into numbers. - True, false and comparisons – comparisons,
and,or,notand which values count as false. - Deciding with if, elif and else – sorting values into bands,
a if b else c. - Repeating with for, range() and enumerate() – loops over lists, texts and dictionaries, counting and numbering.
- Controlling loops: break and continue – stopping at the first match, skipping entries, a bounded
forinstead ofwhile. - Working with dates: today() – reading the business day, splitting and comparing date texts, converting “31.12.2026”, calculating with
add_days(),days_between()andweekday(). - What is missing – and what to write instead – what works instead of methods,
lambda,while,try, sets,**anddel. - Own functions with def – parameters, defaults and
return, calls by position and by keyword; a function has variables of its own. - Function library: texts and lists – functions for other scripts, taken with
use("109_function_library"); simulating the script itself shows examples. - Functions from another script: use() – takes the function library's functions and uses them on one page of identities: names, e-mail addresses, a count per department.
Texts
- Building texts with f-strings –
+and f-strings, numbers with decimals, width, leading zeros and thousands separators. - Case and blanks – normalising e-mail addresses with
lower()andstrip()and comparing them regardless of case. - Finding and replacing –
in,contains(),startswith(),endswith(),replace(), counting occurrences. - Splitting and joining: split() and join() – splitting texts, separating e-mail addresses into name and domain, joining lists back into text.
- Parts of a text: substr() and slices –
[i],[a:b],[::-1],substr(), numbers with leading zeros.
Lists and dictionaries
- Creating and changing lists –
append(),extend(),+=, index and slice, copying, removing entries. - Dictionaries: keys and values –
d.field,d["field"],get(),keys(),values(),items(), merging two dictionaries. - Comprehensions: filtering and transforming – filtering and transforming in one line, “at least one” and “all” with
any()andall(). - Sorting with sorted() – by a field, descending and by two fields; empty values come last.
- Counting and grouping – counting with a dictionary, grouping rows, the largest group first.
- Calculating with number lists: sum, min, max, average – sum, minimum, maximum, average and shares, guarding against empty lists.
Output
- Output with print() and show() – text lines, values and tables; when a list appears as a table.
- Shaping tables: columns, titles, totals – own column names,
columns=, the first ten rows and a totals row.
Inputs and tables
- Reading tables with table() – reading a copied table, calculating with its cells and comparing it with the org units.
- Settings at the top, checked with assert and fail() – checking settings in capitals (“empty = default”) before the script works.
- Pasting a list: one value per line – dropping blank lines and
#comments, normalising the values, reporting duplicates. - table() in detail – tab, semicolon or comma, quotes, empty cells, numbers and a missing column.
- Reading a CSV file with file() – reads a file from the tab “Files” with
file()andtable()and matches its e-mail addresses against the identities; without a file, an example.
Calling Nova
- Resolving names: user(), role(), business_role(), org_unit(), system() – turning names, e-mail addresses and codes into IDs; candidates when a name finds nothing.
- Your first call of a Nova function –
nova.list_target_systems(), fields of the answer, a table. - Reading one page: limit, page, total – one page of
search_roleswithtotal,pagesandpage, paging by hand. - Every page at once with rows() – every page of a search with filters; which functions answer in pages.
- Reading answers: fields, get() and empty values – present and missing fields in an identity's details.
Reports
Scripts that only read and show what they find.
Identities
- Reading and evaluating identities page by page – every page of
search_users, counted per department, people without a manager. - Looking up an identity – profile, org units, business roles, direct entitlements and accounts.
- Counting identities: type, status, without assignment – by type, status, department and target system and those without any assignment, in one call.
- Leavers: who is leaving, who has left – active people with a leave date coming up and those whose leave date has passed.
Entitlements
- Entitlements without an owner – counted per origin, target system or Nova, critical ones first.
- Looking up an entitlement – origin, risk rating, owner, workflow, holders and the business roles that contain it.
- Entitlements by origin and risk rating – a cross table with row totals and a totals row.
Business roles
- Looking up a business role – entitlements and holders with validity and the org unit they have it through; assignments that end soon.
- Business roles: size, owner, area – number of entitlements and holders, those without owner, workflow or content, per business area.
Organisation
- Members of an org unit – the people whose department is the unit, with the add-on “Planstellen (OSP)” together with their position, and those assigned directly; the managers and the unit's business roles.
- The org unit tree – every unit indented with level, path, direct members and business roles.
Target systems and accounts
- Accounts of a target system – accounts per target system, accounts without an identity and inactive accounts.
- Looking up a target system – type, last connection check, accounts and what its connector can do.
- Provisioning log: the latest backend writes – counted per target system, action and status, the failed ones with their message.
Requests and workflows
- Open access requests – with requester, recipient, roles, waiting time and who decides now; every request by status, the partially approved ones included.
- Approval workflows and their steps – steps and approvers, how many entitlements and business roles use a workflow, workflows without a step.
Jobs and audit
- Jobs: schedule, last run, failures – schedule and last run per job, disabled jobs with a schedule, failed runs with the latest message.
- Audit log: what happened today – every entry of one day, today by default, counted per event and person.
Checks
- Org units without a manager – units with members but without a manager, and units without members or without business roles.
- Unused entitlements and empty business roles – entitlements without holders and without a business role, business roles without entitlements or without holders; Nova's rights roles do not count.
- Matching an e-mail list against Nova – the identities found with status, type, department and leave date, the addresses not found and the duplicates.
- What scripts have changed – the audit entries of executed scripts since the start of the month, counted per run and per event.
Changes
Scripts that change data in Nova: the simulation first, then the execution after your confirmation.
Entitlements
- Creating entitlements from a table – one Nova-owned entitlement per row; duplicate IDs in the table stop the simulation, existing ones are skipped.
- Renaming entitlements by a pattern – Nova-owned entitlements only, without Nova's rights roles, with a safety limit; imported matches are counted and left unchanged.
- Setting descriptions from a table – the script names unknown IDs, counts unchanged texts and skips both.
- Setting owners from a table – entitlement and e-mail address per row, Nova-owned entitlements only, without Nova's rights roles, with a safety limit.
Business roles
- A business role for everyone in an org unit – only active persons who do not hold it yet, with a safety limit; after the execution, provisioning starts when it is switched on.
- Creating a business role from entitlements – with the entitlements of a list; the script names unknown ones, refuses Nova's rights roles and skips an existing ID.
Organisation
- Creating org units from a table – name, parent unit and description per row; existing names are skipped, with a safety limit.
Identities
- Moving identities from a list to the recycle bin – e-mail addresses, with a safety limit; the leaver routine runs in the recycle bin. The execution requires the typed number.
- Extending a business role's validity – moves the end of time-limited assignments that end soon, with a safety limit; without a chosen business role it records nothing.
Cleanup
- Removing the script examples again – deletes the entitlements, business roles and org units
skript-demo-…the examples create, only without holders and members – for a unit, the holders of its positions count too –, with a safety limit. The execution requires the typed number.
Safety and control
- Safety limits with assert, fail() and upper bounds – checking inputs, stopping the simulation before the first change, at most a fixed number of changes per run.
- Debugging: step by step with breakpoints – a small script to try the debugger: set a breakpoint, “Debug”, then step by step or from breakpoint to breakpoint in the tab “Steps”.
SQL
- Reading evaluations with SQL – three queries on the views: identities by type and status, the largest business roles, accounts per target system.
- Changing data with SQL (opt-in only) – removes blanks at the edges of the descriptions of Nova-owned entitlements; without
NOVA_SCRIPTING_SQL_WRITE=1, the check reports an error. - Assignments that end soon (SQL) – business-role and direct assignments that end within the next
TAGEdays, calculated with the business day fromtoday().
Configuration transport
Own folders and own scripts travel from one environment to another with the configuration transport, for example from test to production, in the section “Scripts”. The section exists only when the add-on “Nova-Skript” is switched on in both the source and the target environment; what happens otherwise is described under Sections of plugins.
- In the file: every own folder with name and place and every own script with title, description, text and folder. Never in it: the shipped scripts – every release brings its own –, the runs with their logs and files, and who created or changed something when.
- Matched by a key: Every own folder and every own script has a key that stays when it is renamed, changed or moved; a copy gets a new one. Through it, the import finds the item again in the target environment and creates, changes or moves it. Nothing is deleted: what the file does not hold stays.
- Shipped folders are named by their place in the file. If the target environment does not have one of them, for example because it runs another release, the item goes to the top level, with a notice.
- The same rules as in the library: the import checks names, titles, lengths, depth and unique folder names as the user interface does. An object that breaks a rule is skipped with the reason. If a skipped folder is new to the target environment, everything in it is skipped too – for example when the target environment already has a folder of that name in the same place, created there by hand.
- Saved, with a notice: a script that does not parse, with the line of the error; a script with
sql_write()where the target environment has not opted in to changing with SQL; a script next to which another own script with the same title already lies in the same folder. use()by title: An own script gets an ID of its own in the target environment, and the import does not rewriteuse(12): there it would find another script or none. Scripts that travel therefore name an own library script by its title, see Functions from other scripts.- Preview: It shows folders as “Script folder” and scripts as “Script”. It shows a script's text as its number of lines and the first eight characters of its SHA-256 hash, for example “12 lines, 3f9a0c1e”, never the text itself. Places appear as paths, shipped folders by their German title, whatever the interface language. If the own export file is imported again, everything is unchanged.
- Evidence: Every folder taken over writes
script_folder_saved, every script taken overscript_saved, with old and new values and the reference to the import. - Limit: Folders and scripts count together against the 5,000 objects of a file.
A script travels verbatim, line by line, in the transport file, comments and settings included. The transport does not rewrite names of target systems or objects in the script text; whatever is named differently in the target environment has to be adjusted there by hand.