The AuthorizationRule schema defines access control policies for HTTP requests based on path patterns, HTTP methods, user roles, usernames, and CSS selectors.
Schema URL: https://rustybeam.net/schema/AuthorizationRule
Property | Type | Cardinality | Description |
---|---|---|---|
path | https://rustybeam.net/schema/Text | 1 | Path pattern to match (supports wildcards and {username} placeholder, e.g., "/admin/*", "/users/{username}/*") |
method | https://rustybeam.net/schema/Text | 1 | HTTP method(s) to match (supports wildcards and comma-separated values, e.g., "GET", "PUT,POST,DELETE", "*") |
role | https://rustybeam.net/schema/Text | 0..1 | Required user role for access (e.g., "administrators", "users") |
username | https://rustybeam.net/schema/Text | 0..1 | Required username for access (supports {username} placeholder for matching authenticated user) |
selector | https://rustybeam.net/schema/Text | 0..1 | CSS selector to restrict access to specific HTML elements (e.g., "ul.entry") |
action | https://rustybeam.net/schema/Permission | 1 | Action to take when rule matches (Allow or Deny) |
<tr itemprop="rule" itemscope itemtype="https://rustybeam.net/schema/AuthorizationRule">
<td itemprop="path">/admin/*</td>
<td itemprop="method">*</td>
<td itemprop="role">administrators</td>
<td itemprop="action">Allow</td>
</tr>
<tr itemprop="rule" itemscope itemtype="https://rustybeam.net/schema/AuthorizationRule">
<td itemprop="path">/users/{username}/*</td>
<td itemprop="method">*</td>
<td itemprop="username">{username}</td>
<td itemprop="action">Allow</td>
</tr>
<tr itemprop="rule" itemscope itemtype="https://rustybeam.net/schema/AuthorizationRule">
<td itemprop="path">/guestbook/*</td>
<td itemprop="method">POST</td>
<td itemprop="selector">ul.entry</td>
<td itemprop="action">Allow</td>
</tr>