Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Are you regularly using stateless, asymmetrically-encrypted tokens during service-to-service communication? That strikes me as a rather odd architecture decision, but maybe there's something I'm missing.


We are doing this and it works pretty great across a bunch of microservices.

A user makes a call into a gateway, which talks to the identity service to get a JWT with info about who the user is. Now the gateway passes the call on to the microservice being referenced and it gets the users basic access info with no extra calls, and better it can call any other internal service and continue to pass along the token.


Istio with JWT seems petty common.


True, but I think doing something just because a lot of other people are doing it doesn’t make it good or correct.


Well, the question was about how often is it used, not how well it serves the purpose. So I'd say pretty often.

Having a data storage accessible for every service that needs authentication and authorization (and ideally every service needs at least authentication) is non trivial in distributed enterprise environment. To have a stateful token, you need to have a distributed scalable storage, unless you have only one instance. You need to be able to connect to it, hence distribute and manage database password. Anything symmetric requires a more sophisticated secret management.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: