ocisim reference

Reference tables for ocisim CLI commands and flags, environment variables, default identity constants, OCI REST endpoints, and exit codes.

CLI commands and flags

Command or flag Default Description
ocisim --version none Print ocisim version string and exit 0.
ocisim --help, -h none Print usage instructions and exit 0.
ocisim serve | start foreground Start the local OCI emulator on 127.0.0.1.
--port <port> 4599 Loopback TCP port for the HTTP listener.
--data-dir <path> in-memory Directory to persist Object Storage, IAM, and Queue state across restarts.
--auth open | enforce open Select open multi-tenancy isolation or enforced RSA-SHA256 signature and IAM policy evaluation.
--auth-config <file> unset Path to the JSON credentials and IAM policy file required in enforce mode.

Environment variables and default identity

Variable or constant Default value Purpose
OCISIM_AUTH, SIM_AUTH open Set to enforce to enable two-layer RSA signature and IAM policy checks (overridden by --auth).
OCISIM_AUTH_CONFIG, SIM_AUTH_CONFIG unset Path to the JSON auth configuration file (overridden by --auth-config).
FLOCI_OCI_SERVICES_FUNCTIONS_MOCK, FLOCI_OCI_SERVICES_OKE_MOCK true Keep Functions and OKE services in container-free mock mode by default.
Default tenancy OCID ocid1.tenancy.oc1..flocilocaltenancy0000000000000000000000000000000000000000 Default local tenancy OCID in open mode.
Default user OCID ocid1.user.oc1..flocilocaluser00000000000000000000000000000000000000000000 Default local user OCID in open mode.
Default namespace and region floci-local / us-ashburn-1 Default Object Storage namespace and OCI region.

HTTP service endpoints

Service Path pattern on 127.0.0.1:4599 Operations
Health check GET /_floci-oci/health Anonymous readiness endpoint in both open and enforce modes.
Object Storage /n, /n/{namespace}/b/{bucket}, /n/{namespace}/b/{bucket}/o/{object} GetNamespace, Create/Get/List/DeleteBucket, Put/Get/Head/Delete/List/RenameObject.
Queue /20210201/queues and /20210201/queues/{queueId}/messages Create/Get/List/DeleteQueue, PutMessages, GetMessages, DeleteMessage.
Identity (IAM), Streaming, Vault, KMS, Secrets /20160918/compartments, /20160918/regions (Identity) Identity regions and compartment create/list are covered by the integration tests; the other services run in-process on the same port.

Exit codes

Code Meaning
0 Clean server shutdown or --version / --help output.
2 Invalid CLI arguments or unreadable/invalid --auth-config file.
3 Server startup or runtime failure (such as port already in use).