EnMasseProject / enmasse

EnMasse - Self-service messaging on Kubernetes and OpenShift
https://enmasseproject.github.io
Apache License 2.0
190 stars 87 forks source link

Use tokenreview v1 when authenticating against service accounts #5320

Closed k-wall closed 2 years ago

k-wall commented 2 years ago

Use tokenreview v1 when authenticating against service accounts (for kube 1.22 compatibility)

https://kubernetes.io/docs/reference/using-api/deprecation-guide/#tokenreview-v122

Type of change

Description

 2022-04-01T13:06:08.611Z WARN  [PlainSaslServerMechanism] Exception when authenticating @@serviceaccount@@: java.lang.RuntimeException: Error performing POST on /apis/authentication.k8s.io/v1beta1/tokenreviews: 404, {"kind":"Status","apiVersion":"v1","metadata":{},"status":"Failure","message":"the server could not find the requested resource","reason":"NotFound","details":{},"code":404} at io.enmasse.keycloak.spi.K8sServiceAccountCredentialProvider.authenticateToken(K8sServiceAccountCredentialProvider.java:101) 

Checklist