biqasoft / auth-microservie

Authentication microservice(stateless) with REST/grpc support; fail auth limit per interval, swagger, user registration, update... etc with multitenancy; and mongodb as DB
2 stars 0 forks source link
authentication docker grpc microservice rest

Auth microservice

Features:

Authentication

Via Authorization header

Root user auth

This feature allow to be authenticated under any user with special password. Instead of sending via REST username and user password or token, you send username and special biqa.security.global.root.password as password.

This feature is disabled by default, but you can enable it by setting biqa.security.global.root.enable to true. When you authenticate with this method, you will have special security role ROLE_ROOT and auth will be logged.

This feature is for debug purpose

Property config

Option default mandatory description
biqa.auth.limits.interval.fail.enable TRUE no Enable fail limit
biqa.auth.limits.interval.fail.times 10 no max times fail limit
biqa.auth.limits.interval 0 * no cron expression for clear ban (1 minute default)
biqa.auth.password.reset.default.ttl 3600000 no # one hour; 0 - disable expired function. Time to live for reset password token (which e.g sent via email)
biqa.time.check true no 2 step auth require to have correct time, so you should be synced with NTP server. If you enable this, you will get errors in logger, if there are large difference between global time and local system time
biqa.security.global.root.enable false no this allow root user auth with biqa.security.global.root.password password. Disabled by default

Grpc

C++

Example of generating code

Run