# AAYU security and AI data boundaries

## Authentication

Personal API routes require an opaque bearer session token. Tokens are credentials and must
not be pasted into prompts, committed to source control or placed in public URLs.

## Data isolation

Database access is scoped to the authenticated user. Coach access is separately constrained
to active coach–trainee relationships and does not include raw journals or private AI chats.

## AI processing

AAYU uses Google Gemini for functions such as transcription, meal estimation, report
extraction and AI coaching. Only the information required for the requested function should
be sent to the processor. Generated output can be wrong and is not medical advice.

## Connected AI tools

The public AAYU MCP connector uses OAuth discovery, dynamic client registration, PKCE,
five-minute one-use codes, audience-bound one-hour access tokens, and rotating 30-day refresh
tokens. Credentials are stored server-side only as hashes and never appear as model-visible
tool arguments. The public endpoint exposes an explicit read-only tool allowlist; normal app
write routes reject its credentials. A local developer connector remains available separately.

Security questions: support@brainalyse.tech
