Overview

For many years, network applications have being built using various architectural patterns, the commonest and most adopted in the last few decades being the Monolith architecture. While this easy to design, develop, and, deploy, the architectural style is riddled with the challenge of horizontal scaling and adopting new and more performant technologies as need arise.

In 2012, the word Microservices was coined to connote an architectural style of building systems as an aggregate of many loosely coupled sub-systems which are independently deployable, easier to test, scale, and, update. This solve the challenge poised by the Monolithic style of building systems.

Interestingly, the Microservice style is not without its own challenge, one of such being authorization and authentication especially in user-facing applications.

Raccoon is an Apache 2.0 licensed research project that explores various authorization and authentication strategies for Microservices with a primal focus on Software As A Service

Why Raccoon?

Raccoon is kind of mammal which could be found almost anywhere in the world. Research has shown that Racoons are very intelligent than an average cat or dog. They are also cunning and interestingly mischievous.

The name of the project is inspired of this special ability of racoons mention - Microservices are interesting, they solves a lot of problem but they can also be "cunning" or somewhat "mischievou"s to implement, at least for a some just getting started, thus, the name Raccoon!

What is Raccoon?

Raccoon is an enterprise-scale Identity and Access Management Service for Microservices

The solution is implemented with the Rust programming language a memory-safe systems programming language for building fast and secure applications. The application also integrates with the PostgreSQL database which is optimized for fast read and write database operations

As of this stage of development, the project uses sqlx to interact with databases. However, the project hope to ship with xorm which is an async-first ORM library for Rust which make using ORM very simplistic

Why Raccoon?

There is an ever-growing need to build a fast, secure, and battle-tested authentication and authorization server especially for user-facing Software As A Service products and e-commerce web and mobile application.

Raccoon is a battery-included service which you can plug-and-paly in your server with minimal configuration.

Project Overview

The project is organized into the following crates:

  1. raccoon_core (root directory) - a core library for the project, which contains the core logic for the project
  2. raccoon_macros - an encapsulation of the print!() macro in Rust, implemented with semantic color for error report and debugging in development
  3. raccoon_mailer - a library for sending emails to users,

Local Setup

This section will guide you through the process of setting up the application on your local machine.

Requirement

The following are required to run the application in development.

  • Rust v1.63 or greater
  • PostgreSQL PostgreSQL server v14.5 or greater
  • sqlx for interacting with the database,
  • sqlx-cli, a command line tool for sqlx,
  • cargo watch, a tool for watching the project files and recompiling when they change,

Installation (development)

To run the application in development mode, follow the steps below

  1. clone Repository
  2. copy and populate .env.example to .env cp .env.example .env, paying attention to the SECRET and DATABASE_URL variables
  3. Run sqlx database create to create the database from the specified DATABASE_URL Use SQL database drop to revert the change
  4. Run SQL migrate run to run the migrations
  5. use SQL migrate add <migration_name> to add a new migration

Features

The project is currently in the early stages of development. The following are features proposed and are currently implemented:

  1. Email Authentication strategy
  2. Social authentication strategy

Roadmap

The following are features proposed and are currently not implemented:

  • Multiplex Design using RESTful and GraphQL endpoints
  • Message Broker (Redis or Apache Kafka)
  • Support SQL and NoSQL databases
  • Support for multiple authentication strategies
  • Support for multiple authorization strategies
  • Caching
  • Support for multiple storage strategies
  • Support for file storage