Giter Site home page Giter Site logo

porteiro's Introduction

Porteiro

Porteiro

"clift cloft Still, a porta se abriu!" - Porteiro

This service is responsible to managing and authenticate users.

License

Copyright © 2021 Bruno do Nascimento Maciel

This program and the accompanying materials are made available under the terms of the Eclipse Public License 2.0 which is available at http://www.eclipse.org/legal/epl-2.0.

This Source Code may also be made available under the following Secondary Licenses when the conditions for such availability set forth in the Eclipse Public License, v. 2.0 are satisfied: GNU General Public License as published by the Free Software Foundation, either version 2 of the License, or (at your option) any later version, with the GNU Classpath Exception which is available at https://www.gnu.org/software/classpath/license.html.

Bibliography

porteiro's People

Contributors

macielti avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

porteiro's Issues

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.

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.

Trust on the JWToken

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

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"}])

Add Contact Entity

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

  • Email
  • Telegram

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.