Overview
This feature significantly lowers the barrier to entry for new users by providing a "batteries-included" deployment option that requires minimal configuration. It introduces three major capabilities:
- All-in-one Docker Compose file that includes PostgreSQL
- Disable authentication for demo/family use
- Alternative OIDC providers beyond Authentik (Google, Microsoft, Auth0, Keycloak)
Goal: Enable a new user to go from git clone to a running application in under 5 minutes with a single docker compose up command.
Priority: High
Dependencies: Feature 056 (API Config Endpoint - Complete)
Problem Statement
Current friction points:
- External PostgreSQL required — users must set up and configure their own database before deploying
- Mandatory Authentik — API throws
InvalidOperationException if Authority is not configured
- Complex configuration — users must understand ASP.NET Core configuration, environment variables, and OIDC concepts
- No "try before you commit" path — no way to evaluate the app without significant infrastructure investment
Target state:
docker compose -f docker-compose.demo.yml up starts everything with sensible defaults
- Authentication can be disabled entirely for single-user/family deployments
- Users can choose from Authentik (default), Google, Microsoft, Auth0, Keycloak, or any generic OIDC provider
- Clear upgrade path from demo to production
User Stories
Easy Deployment
US-055-001: One-Command Demo Deployment
As a new user evaluating BudgetExperiment, I want to start the entire application with a single command so that I can try out the features without complex infrastructure setup.
US-055-002: Persistent Demo Data
As a demo user, I want my data to persist between container restarts so that I don't lose work during evaluation.
Authentication Off Mode
US-055-003: Disable Authentication via Configuration
As a single-user or family deployer, I want to disable authentication entirely so I don't need to set up an identity provider.
US-055-004: UI Adapts to Auth-Off Mode
As a user running in auth-off mode, I want to not see login/logout/profile UI elements.
US-055-005: Security Warning in Auth-Off Mode
As an administrator, I want to see a clear warning when running in auth-off mode.
Flexible OIDC Providers
US-055-006: Google OAuth
US-055-007: Microsoft Entra ID
US-055-008: Generic OIDC Provider
US-055-009: Maintain Authentik as Default
Technical Design
Configuration Schema
public sealed class AuthenticationOptions
{
public const string SectionName = "Authentication";
public string Mode { get; set; } = "OIDC"; // "None" or "OIDC"
public string Provider { get; set; } = "Authentik"; // "Authentik", "Google", "Microsoft", "OIDC"
public AuthentikProviderOptions Authentik { get; set; } = new();
public GoogleProviderOptions Google { get; set; } = new();
public MicrosoftProviderOptions Microsoft { get; set; } = new();
public GenericOidcProviderOptions Oidc { get; set; } = new();
}
No-Auth Handler
A custom AuthenticationHandler<AuthenticationSchemeOptions> that always succeeds, returning claims for the family user (00000000-0000-0000-0000-000000000001, "Family", "family@localhost").
/api/v1/config Response Updates
// Mode = None
{ "authentication": { "mode": "none" } }
// Mode = OIDC (any provider)
{ "authentication": { "mode": "oidc", "provider": "authentik", "oidc": { "authority": "...", "clientId": "..." } } }
New/Modified Files
| File |
Status |
Description |
Api/AuthenticationOptions.cs |
New |
Unified auth config |
Api/Authentication/NoAuthHandler.cs |
New |
Handler for Mode=None |
Api/Authentication/FamilyUserContext.cs |
New |
Default user context |
Api/Authentication/AuthenticationConfigurator.cs |
New |
Factory for provider config |
Client/Shared/AuthOffBanner.razor |
New |
Warning banner |
docker-compose.demo.yml |
New |
All-in-one demo compose |
docs/AUTH-PROVIDERS.md |
New |
Per-provider setup guide |
Implementation Phases
Phase 1: AuthenticationOptions Refactoring
Phase 2: No-Auth Mode
Phase 3: Client Auth-Off Adaptations
Phase 4: Google OAuth Provider
Phase 5: Microsoft Entra ID Provider
Phase 6: Generic OIDC Provider
Phase 7: Demo Docker Compose
Phase 8: Documentation
Phase 9: Testing & Validation
Security Considerations
⚠️ No-auth mode should NEVER be exposed to the public internet.
Mitigations:
- Startup warning log
- UI banner reminder
- Documentation warnings
- Demo compose uses
localhost:5099 only
- No HTTPS in demo (signals local-only)
Environment Variables Reference
Authentication__Mode=OIDC # "None" or "OIDC"
Authentication__Provider=Authentik # "Authentik", "Google", "Microsoft", "OIDC"
# Authentik
Authentication__Authentik__Authority=https://auth.example.com/application/o/budget/
Authentication__Authentik__Audience=budget-experiment
Authentication__Authentik__ClientId=abc123
# Google
Authentication__Google__ClientId=123456789-xyz.apps.googleusercontent.com
Authentication__Google__ClientSecret=GOCSPX-xxxxx
# Microsoft
Authentication__Microsoft__ClientId=00000000-0000-0000-0000-000000000000
Authentication__Microsoft__TenantId=common
# Generic OIDC
Authentication__Oidc__Authority=https://keycloak.example.com/realms/master
Authentication__Oidc__ClientId=budget-experiment
Authentication__Oidc__ClientSecret=xxx
Out of Scope
- Production hardening for demo PostgreSQL
- SSO/SCIM/advanced user management
- Multi-user management in no-auth mode
- Social login UI ("Login with Google" button)
- Session management UI
Success Metrics
- Time to First Deploy: < 5 minutes for demo mode
- Backward Compatibility: 100% of existing deployments continue to work
- Documentation Coverage: 100% of auth options documented with examples
Migrated from docs/055-easy-deployment-auth-options.md
Overview
This feature significantly lowers the barrier to entry for new users by providing a "batteries-included" deployment option that requires minimal configuration. It introduces three major capabilities:
Goal: Enable a new user to go from
git cloneto a running application in under 5 minutes with a singledocker compose upcommand.Priority: High
Dependencies: Feature 056 (API Config Endpoint - Complete)
Problem Statement
Current friction points:
InvalidOperationExceptionif Authority is not configuredTarget state:
docker compose -f docker-compose.demo.yml upstarts everything with sensible defaultsUser Stories
Easy Deployment
US-055-001: One-Command Demo Deployment
As a new user evaluating BudgetExperiment, I want to start the entire application with a single command so that I can try out the features without complex infrastructure setup.
docker compose -f docker-compose.demo.yml upstarts API, Client, and PostgreSQLhttp://localhost:5099US-055-002: Persistent Demo Data
As a demo user, I want my data to persist between container restarts so that I don't lose work during evaluation.
docker compose down(requires-vto remove)Authentication Off Mode
US-055-003: Disable Authentication via Configuration
As a single-user or family deployer, I want to disable authentication entirely so I don't need to set up an identity provider.
Authentication__Mode=Nonedisables all auth middleware00000000-0000-0000-0000-000000000001)US-055-004: UI Adapts to Auth-Off Mode
As a user running in auth-off mode, I want to not see login/logout/profile UI elements.
/api/v1/configendpointUS-055-005: Security Warning in Auth-Off Mode
As an administrator, I want to see a clear warning when running in auth-off mode.
Authentication:Mode=NoneFlexible OIDC Providers
US-055-006: Google OAuth
Authentication__Provider=Googleenables Google OAuthClientId,ClientSecretUS-055-007: Microsoft Entra ID
Authentication__Provider=Microsoftenables Microsoft authClientId,TenantIdUS-055-008: Generic OIDC Provider
Authentication__Provider=OIDCenables generic OIDCAuthority,ClientId,ClientSecret(if confidential),ScopesUS-055-009: Maintain Authentik as Default
Authentication__Provider=Authentik(or unset) uses current Authentik flowdocker-compose.pi.ymlor.envfilesTechnical Design
Configuration Schema
No-Auth Handler
A custom
AuthenticationHandler<AuthenticationSchemeOptions>that always succeeds, returning claims for the family user (00000000-0000-0000-0000-000000000001, "Family", "family@localhost")./api/v1/configResponse UpdatesNew/Modified Files
Api/AuthenticationOptions.csApi/Authentication/NoAuthHandler.csApi/Authentication/FamilyUserContext.csApi/Authentication/AuthenticationConfigurator.csClient/Shared/AuthOffBanner.razordocker-compose.demo.ymldocs/AUTH-PROVIDERS.mdImplementation Phases
Phase 1: AuthenticationOptions Refactoring
AuthenticationOptionswith nested provider optionsConfigureAuthenticationinProgram.csPhase 2: No-Auth Mode
NoAuthHandlerauthentication handlerFamilyUserContextwith well-known user constantsMode=Noneand registerNoAuthHandler/api/v1/configto returnmode: "none"Phase 3: Client Auth-Off Adaptations
AuthStateServiceformode: "none"AuthOffBanner.razor/authentication/*routes to homePhase 4: Google OAuth Provider
/api/v1/configfor GooglePhase 5: Microsoft Entra ID Provider
Phase 6: Generic OIDC Provider
Phase 7: Demo Docker Compose
docker-compose.demo.ymlwith PostgreSQL + APIAuthentication__Mode=NonePhase 8: Documentation
docs/AUTH-PROVIDERS.md.env.examplePhase 9: Testing & Validation
Security Considerations
Mitigations:
localhost:5099onlyEnvironment Variables Reference
Out of Scope
Success Metrics
Migrated from docs/055-easy-deployment-auth-options.md