Cedarling Properties#
These Bootstrap Properties control default application level behavior.
Required properties for startup#
CEDARLING_APPLICATION_NAME: Human friendly identifier for this Cedarling instance.
To enable usage of principals at least one of the following keys must be provided:
-
CEDARLING_WORKLOAD_AUTHZ: Whenenabled, Cedar engine authorization is queried for a Workload principal. Default isdisabled. -
CEDARLING_USER_AUTHZ: Whenenabled, Cedar engine authorization is queried for a User principal. Default isdisabled.
To load policy store one of the following keys must be provided:
-
CEDARLING_POLICY_STORE_LOCAL: JSON object as string with policy store. You can use this converter. -
CEDARLING_POLICY_STORE_URI: URL to fetch policy store from. Cedarling automatically detects the format: - URLs ending in
.cjar→ loads as Cedar Archive -
Other URLs → loads as legacy JSON from Lock Server
-
CEDARLING_POLICY_STORE_LOCAL_FN: Path to local policy store. Cedarling automatically detects the format: - Directories → loads as directory-based policy store
.cjarfiles → loads as Cedar Archive.jsonfiles → loads as JSON.yaml/.ymlfiles → loads as YAML
New Directory-Based Format (Native platforms only):
Cedarling now supports a directory-based policy store format with human-readable Cedar files. See Policy Store Formats for details.
Note: In WASM environments, only CEDARLING_POLICY_STORE_URI and CEDARLING_POLICY_STORE_LOCAL are available. File and directory sources (CEDARLING_POLICY_STORE_LOCAL_FN) are not supported in WASM due to lack of filesystem access.
Note
All other fields are optional and can be omitted. If a field is not provided, Cedarling will use the default value specified in the property definition.
Auxiliary properties
-
CEDARLING_POLICY_STORE_ID: The identifier of the policy store in case there is more than one policy_store_id in the policy store. -
CEDARLING_PRINCIPAL_BOOLEAN_OPERATION: property specifies whether to authorize theUSER,WORKLOADor both when making authorization decisions. Use"===": [{"var": "Jans::User"}, "ALLOW"]if you only want user authorization. Use"===": [{"var": "Jans::Workload"}, "ALLOW"]if you only want workload authorization. See here if you want anything more complicated. -
CEDARLING_TOKEN_CACHE_MAX_TTL: Allows to limit maximum token cache TTL in seconds. (Token cache is used to avoid decoding and validation same token twice, so it is optimization.) Default value is zero what means disable maximum TTL and will be usedexptoken field to calculate TTL. -
CEDARLING_TOKEN_CACHE_CAPACITY: Maximum number of tokens the cache can store. Default value is 100. 0 means no limit. -
CEDARLING_TOKEN_CACHE_EARLIEST_EXPIRATION_EVICTION: Enables eviction policy based on the earliest expiration time. When the cache reaches its capacity, the entry with the nearest expiration timestamp will be removed to make room for a new one. Default value istrue. -
CEDARLING_TRUSTED_ISSUER_LOADER_TYPE:SYNC|ASYNC-- Type of trusted issuer loader. If not set, synchronous loader is used. Sync loader means that trusted issuers will be loaded on initialization. Async loader means that trusted issuers will be loaded in background. Default isSYNC. -
CEDARLING_TRUSTED_ISSUER_LOADER_WORKERS: Number of concurrent workers to use when loading trusted issuers. Applies to bothSYNC(parallel loading during initialization) andASYNC(parallel background loading) modes. Default is 10 for native targets (max 1000) or 2 for WASM targets (max 6). Values are clamped between 1 and the target-specific maximum. Zero becomes 1.
Cedar Entity Mapping properties
CEDARLING_MAPPING_USER: Name of Cedar User schema entity if we don't want to use default. When specified Cedarling try build defined entity (from schema) as user instead of defaultUserentity defined incedarschema. Works in namespace defined in the policy store. Default value:Jans::User.CEDARLING_MAPPING_WORKLOAD: Name of Cedar Workload schema entity. Default value:Jans::Workload.CEDARLING_MAPPING_ROLE: Name of Cedar Role schema entity. Default value:Jans::Role.CEDARLING_UNSIGNED_ROLE_ID_SRC: The attribute that will be used to create the Role entity when using the unsigned interface. Defaults to"role".CEDARLING_MAPPING_TRUSTED_ISSUER: Mapping name of cedar schema TrustedIssuer entity. Default value:Jans::TrustedIssuer.
The following bootstrap properties are needed to configure log behavior:
CEDARLING_LOG_TYPE:off,memory,std_out. Default isoff.CEDARLING_LOG_LEVEL: System Log Level See here. Default toWARNCEDARLING_DECISION_LOG_USER_CLAIMS: List of claims to map from user entity, such as ["sub", "email", "username", ...]CEDARLING_DECISION_LOG_WORKLOAD_CLAIMS: List of claims to map from workload entity, such as ["client_id", "rp_id", ...]CEDARLING_DECISION_LOG_DEFAULT_JWT_ID: Token claims that will be used for decision logging. Default is "jti", but perhaps some other claim is needed.CEDARLING_LOG_TTL: in case ofmemorystore, TTL (time to live) of log entities in seconds.CEDARLING_LOG_MAX_ITEMS: Maximum number of log entities that can be stored using Memory logger. If used0value means no limit. And If missed or None, default value is applied.CEDARLING_LOG_MAX_ITEM_SIZE: Maximum size of a single log entity in bytes using Memory logger. If used0value means no limit. And If missed or None, default value is applied.CEDARLING_STDOUT_MODE: Logging mode for stdout logger:asyncorimmediate(default). Only applicable for native targets (not WASM). Defaults toimmediate.CEDARLING_STDOUT_TIMEOUT_MILLIS: Flush timeout in milliseconds for async stdout logging. Only applicable for native targets (not WASM). Defaults to 100 ms.CEDARLING_STDOUT_BUFFER_LIMIT: Buffer size limit in bytes for async stdout logging. Only applicable for native targets (not WASM). Defaults to 1 MB (2^20 bytes).
The following bootstrap properties are needed to configure JWT and cryptographic behavior:
-
CEDARLING_LOCAL_JWKS: Path to a local file containing a JWKS -
CEDARLING_JWT_SIG_VALIDATION:enabled|disabled-- Whether to check the signature of all JWT tokens. This requires anissis present. Default isdisabled. CEDARLING_JWT_STATUS_VALIDATION:enabled|disabled-- Whether to check the status of the JWT. On startup, the Cedarling should fetch and retrieve the latest Status List JWT from the.well-known/openid-configurationvia thestatus_list_endpointclaim and cache it. See the IETF Draft for more info. Default isdisabled.CEDARLING_JWT_SIGNATURE_ALGORITHMS_SUPPORTED: Only tokens signed with these algorithms are acceptable to the Cedarling. If not specified, all algorithms supported by the underlying library are allowed.-
CEDARLING_ID_TOKEN_TRUST_MODE:strict|never|always|ifpresent. Varying levels of validations based on the preference of the developer. -
strict(default): Enforces strict validation rules:- ID token
audmust contain the access tokenclient_id(theaudfield is an array that must contain theclient_id) - If userinfo token is present, its
submust match the ID tokensub
- ID token
never: Disables ID token validation entirely (useful for testing)always: Always validates ID tokens when present (less strict thanstrictmode) - Not yet implementedifpresent: Validates ID tokens only if they are provided - Not yet implemented
The following bootstrap properties are for advanced configuration:
CEDARLING_MAX_BASE64_SIZE: Maximum size in bytes for Base64-encoded content (policies, schema, etc.)CEDARLING_MAX_DEFAULT_ENTITIES: Maximum number of default entities that can be loaded from the policy store.
The following bootstrap properties are needed to configure the Context Data API:
-
CEDARLING_DATA_STORE_MAX_ENTRIES: Maximum number of entries that can be stored in the data store. Default value is10000. Set to0for unlimited entries. -
CEDARLING_DATA_STORE_MAX_ENTRY_SIZE: Maximum size per entry in bytes. Default value is1048576(1 MB). Set to0for unlimited size. -
CEDARLING_DATA_STORE_DEFAULT_TTL: Default TTL (Time To Live) in seconds for entries that don't specify a TTL. Default value isNone(entries will not expire). When set, entries without an explicit TTL will use this value. -
CEDARLING_DATA_STORE_MAX_TTL: Maximum allowed TTL in seconds. Default value is3600(1 hour). Entries with TTL exceeding this value will be rejected. Omit this property for unlimited TTL. -
CEDARLING_DATA_STORE_ENABLE_METRICS: Whether to enable metrics tracking for data entries (access counts, etc.). Default value istrue. -
CEDARLING_DATA_STORE_MEMORY_ALERT_THRESHOLD: Memory usage threshold percentage (0.0-100.0) for triggering alerts. Default value is80.0. When capacity usage exceeds this threshold,memory_alert_triggeredwill betruein statistics.
The following bootstrap properties are only needed for the Lock Server Integration.
CEDARLING_LOCK:enabled|disabled. Ifenabled, the Cedarling will connect to the Lock Server for policies, and subscribe for SSE events. Default isdisabled.CEDARLING_LOCK_SERVER_CONFIGURATION_URI: Required ifLOCK==enabled. URI where Cedarling can get JSON file with all required metadata about the Lock Server, i.e..well-known/lock-master-configuration.CEDARLING_LOCK_DYNAMIC_CONFIGURATION:enabled|disabled, controls whether Cedarling should listen for SSE config updates. Default isdisabled.CEDARLING_LOCK_SSA_JWT: SSA for DCR in a Lock Server deployment. The Cedarling will validate this SSA JWT prior to DCR.CEDARLING_LOCK_LOG_INTERVAL: How often to send log messages to Lock Server (0 to turn off transmission).CEDARLING_LOCK_HEALTH_INTERVAL: How often to send health messages to Lock Server (0 to turn off transmission).CEDARLING_LOCK_TELEMETRY_INTERVAL: How often to send telemetry messages to Lock Server (0 to turn off transmission).CEDARLING_LOCK_LISTEN_SSE:enabled|disabled: controls whether Cedarling should listen for updates from the Lock Server. Default isdisabled.CEDARLING_LOCK_ACCEPT_INVALID_CERTS:enabled|disabled: Allows interaction with a Lock server with invalid certificates. Mainly used for testing. Doesn't work for WASM builds. Default isdisabled.