For example, I have 3 services:
- Authentication
- Seller
- Buyer
Each of them got their own databases, models, services... etc
Authentication service knows about users, user-groups, roles, permissions and creates token.
Where should I store sellers/buyers entities? On Authentication service, or on Seller/Buyer services?
How should Seller/Buyer services interact to create new seller/buyer entity?
How should Seller/Buyer services check permissions?
Seller and Buyer entities have some common fields: name, password, email..., but also each of them have their own additional fields.
Seller and Buyer interact with each other.
This sounds familiar to a problem I was solving recently
Assuming your services are HTTP based, then I would recommend you check out oAuth 2.0
A short copy from RFC 6749
It simply models the authentication and authorization into a workflow between
A User
Authorization Server
Resource Provider(s)
Client(s)
Claims Identity
A Claims Identity (explained better in more details here) is not just a username & password, it can carry many claims such as an email, a date of birth, etc. for an authenticated user, and you can use those claims to communicate any common user properties to your various services.
Shared Attributes
Now, your last questions was about linking a user (or an identity) to an entity in each service that represents some unique information in that service's context... this can be achieved by linking an existing authenticated identity and access_token to an internal representation of the user in each service.
Something like: