โ† Back to User Management

๐Ÿ” User Management

User management, scoped access control, and multi-method authentication for scottfelten.com services.

v2.0 โ€” Live 18 Services 3 Auth Methods March 2026

1 Overview

User Management is the identity and access layer for all scottfelten.com services. It controls who can sign in, what they can access, and how they authenticate โ€” all from a single dashboard.

๐Ÿ”ต Google SSO

Sign in with Google. Primary method for team members and close collaborators. Powered by oauth2-proxy.

โœจ Magic Link

One-time login link sent to email. No password needed. Great for clients and external partners.

๐Ÿ”‘ Email + Password

Traditional login with bcrypt hashing. 12-char minimum. Lockout protection. Password reset via email.

๐Ÿ’ก How it works: Every scottfelten.com service checks with User Management before letting anyone in. When a user visits any service, User Management verifies their session and checks if they have permission for that specific service.

2 Adding a User

  1. Click "+ Add User" on the dashboard
    Opens the user creation modal with all configuration options.
  2. Enter their email and name
    Email is their login identifier. Must be unique across all users.
  3. Choose their role
    Client โ€” external user, limited access.
    Partner โ€” business collaborator (e.g., Colum for IAG).
    Admin โ€” full access to everything including this dashboard.
  4. Select auth method(s)
    Pick one or more: Google (they need a Google account), Magic Link (any email works), or Password (you set their initial password, or they can set it later via reset).
  5. Assign services
    Check individual services they should access, or select All Services (*) for unrestricted access. Services are auto-populated from the project inventory โ€” always current.
  6. Optional: Add tags
    Comma-separated labels for organization (e.g., "partner, bpo-expert"). Purely informational for now.

โšก Quick example โ€” Adding Colum (IAG partner):
Email: colum@whatever.com ยท Role: Partner ยท Auth: Magic Link ยท Services: iag-website, iag-data-viewer, intellicert, usecasegen

3 Auth Methods โ€” How Each Works

๐Ÿ”ต Google SSO

The primary auth method. Uses oauth2-proxy to handle the Google OAuth flow. When a user visits a service:

Requirement: User must have a Google account, and their email must be in the allowlist.

โœจ Magic Link

Email-based, passwordless login. Perfect for clients and partners who don't use Google.

๐Ÿ”’ Security: Links are single-use (consumed on first click) and time-limited. The token is a 32-byte random hex string โ€” not guessable.

๐Ÿ”‘ Email + Password

Traditional login for users who prefer (or need) a persistent credential.

Setting a Password

Two ways to set a password for a user:

Users can also reset their own password via the "Forgot password?" link on the login page.

4 Services & Permissions

Services are auto-discovered from the project inventory every 5 minutes. When a new service is deployed, it appears in the services list automatically โ€” no manual updates needed.

How Scoping Works

Current Service Map

These services are protected by User Management. The list updates automatically from inventory.

ServiceURLCategory
inventoryinv.scottfelten.comCore
access-managerusers.scottfelten.comCore
taosgoalstack.scottfelten.comCore
signal-towersignal.scottfelten.comIntelligence
customer-360c360.scottfelten.comSales
models-embeddingsmodels.scottfelten.comAI/ML
iag-websiteintelligenceadvisorygroup.comIAG
iag-data-vieweriag.scottfelten.comIAG
intellicertintellicert.appIAG
usecasegenapp.usecasegen.appIAG
+ 8 more (auto-discovered from inventory)

Manual Sync

Click the โ†ป Sync button in the dashboard header to force a refresh from inventory. Normally happens automatically every 5 minutes.

5 The Login Page

Available at /login.html โ€” this is the public entry point for non-Google users. It's accessible without authentication.

Three Tabs

Redirect Flow

When a user hits a protected service without a session, they'll be redirected to the login page with a ?rd= parameter. After successful auth, they're sent back to the service they originally wanted.

๐Ÿ’ก Currently: The default redirect for unauthenticated users goes to Google sign-in. To send non-Google users to the multi-auth login page instead, share the direct link: https://users.scottfelten.com/login.html?rd=https://SERVICE_URL

6 Security

FeatureDetail
Password hashingbcrypt, 12 rounds
Password minimum12 characters
Login lockout5 failed attempts โ†’ 30-minute lock (auto-unlocks)
Magic link expiry15 minutes, single-use
Reset token expiry1 hour, single-use
Session duration7 days (JWT cookie on .scottfelten.com)
Cookie flagshttpOnly, secure, sameSite=lax
Token entropy32 bytes (256-bit) random hex
Email enumerationPrevented โ€” all responses are identical regardless of email existence

Session Types

Two session mechanisms coexist:

The /auth/check endpoint tries the _am_session first, then falls back to oauth2-proxy. Either way, scoped access is enforced.

7 API Reference

All admin endpoints require authentication (Google SSO or _am_session with admin role).

Authentication

User Management (Admin)

Services

Configuration

8 Architecture

Auth Flow

User visits service.scottfelten.com โ†“ nginx auth_request โ†’ User Management /auth/check โ†“ Check 1: _am_session cookie? (magic link / password users) โ†“ no Check 2: oauth2-proxy session? (Google SSO users) โ†“ no 401 โ†’ redirect to Google sign-in (or login page for non-Google users) โ†“ yes (either check) Look up user โ†’ check service scope โ†’ 200 (allow) or 403 (denied)

Infrastructure

ComponentLocationPort
User ManagementVPS systemd: access-manager.service3030
oauth2-proxyVPS systemd: oauth2-proxy.service4180
Inventory APIVPS systemd: inventory-api.service3025
nginxAll services proxied, auth_request on each443

Data Files

FilePurpose
data/users.jsonUser store (email, role, services, passwordHash, authMethods)
data/services-cache.jsonCached service map from inventory (refreshed every 5 min)
data/tokens.jsonActive magic link and reset tokens (auto-cleaned)
data/lockouts.jsonFailed login tracking and lockout state
data/config.jsonJWT secret, SMTP config, email settings
/etc/oauth2-proxy-users.txtoauth2-proxy email allowlist (auto-synced from users.json)

9 Setting Up Email

Email is required for magic links and password resets. Without it, these features log to the server console (useful for testing, not for real users).

Option A: Google Workspace SMTP (Recommended)

  1. Create a Google App Password
    Go to myaccount.google.com/apppasswords โ†’ generate a password for "Mail" on "Other device"
  2. Configure via API
    PUT https://users.scottfelten.com/api/config/email { "host": "smtp.gmail.com", "port": 587, "user": "scott@scottfelten.com", "pass": "xxxx-xxxx-xxxx-xxxx", "from": "TARS <scott@scottfelten.com>" }
  3. Test it
    Request a magic link for your own email. If it arrives, you're good.

Option B: Resend.com

Free tier: 100 emails/day. Use smtp.resend.com with your API key as the password.

10 Quick Reference

TaskHow
Add a Google SSO userDashboard โ†’ + Add User โ†’ select Google auth + services
Add a non-Google userDashboard โ†’ + Add User โ†’ select Magic Link or Password auth
Set/change a passwordDashboard โ†’ click ๐Ÿ”‘ button next to user
See who has access to whatDashboard โ€” services shown inline per user
Refresh the services listDashboard โ†’ โ†ป Sync button
Send a login linkShare: users.scottfelten.com/login.html
Check system healthGET /health โ€” shows users, services, email status
Unlock a locked accountWait 30 min (auto-unlocks) or delete data/lockouts.json
Configure emailPUT /api/config/email (see Section 9)
User Management v2.0 ยท Built by TARS ยท March 2026