Git Product home page Git Product logo

password's Introduction

Redis Password Module

This module provides a simple and secure way to store passwords in Redis and later verify them. The passwords are stored as one-way cryptographic hashes using the bcrypt library, so they cannot be retrieved but only compared against.

Quick start guide

  1. Build a Redis server with support for modules.
  2. Build the password module: make
  3. To load the module, Start Redis with the --loadmodule /path/to/module.so option, add it as a directive to the configuration file or send a MODULE LOAD command.

Commands

password.set key password

Works like the standard Redis SET command, but stores the hashed password instead of the clear text password.

password.check key password

Verifies the supplied password against the previously stored password. Returns: 0 if passwords do not match, or 1 if they match.

password.hset key field password

Works like password.set, but stores the hashed password in a Hash field rather than a String field.

password.hcheck key field password

Works like password.check, but uses a password stored by password.hset in a Hash field.

Notes

  • The module uses the C library crypt() function with a special salt value that causes modern Linux systems to use SHA512. Very old or non-Linux libraries may revert to the less secure version of crypt() which is cryptographically weak.

  • These commands are marked hidden so they do not show up in the MONITOR feed, to protect sensitive information.

  • The command stream that feeds slaves and AOF will only include the hashed version of stored passwords.

Contributing

Issue reports, pull and feature requests are welcome.

License

AGPLv3 - see LICENSE

password's People

Contributors

itamarhaber avatar yossigo avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.