GithubHelp home page GithubHelp logo

macielti / porteiro Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 0.0 483 KB

A microservice for users and authentication management

License: Other

Clojure 98.78% Mustache 0.44% Dockerfile 0.10% JavaScript 0.68%
microservice clojure datomic kafka

porteiro's People

Contributors

macielti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

porteiro's Issues

Add Contact Entity

A Contact entity will be a general entity to deal with different methods of contacting a user.

  • Email
  • Telegram

Trust on the JWToken

Get the user info from the JWToken instead of making a query to the database to get the roles information.

Trust in the JWToken to do roles verification can be a problem

What about if we want to drop some roles from a user instantly? The user will remain in possession of the roles while the current JWToken is valid and not expired.

If we want the roles update operation to affect users instantly we should think in a way of having a service responsible for validating JWToken sessions, so the user-identity interceptor of every service should verify the JWToken using this service before letting it go.

This can have its cons and pros. One pro is that we will be able to expire JWToken sessions actively instead of having to wait for the expiration time passively. One con is that we would have to make an HTTP call to the JWToken session verification for every time that we need to use the info stored in JWTokens.

I think that one HTTP call is a fair price to pay for the guarantee and access-control benefits that it will enable us to have.

Create `user` entity Datalevin schema definition

Based on:

(def user
[{:db/ident :user/id
:db/valueType :db.type/uuid
:db/cardinality :db.cardinality/one
:db/unique :db.unique/identity
:db/doc "User Id"}
{:db/ident :user/username
:db/valueType :db.type/string
:db/unique :db.unique/identity
:db/cardinality :db.cardinality/one
:db/doc "User username"}
{:db/ident :user/roles
:db/valueType :db.type/keyword
:db/cardinality :db.cardinality/many
:db/doc "User roles"}
{:db/ident :user/email
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one
:db/doc "E-mail address"}
{:db/ident :user/hashed-password
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one
:db/doc "Hashed password"}])

Healthy check endpoint security

The healthy check endpoint should require authentication?

I am thinking about requiring a JWT token to get the healthy status of the service.

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.