shield

Comprehensive security for Lucky framework lucky-framework authentication security oauth2
0.8.0 released
GrottoPress/shield
52 3 5
GrottoPress

Shield

Shield is a comprehensive security solution for Lucky framework. It features robust authentication and authorization, including user registrations, logins and logouts, password resets and more.

Shield is secure by default, and exploits defence-in-depth strategies, including the option to pin an authentication session to the IP address that started it -- the session is invalidated if the IP address changes.

User IDs are never saved in session. Instead, each authentication gets a unique ID and token, which is saved in session, and checked against their corresponding salted SHA-256 hashes in the database.

When a user changes their password, Shield logs out the user on all devices (except the current one), to ensure that an attacker no longer has access to a previously compromised account.

Shield supports API authentication, with regular passwords or with user-generated bearer tokens. In addition, all authentication actions that can be performed in the browser have their API equivalents.

Shield is designed to be resilient against critical application vulnerabilities, including brute force, user enumeration, denial of service and timing attacks.

On top of these, Shield offers seamless integration with your application. For the most part, include a bunch of modules in the appropriate classes, and you are good to go!

Quick Start

Get started quickly using Penny. Penny is a Lucky application scaffold that gets you up and running with Shield.

Documentation

Find the complete documentation of Shield in the docs/ directory of this repository.

Development

Run tests with docker-compose run --rm spec. If you need to update shards before that, run docker-compose run --rm shards.

If you would rather run tests on your local machine (ie, without docker), create a .env.sh file:

#!/bin/bash

export DATABASE_URL='postgres://postgres:password@localhost:5432/shield_spec'

Update the file with your own details. Then run tests with source .env.sh && crystal spec.

Contributing

  1. Fork it
  2. Switch to the master branch: git checkout master
  3. Create your feature branch: git checkout -b my-new-feature
  4. Make your changes, updating changelog and documentation as appropriate.
  5. Commit your changes: git commit
  6. Push to the branch: git push origin my-new-feature
  7. Submit a new Pull Request against the GrottoPress:master branch.

Security

Kindly report suspected security vulnerabilities in private, via contact details outlined in this repository's .security.txt file.

shield:
  github: GrottoPress/shield
  version: ~> 0.8.0
License MIT
Crystal ~> 0.36.0

Authors

Dependencies 0

Development Dependencies 2

  • carbon ~> 0.1.0
    {'github' => 'luckyframework/carbon', 'version' => '~> 0.1.0'}
  • lucky ~> 0.26.0
    {'github' => 'luckyframework/lucky', 'version' => '~> 0.26.0'}

Dependents 0

Last synced .
search fire star recently