Skip to content

v1.0.0.16

Choose a tag to compare

@gregluffy gregluffy released this 26 May 20:54
· 21 commits to develop since this release

HomeLabInfo — Release Notes v1.0.0.16

Optional Dashboard Authentication

This release introduces an opt-in authentication system for the HomeLabInfo dashboard. The feature is fully backward-compatible — existing deployments with no auth configuration continue to work exactly as before.


What's New

Optional Login Protection

You can now protect your dashboard behind a username and password by adding two environment variables to your Docker Compose file:

environment:
  - AUTH_ENABLED=true
  - JWT_SECRET=your-long-random-secret

When AUTH_ENABLED is not set (the default), the app behaves identically to previous versions — no login screen, no tokens, nothing changes.

First-Time Setup Flow

On the very first run with AUTH_ENABLED=true and no existing account, the dashboard redirects to a setup page where you create your username and password. No manual database seeding or pre-configuration required.

Secure Credential Storage

  • Passwords are hashed using PBKDF2-SHA256 with 100,000 iterations and a random salt — no plain-text or weak hashing.
  • Sessions are managed via JWT tokens signed with HMAC-SHA256, with a 24-hour expiry.
  • No external auth libraries required — implemented entirely with built-in .NET cryptography APIs.

Logout

When authentication is enabled, a user chip appears in the footer showing the logged-in username with a Sign out button.

Automatic Token Refresh Guard

If a token expires or is cleared mid-session, any API call automatically redirects to the login page rather than showing a broken UI.


Configuration Reference

Variable Required Default Description
AUTH_ENABLED No false Set to true to enable the login screen
JWT_SECRET No* auto-generated Secret used to sign JWT tokens. Set this to persist sessions across restarts.

*If JWT_SECRET is omitted while AUTH_ENABLED=true, a random secret is generated at startup — all sessions are invalidated when the container restarts.

Generate a strong secret with:

openssl rand -base64 32

Bug Fixes & Improvements

  • Fixed EF Core migration error — manually written migration files were replaced with properly tooling-generated ones, resolving a PendingModelChangesWarning crash on startup.
  • Fixed auth redirect race condition — on first run with no users, API calls were racing to redirect to /login before the setup redirect could fire. The auth guard now always checks for existing users even when landing on the login page, ensuring /setup is shown correctly.
  • Repo cleanup — removed leftover development scratch files (serialize_test.cs, serialize_test2.cs, test-csharp-serialize.js) and the outdated release-notes-v1.0.0.2.md.

Upgrading

No breaking changes. Existing deployments require no action.

To enable authentication on an existing deployment:

  1. Add AUTH_ENABLED=true and JWT_SECRET=<your-secret> to your compose environment.
  2. Restart the container — docker compose up -d --force-recreate.
  3. Visit the dashboard; you will be redirected to the setup page to create your account.

HomeLabInfo is licensed under the GNU General Public License v3.0.