Authentication and authorization for the Lesli Framework.
Introduction
LesliShield is the official authentication and authorization engine for the Lesli Framework.
It centralizes account security, role-based access control, and user onboarding for Lesli applications.
Features
- Authentication and session management
- Self-service profile and password management
- Role-based access control
- Permission and privilege administration
- Account-scoped security policies
- User invitations and onboarding
Try LesliShield
Quick Start
Requirements
- A Rails application with Lesli
- SQLite by default, or PostgreSQL when preferred by the host application
Install LesliShield
Add the engine to the host Rails application and prepare its database:
bundle add lesli_shield
bin/rails lesli:db:prepare
Mount the engine
Applications using Lesli's standard router mount LesliShield automatically at /shield:
# config/routes.rb
Rails.application.routes.draw do
Lesli::Router.mount(self)
end
If the application does not use the standard Lesli router, mount the engine directly:
# config/routes.rb
Rails.application.routes.draw do
mount LesliShield::Engine => "/shield"
end
Start Rails and visit http://127.0.0.1:3000/shield:
bin/rails server
Development
Clone LesliShield into the host application's engines directory:
cd RailsApp
mkdir -p engines
git clone https://github.com/LesliTech/LesliShield.git engines/LesliShield
Reference the local engine from the host application's Gemfile:
gem "lesli_shield", path: "engines/LesliShield"
Install dependencies, prepare the host database, and start Rails:
bundle install
bin/rails lesli:db:prepare
bin/rails server
Tests
From a complete Lesli development workspace, run the engine test suite from the LesliShield directory:
cd engines/LesliShield
bundle exec rake test
The standalone suite does not require LesliAudit or LesliBell. Test account helpers initialize those workspaces only when the engines are loaded. Tests that inspect persisted audit events are skipped without LesliAudit; role CRUD, permission checks, privilege compilation, and rollback tests still run.
To verify audit persistence with the optional engines installed, run from the LesliBuilder root using its bundle and a dedicated test database:
RAILS_ENV=test bundle exec bin/rails test engines/LesliShield/test/services/lesli_shield/role_audit_test.rb engines/LesliShield/test/services/lesli_shield/role_privilege_deployment_service_test.rb
Documentation
Community
License
Copyright (c) 2026, Lesli Technologies, S. A.
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see https://www.gnu.org/licenses/.
The complete license text is available in the license file.
The Open-Source SaaS Development Framework for Ruby on Rails.
Last Update: 2026/11/16