0

I am using jwt authentication between two services written in django. The authentication is working on local machine. But when I run the same services in a kubernetes cluster, I get authentication error.

Also, when I make the decorator above the api to @permission_classes([AllowAny, ]) in order to avoid any authentication check but still pass the token in the header, I get the unauthorization error 401 in Kubernetes cluster.

Does anyone have any idea on how to do jwt authentication between two django services running in a kubernetes cluster in django?

skywalker007
  • 31
  • 1
  • 4
  • It's very hard to understand what is the problem without more details. 1) You said the authentication problem was between two services, but then you said you are getting error 401 when you pass the token in the header. 2) As seen [in this answer](https://stackoverflow.com/a/29331771/8971507) : `"You have disabled permissions using @permission_classes, but that's only the "authorization" part of "authentication and authorization". You need to disable the authentication handlers as well using @authentication_classes in order to stop receiving a 401/403 error."` – victortv May 02 '19 at 15:09
  • 3) Can you post the results of `kubectl logs {name of the pod}` of the service that is responding with unauthorized? – victortv May 02 '19 at 15:12

0 Answers0