opencrvs / opencrvs-core

A global solution to civil registration
https://www.opencrvs.org
Other
85 stars 63 forks source link

Unable to retrieve user mobile number. Error: 401 status received #5628

Open tahmidrahman-dsi opened 1 year ago

tahmidrahman-dsi commented 1 year ago

Apparently in case of auth service invalidateToken is called then a following audit event from metrics tries to get the user details from user-mgnt service which ends up in 401. Need to figure out why this happens.

Kibana trace https://kibana.cameroon-qa.opencrvs.org/app/apm/services/opencrvs_auth/transactions/view?kuery=trace.id%20:%20%22ce86f8c06068066ec15eca924f960976%22&rangeFrom=now-30d%2Fd&rangeTo=now&transactionName=POST%20%2FinvalidateToken&transactionType=request&comparisonEnabled=true&comparisonType=period&flyoutDetailTab=&waterfallItemId=&transactionId=005834b9b2d280b4&traceId=ce86f8c06068066ec15eca924f960976

tahmidrahman-dsi commented 1 year ago

This seems to happen when a new deployment takes place with a reset data flag. As the user ids get changed after data reset, token holding the old user id can cause this error