Kotlin: Simulation
Check who can do what in your project without changing anything with the Kotlin SDK.
Check who can do what in your project without changing anything. Every call runs as the client's signed-in user, so your project's policies and row-level security apply. Types and members are listed in source order; each one links to its HTTP endpoint where it maps to one.
#Types and members
SovariaSimulation
Who can do what in the live project — as visitors, the app's users and the team — with nothing written (Echo's simulation API). Call it as a team member (a console or CLI session), not as an app user.
A full run uses one simulation from the plan's allowance and runs one at a time per organization (409 SIMULATION_RUN_IN_PROGRESS); a filter that covers at most 25 request types is a free single-request check. Only the manifest_id from discover is sent, never manifest content.
class SovariaSimulation(private val transport: Transport)SovariaSimulation.pollIntervalMs
How often a background run is polled, and for how long (a run is stopped server-side after 10 minutes).
var pollIntervalMs: LongSovariaSimulation.timeoutMs
A property.
var timeoutMs: LongSovariaSimulation.discover
What a run would test (user types, resources, rules), trimmed to what you may read; its manifest_id can be passed to run for an hour.
suspend fun discover(): Map<String, Any?>SovariaSimulation.run
Run the simulation.
suspend fun run(manifestId: String? = null, filter: Map<String, String>? = null): Map<String, Any?>With a filter (resource, action, role — role is __guest__, __app_user__, app:<role> or a team role) the answer comes back at once; a full run starts in the background and is polled until it is complete (or throws when it failed).
SovariaSimulation.change
Try a change before making it; nothing is written.
suspend fun change(payload: Map<String, Any?>): Map<String, Any?>mapOf("kind" to "policy", "policy" to mapOf("spl_source" to …)) lists who gains and who loses access; mapOf("kind" to "sql", "sql" to …) runs the script with every check and rolls it back.
SovariaSimulation.plan
Trace planned operations through every layer without sending them.
suspend fun plan(payload: Map<String, Any?>): Map<String, Any?>SovariaSimulation.listRuns
The project's runs, newest first (limit 1–100).
suspend fun listRuns(limit: Int? = null, offset: Int? = null): Map<String, Any?>SovariaSimulation.quota
Real runs used and allowed today (UTC) and this month: {day: {used, limit, resets_at}, month: …}.
suspend fun quota(): Map<String, Any?>SovariaSimulation.listIntended
Outcomes the team marked as intended: {intended: [{mark_id, role, action, resource, outcome, note, …}]}.
suspend fun listIntended(): Map<String, Any?>SovariaSimulation.markIntended
Mark an outcome as intended (outcome "ALLOW" or "DENY"): matching cases show green on every run and leave the findings.
suspend fun markIntended(role: String, action: String, resource: String, outcome: String, note: String? = null): Map<String, Any?>Needs policies.write; marking the same role/action/resource again replaces it.
SovariaSimulation.unmarkIntended
Remove an intended-outcome mark; matching cases show as measured again.
suspend fun unmarkIntended(markId: String): Map<String, Any?>SovariaSimulation.topology
Callers, gateway checks, sign-in, resources and connectors (platform defences as "Platform protection").
suspend fun topology(): Map<String, Any?>SovariaSimulation.limits
Every limit the project lives under, with its value and how it is counted.
suspend fun limits(): Map<String, Any?>SovariaSimulation.integrationRun
One integration flow under a programmed outcome: modelled (free, nothing sent) or sealed (real code path, recorded, one single-request check).
suspend fun integrationRun(connectorId: String, flowId: String, outcome: String = "", mode: String = ""): Map<String, Any?>SovariaSimulation.drillsRun
The 14 security drills judged from the project's configuration, with an optional what-if draft (never saved).
suspend fun drillsRun(drillIds: List<String>? = null, overrides: Map<String, Any?>? = null): Map<String, Any?>SovariaSimulation.runArtifacts
What a run's sealed send points would have sent (secrets masked).
suspend fun runArtifacts(runId: String): Map<String, Any?>SovariaSimulation.getRun
One run with every case's result.
suspend fun getRun(runId: String): Map<String, Any?>SovariaSimulation.compareRuns
What changed between two runs: regressions, improvements, new failures.
suspend fun compareRuns(targetRunId: String, baselineRunId: String): Map<String, Any?>