Bioflow AI

Authentication and Roles

Understand BioFlow AI sessions, CSRF protection, account management, and role permissions

BioFlow AI uses server-side sessions backed by Redis. After sign-in, the browser receives an HttpOnly session_id cookie and a readable csrf_token cookie; Redis stores only the SHA-256 digest of the random session ID.

Session lifecycle

  • Sliding expiry: Active requests extend the idle timeout (default 24 hours), up to the absolute lifetime (default 7 days).
  • Sign-in and sign-out: Signing in replaces any existing session in that browser; signing out deletes the current session immediately.
  • Device and password security: Sign out other devices revokes all sessions for the account except the current browser. Changing a password revokes other sessions and rotates the current one.
  • Safe fallback: If Redis restarts or a session record is lost, the user is signed out cleanly and can sign in again.

All state-changing requests (POST, PUT, PATCH, DELETE) must include an X-CSRF-Token header. The API verifies that it matches both the csrf_token cookie and the value bound to the Redis session, and checks the request Origin against network.cors_origins.

Always serve production deployments over HTTPS with cookie_secure = true. Keep cookie_secure = false strictly for local HTTP development; SameSite=None requires secure cookies to be enabled.

Accounts and passwords

Public self-registration is disabled. Administrators create accounts, activate or deactivate users, change roles, and reset passwords under Settings → User Management. Changing a user's role, status, or password immediately revokes all of that user's active sessions, and the last active administrator cannot be deactivated or downgraded.

Users can change their own password and sign out other devices from the account menu. Passwords must be non-empty and at most 128 UTF-8 bytes (the strength indicator is advisory only), and are hashed with Argon2id.

Failed sign-in responses never disclose whether an email address exists. By default, each normalized email is limited to 10 failed attempts per 15-minute window, and a successful login resets the counter.

Roles and permissions

All business endpoints require an active signed-in session. “Public” resources are visible to signed-in users, not anonymous visitors.

CapabilityVisitorMemberAdmin
Read public project metadata, sample summaries, public workflows, and tool catalogsYesYesYes
Read private resourcesNoOwnAll
Create projects, workflows, agents, and runsNoYesYes
Edit or delete resourcesNoOwnAll
Access runs, tasks, logs, monitoring data, and output filesNoOwnAll
Manage tools, images, models, and usersNoNoYes

Requests for a specific resource outside the user's scope return 404; calling an endpoint outside the user's role returns 403. Runs, tasks, logs, monitoring metrics, and output files always remain private, even on public projects.

On this page