You're offline — showing cached data

Wiki

05-authentication/overview
2026-06-13 07:27:05 SAST
Wiki Home → 05-authentication/overview

Authentication Overview

How Luci authenticates with external services: OAuth flows, API keys, SSH keys, credential storage, and token refresh patterns.

OAuth Flows

Microsoft 365 (Graph API)

Login sequence: 1. python graph_api.py login requests a device code from Azure AD 2. User visits https://microsoft.com/devicelogin and enters the code 3. Script polls the token endpoint until user authenticates 4. Access token + refresh token cached to ~/.graph-api-token.json

Google Workspace (GWS)

Auth Portal (Web-based Token Management)

API Keys

All API keys are stored as environment variables on the server and documented in ~/.claude/vault/secrets/api-keys.md. The master reference with full per-project breakdown lives in SecondBrain.

Services with API keys:

Service Env Var Auth Method
Google Gemini GEMINI_API_KEY API key (free tier)
Google Gemini (paid) GEMINI_API_KEY_PAID API key (Tier 2 Postpay)
Anthropic ANTHROPIC_API_KEY API key
OpenAI/Codex OPENAI_API_KEY CLI only (OAuth)
Brave Search BRAVE_API_KEY API key (MCP server)
Tavily TAVILY_API_KEY API key (MCP server)
WebScrapingAPI WEBSCRAPINGAPI_KEY API key
Hetzner Cloud HETZNER_API_TOKEN API token
Linear Static token API token
Asana Static token Personal access token
Notion Static token Integration token
Make.com Webhook URL No auth (URL is the secret)
Fireflies.ai Static token GraphQL API key
Home Assistant Static token Long-lived access token

Key patterns: - One Anthropic key shared across projects - Separate OpenAI/Gemini keys per project - 4 GitHub PATs -- Mission Control PAT (ghp_Kjhq...) is the active one for Luci - Luci uses MC PAT via ~/.git-credentials (credential store) for all HTTPS git push

SSH Keys

SSH keys are stored at ~/.claude/vault/secrets/ssh/: - id_ed25519 / id_ed25519.pub -- primary Ed25519 keypair - echo-key.pem -- PEM key for Echo server access - config -- SSH client configuration - README.md -- documentation

Infrastructure connectivity: - Luci (Hetzner): lucienne@100.118.207.3 (Tailscale IP) - SSH config and network topology documented in ~/.claude/vault/infrastructure/

Credential Storage Locations

Location Contents
~/.claude/vault/secrets/api-keys.md Quick reference of all API keys
~/.claude/vault/secrets/api_keys.env Environment variable exports
~/.claude/vault/secrets/passwords.md POPIA document passwords (SA financial institutions)
~/.claude/vault/secrets/ssh/ SSH keys and config
~/.claude/vault/secrets/ha-credentials.env Home Assistant credentials
~/.claude/vault/secrets/spotify-credentials.env Spotify API credentials
~/.graph-api-token.json M365 work OAuth token cache
~/.graph-api-token-personal.json M365 personal OAuth token cache
~/.config/gws/credentials.json Google Workspace OAuth tokens
~/.config/gws/client_secret.json Google OAuth client config
~/.dropbox-api-token.json Dropbox API token
~/.git-credentials GitHub PAT for git push
Environment variables Runtime API keys (loaded from .bashrc)

Token Refresh Patterns

M365 Graph API

Google Workspace

OAuth Health Check

Unified Cloud Search

Related Articles

Key Takeaways

Help