Sharing REST Tokens Between Servers

I have a requirement for a REST API that has authentication on tokens: we will have replicated application servers with a load balancer, since tokens are generated by one server during user authentication, and different requests from the same client can be processed by different servers, is there a common technique or technology for sharing these tokens between different servers?

In terms of technology, we will use the Java stack, namely Grails.

About application servers, there may be several databases. This comment is important because when discussing with colleagues, someone suggested controlling the exchange of tokens using the same database from all application servers. I am looking for a solution that does not need a centralized database that allows you to scale on the database side.

+4
source share
2 answers

When using token-based authentication, there is a server that authenticates the user and issues a security token. User authentication can be performed in different ways (checking the username / password on the basis of the database, checking the certificate on the smart card, etc.).

, . , , .

( ) . , , , , , .

, . OAuth -. WS-Federation SAML-P .

+1

JWT (JSON Web Token) grails - , , . , . / , . , , - , JWT. . .

+1

Source: https://habr.com/ru/post/1599430/


All Articles