Doc Server is a Web Server in Rust for static content with Control access via authorizations, fully customizable with settings.
DocServer is created to:
-
Serve several static contents paths from one web server instance at once. Server is based in Rust Axum crate under Tokio, with a lot of config settings to customize in a config TOML file: SSL, Paths, Menus, Keys, Contents, Roles, etc.
-
Use static contents from mdbooks with fixed absolute links via site-url or code docs from Cargo doc.
-
Protect access to static contents with users authentication and authorizations by url_path prefix, roles or users login names or emails.
-
Define access policies to enfoce for content access with Casbin
-
Handle user defininition: Create/Invite, SignIn/SignOut, Settings, Roles, Administration. Several users modes can be set via config settings.
-
For user authentication use Argon2 for password and TOPT as 2FA with optional mail service for notifications
-
Sessions are stored in async sqlx to Sqlite or File storages and keys handled via cookie set, for larger use sqlx as Database Agnostic provides other SQL options
-
Session data is saved as a Pasetoken with asymmetric encripted data without passwords or TOPT codes.
-
Some requests responses are created by a template engine, so can be customized to some use cases.
-
-
Optionally request can be traced in sessions logs
Control access to static contents paths from one web server instance
Tested with mdbooks with fixed absolute links via site-url or code docs