The BasicAuthPlugin schema defines the configuration for HTTP Basic Authentication in Rusty Beam. This plugin challenges users for username/password credentials and validates them against a user file.
Schema URL: https://rustybeam.net/schema/BasicAuthPlugin
Parent Schema: https://rustybeam.net/schema/AuthPlugin
Property | Type | Cardinality | Description | Source |
---|---|---|---|---|
library |
URL | 1 | Plugin library path | Plugin |
authfile |
URL | 0..1 | Path to user credentials file | AuthPlugin |
realm |
Text | 0..1 | Authentication realm displayed to users | AuthPlugin |
<td itemprop="plugin" itemscope itemtype="https://rustybeam.net/schema/BasicAuthPlugin">
<span itemprop="library">file://./plugins/librusty_beam_basic_auth.so</span>
<span itemprop="realm">Admin Area</span>
<span itemprop="authfile">file://./auth/users.html</span>
</td>
The authfile
should contain Credential items with authentication information:
<tr itemscope itemtype="https://rustybeam.net/schema/Credential">
<td><span itemprop="username">admin</span></td>
<td><span itemprop="password">$2b$12$LQv3c1yqBWVHxkd0LHAkCOYz6TtxMQJqhN8/LeF</span></td>
<td><span itemprop="role">administrators</span></td>
</tr>
WWW-Authenticate: Basic realm="[realm]"
Authorization: Basic [base64]
headerauthenticated_user
metadata for downstream pluginsBasic Auth typically runs before Authorization plugin to establish user identity. The Authorization plugin then uses the authenticated_user
metadata to check permissions.
Browsers will display a login dialog when challenged with Basic Auth. For modern applications, consider using OAuth2 plugins instead for better user experience.