Access Control Model - Content Management
Access Control Model
Architecture
An access control profile (KalturaAccessControlProfile) contains an ordered array of rules (KalturaRule). Each rule has:
- conditions -- array of
KalturaConditionobjects (AND logic: ALL must be true) - actions -- array of
KalturaAccessControlActionobjects (what to enforce) - contexts -- array of
KalturaAccessControlContextTypeHolder(when to evaluate: PLAY, DOWNLOAD, THUMBNAIL) - message -- message to return to the player when rule fires
- stopProcessing -- if true and conditions met, skip remaining rules
Rule Evaluation Logic
- Rules evaluate in array order
- Each rule evaluates only if its
contextsmatch the current request context (PLAY for playManifest, DOWNLOAD for raw/download, THUMBNAIL for thumbnails). A rule with no contexts evaluates in all contexts. - A rule is fulfilled when ALL its conditions evaluate to true (AND logic)
- When fulfilled, the rule's actions are added to the outcome and its message is added to the outcome messages
- If
stopProcessingis true on a fulfilled rule, remaining rules are skipped - All accumulated actions execute
- If no rule matches, content is allowed (default: allow)
Access Control Scope
When access control is evaluated, the server constructs a KalturaAccessControlScope from the request:
| Field | Type | Description |
|---|---|---|
contexts | array | Which contexts to test (no context = any context) |
ip | string | Request IP address for geographic conditions |
ks | string | Kaltura session for authentication/user conditions |
referrer | string | Page URL for domain conditions |
time | integer | Unix timestamp for scheduling (null = server time) |
userAgent | string | Browser/client application for agent conditions |