c# - Microservice architectural clarification -
i have microservice architectured application. have companyservice, orderservice , transactionsevice. user logs in , can load orders company. order has companyid. loads transactions order, transaction has orderid. going through security thoughts. how can make sure user loads or saves transactions orders belong company. mean transactionservice should not need know company (companyid). should check before saving? eg check orderid belongs company or there other pattern?
thanks
my thoughts:
your first microservice going
getorders(int userid) in need check company pull userid
your second call going be
gettransactions(int orderid) depending on how security want, can do:
gettransactions(int orderid, int userid) to check user making call belongs correct company in case of api abuse. basically, yes have check user belongs company getting transaction for.
Comments
Post a Comment