Roles and login
People log in once and get a role. Nobody handles a bot API password: the hub adds each bot's key per request, after it has checked the role and the owner.
Roles
| Role | Can |
|---|---|
| viewer | read their own bots. No money figures on Compare and Risk |
| operator | read and change their own bots, run replays and comparisons of them |
| admin | everything, on every bot, plus the watchlist |
Every write needs the header X-Wickfleet-Request: 1, which another site cannot send with your cookie. Operators always own what they create. Only admins set an owner.
Login modes
WICKFLEET_AUTH | Who says who you are |
|---|---|
builtin | the hub: local users with argon2id hashes, one role each. The quick start uses this |
proxy (default) | oauth2-proxy in front of the hub, so any OIDC provider (Kanidm, Keycloak, Authentik and others). Roles come from IdP groups |
demo | nobody: every visitor is the viewer demo. See Demo mode |
Built-in login
| First admin | wickfleet-hub setup-token in the hub container prints a one-time token, valid 1 hour. /hub/login asks for it while no user exists |
| More users | wickfleet-hub user add <name> <role> with the password on stdin, user del, user list. A running hub picks the change up at once |
| Session | cookie, Secure, HttpOnly, SameSite=Strict, 12 hours, kept in memory |
| Sign out | /hub/login?signout |
| Rate limit | 5 failed logins per user and address, 20 per address, in 15 minutes |
OIDC through oauth2-proxy
oauth2-proxy handles the login and sends the user and groups as headers. The hub trusts those headers only next to a shared key the proxy adds (WICKFLEET_AUTHZ_KEY_FILE). Client copies of identity headers are dropped in every mode.
| IdP group | Role |
|---|---|
trade_viewers | viewer |
trade_operators | operator |
trade_admins | admin |
Names are matched on the part before @. WICKFLEET_ROLE_GROUPS replaces the mapping, for example players=viewer,admins=admin.