Schema definition for the Authorization Plugin, which provides role-based access control and path-based authorization rules.
Property | Value |
---|---|
Schema URL | https://rustybeam.net/schema/AuthorizationPlugin |
Parent Schema | https://rustybeam.net/schema/AuthPlugin |
Description | Role-based access control with path-specific authorization rules |
Property | Type | Cardinality | Description |
---|---|---|---|
authfile | https://rustybeam.net/schema/URL | 0..1 | Path to HTML file containing user and authorization rule definitions. Supports file:// URLs. Contains User and AuthorizationRule microdata. |
name | https://rustybeam.net/schema/Text | 0..1 | Plugin instance name for logging and identification. Defaults to "authorization" if not specified. |
<tr itemscope itemtype="https://rustybeam.net/schema/AuthorizationPlugin">
<span itemprop="library">file://./plugins/librusty_beam_authorization.so</span>
<span itemprop="authfile">file://./auth/users.html</span>
</tr>
<tr itemscope itemtype="https://rustybeam.net/schema/AuthorizationPlugin">
<span itemprop="library">file://./plugins/librusty_beam_authorization.so</span>
<span itemprop="authfile">file://./examples/guestbook/auth/index.html</span>
<span itemprop="name">guestbook_authz</span>
</tr>
The authorization file referenced by authfile
should contain User and AuthorizationRule microdata:
<!-- Users with roles -->
<div itemscope itemtype="https://rustybeam.net/schema/Credential">
<span itemprop="username">admin</span>
<span itemprop="role">administrator</span>
<span itemprop="role">user</span>
</div>
<!-- Authorization rules -->
<div itemscope itemtype="https://rustybeam.net/schema/AuthorizationRule">
<span itemprop="username">admin</span>
<span itemprop="path">/admin/*</span>
<span itemprop="action">allow</span>
<span itemprop="method">GET</span>
<span itemprop="method">POST</span>
</div>
This schema inherits from the AuthPlugin schema, which provides:
authfile
- Authentication/authorization file pathrealm
- Authentication realm nameAnd ultimately from the base Plugin schema, which provides:
library
- Plugin library pathplugin
- Base plugin reference propertyauthfile
property should be a valid file path or file:// URLname
property should be unique if multiple authorization plugins are used