github Yeraze/meshmonitor v2.0.0-alpha1
v2.0.0-alpha1 - Authentication & Authorization

latest releases: v2.19.0, v2.18.9, v2.18.8...
pre-releaseone month ago

๐Ÿ” v2.0.0-alpha1 - Authentication & Authorization System

โš ๏ธ ALPHA RELEASE - For Testing Only

This is the first alpha release of MeshMonitor v2.0.0, introducing a comprehensive authentication and authorization system.

โš ๏ธ Breaking Changes

  • All API endpoints now require authentication or appropriate anonymous permissions
  • Session cookies required for API access
  • This is a major version change - please review the migration notes below

๐ŸŽฏ Key Features

Authentication

  • โœ… Local username/password authentication with bcrypt hashing
  • โœ… OpenID Connect (OIDC) integration for SSO
  • โœ… Dual authentication support (both local and OIDC simultaneously)
  • โœ… Session management with secure cookies
  • โœ… Admin password reset utility (reset-admin.mjs)

Authorization

  • โœ… Permission-based access control for 8 resource types:
    • Dashboard, Nodes, Channels, Messages, Settings, Configuration, Info, Automation
  • โœ… Read/Write permissions per resource
  • โœ… Admin role with full permissions
  • โœ… Middleware for route protection
  • โœ… Database-backed permission storage

User Management

  • โœ… Admin-only Users tab for managing users and permissions
  • โœ… Create local users with passwords
  • โœ… Set/reset passwords for local users
  • โœ… Toggle admin status
  • โœ… Activate/deactivate users
  • โœ… Grant/revoke granular permissions
  • โœ… OIDC user auto-creation on first login

Anonymous User Support

  • โœ… Special "anonymous" user defines permissions for unauthenticated users
  • โœ… Enables public/read-only access scenarios
  • โœ… Configurable permissions via admin interface
  • โœ… Seamless transition between authenticated and anonymous states

๐Ÿ”ง First-Run Setup

On first startup, MeshMonitor will create a default admin user:

  • Username: admin
  • Password: changeme

โš ๏ธ IMPORTANT: Change this password immediately after first login!

๐Ÿ”‘ Configuration

Environment Variables

# OIDC (optional)
OIDC_ISSUER=https://your-oidc-provider.com
OIDC_CLIENT_ID=your-client-id
OIDC_CLIENT_SECRET=your-client-secret
OIDC_REDIRECT_URI=http://localhost:3001/api/auth/oidc/callback

# Session Security (recommended for production)
SESSION_SECRET=your-random-secret-here

# Admin User (optional, defaults to 'admin')
ADMIN_USERNAME=admin

๐Ÿ“ Migration Notes

  • First-run creates default admin user (username: admin, password: changeme)
  • Existing installations will auto-create admin on next startup
  • Anonymous user created automatically with default read-only permissions (dashboard, nodes, info)
  • Database migrations run automatically on startup
  • Admin can modify anonymous permissions in the Users tab

๐Ÿ”’ Security Enhancements

  • Passwords hashed with bcrypt (10 rounds)
  • Session-based authentication with HTTP-only cookies
  • CSRF protection via SameSite cookies
  • Permission checks on all protected routes
  • Admin-only routes for user management
  • Secure OIDC token validation
  • SQL injection prevention with input validation

๐Ÿ“š Documentation

  • OIDC setup guide available in docs/AUTHENTICATION.md
  • Permission model documented in code comments
  • Database schema includes permission constraints

๐Ÿงช Testing

This is an alpha release intended for testing. Please report any issues on GitHub.

Test Coverage:

  • โœ… 505 tests passing
  • โœ… Local authentication login/logout
  • โœ… OIDC authentication flow
  • โœ… Permission checks across all resources
  • โœ… Admin user management operations
  • โœ… Password reset functionality
  • โœ… Anonymous user permissions
  • โœ… Logout returns to anonymous state

๐Ÿ› Known Issues

  • None currently identified

๐Ÿ“ฆ What's Next

  • v2.0.0-beta1: Bug fixes and refinements based on alpha feedback
  • v2.0.0-rc1: Release candidate with full documentation
  • v2.0.0: Stable release

๐Ÿ™ Acknowledgments

This release includes contributions and testing feedback from the community.


๐Ÿค– Generated with Claude Code

Don't miss a new meshmonitor release

NewReleases is sending notifications on new releases.