Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Zeebe client token not being refreshed #631

Closed
cdonuut opened this issue Feb 8, 2024 · 0 comments · Fixed by #634
Closed

Zeebe client token not being refreshed #631

cdonuut opened this issue Feb 8, 2024 · 0 comments · Fixed by #634

Comments

@cdonuut
Copy link

cdonuut commented Feb 8, 2024

Describe the bug

The bearer token is not being refreshed after it has expired after ~5 minutes. The new common authentication library is used in the case where the token is not being refreshed.

To Reproduce

First Step: Setup Camunda Platform with Keycloak Authentication
Second Step: Connect a Worker using Common Authentication
Third Step: Run the worker and wait 5 minutes

Expected behavior

The token is refreshed before it expires, but in this case it does not.

Log/Stacktrace

Full Stacktrace

2024-02-08T11:10:02.115+01:00 DEBUG 83706 --- [-worker-ELG-1-7] io.grpc.netty.NettyClientHandler         : [id: 0x8933b251, L:/127.0.0.1:58521 - R:/127.0.0.1:26500] OUTBOUND HEADERS: streamId=253 headers=GrpcHttp2OutboundHeaders[:authority: 127.0.0.1:26500, :path: /gateway_protocol.Gateway/ActivateJobs, :method: POST, :scheme: http, content-type: application/grpc, te: trailers, user-agent: zeebe-client-java/8.4.0 grpc-java-netty/1.60.0, grpc-accept-encoding: gzip, authorization: Bearer eyJhbGciOiJSUzI1NiIsInR5cCIgOiAiSldUIiwia2lkIiA6ICIwcWdCQWl3ZldSZG1kUlU0R0NvdTRFdENxSDJjU1NRZkxQSDJmNG85aDh3In0.eyJleHAiOjE3MDczODY5OTksImlhdCI6MTcwNzM4NjY5OSwianRpIjoiNDRlM2VhN2UtNTM0MC00MTJiLTk5NmYtMTI1MmE5NzJjNmJhIiwiaXNzIjoiaHR0cDovL2xvY2FsaG9zdDoxODA4MC9hdXRoL3JlYWxtcy9jYW11bmRhLXBsYXRmb3JtIiwiYXVkIjpbInplZWJlIiwiemVlYmUtYXBpIiwiYWNjb3VudCJdLCJzdWIiOiI4OWJjZmQyYi1hYjJkLTQwMmQtOTQzMS02YmM4ODkwYzM1NWEiLCJ0eXAiOiJCZWFyZXIiLCJhenAiOiJ6ZWViZSIsImFjciI6IjEiLCJyZWFsbV9hY2Nlc3MiOnsicm9sZXMiOlsiRGVmYXVsdCB1c2VyIHJvbGUiXX0sInJlc291cmNlX2FjY2VzcyI6eyJ6ZWViZS1hcGkiOnsicm9sZXMiOlsid3JpdGU6KiJdfSwiYWNjb3VudCI6eyJyb2xlcyI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19fSwic2NvcGUiOiJlbWFpbCBwcm9maWxlIiwiY2xpZW50SG9zdCI6IjE5Mi4xNjguNjUuMSIsImVtYWlsX3ZlcmlmaWVkIjpmYWxzZSwicGVybWlzc2lvbnMiOnsiemVlYmUtYXBpIjpbIndyaXRlOioiXSwiYWNjb3VudCI6WyJtYW5hZ2UtYWNjb3VudCIsIm1hbmFnZS1hY2NvdW50LWxpbmtzIiwidmlldy1wcm9maWxlIl19LCJncm91cHMiOltdLCJwcmVmZXJyZWRfdXNlcm5hbWUiOiJzZXJ2aWNlLWFjY291bnQtemVlYmUiLCJjbGllbnRBZGRyZXNzIjoiMTkyLjE2OC42NS4xIiwiY2xpZW50X2lkIjoiemVlYmUifQ.os2g3fVuJ2LFUkCjiGK3PEHKdmKhtG2s3oAXv13oC4DGwupSeRU4TaUq8gR3ljH7AChyXt-Lg-falV-umSjLyopG9OxNh4PPuDGnJj-uLjM4YxjtiaIr_DcHQnb_avTh1Pdzn8Yze_0iKPs4UDvBABDBmIZjbDcwxVw4Uoxs8DnGMCZ1KNIGNC2EOcFFNPiEqMIrX6u18SCvQlF9Ra1pjjZo1HNyPKocHnAuwS-X04uxZ9YoBbDA7GNFKkICB6EGkRq4wgwrSmhrkaCmmbGkjSRKHjEN-LtlmZOofpeh0IvpdEj_cbMUm5eF3przIICLzoiaRLZmnOXyneAxeCTG3Q, grpc-timeout: 19999768u] streamDependency=0 weight=16 exclusive=false padding=0 endStream=false
2024-02-08T11:10:02.115+01:00 DEBUG 83706 --- [-worker-ELG-1-7] io.grpc.netty.NettyClientHandler         : [id: 0x8933b251, L:/127.0.0.1:58521 - R:/127.0.0.1:26500] OUTBOUND DATA: streamId=253 padding=0 endStream=true length=68 bytes=000000003f0a0d73656e642d6d65737361676573121a74696d65724576656e74546573742373656e644d65737361676518e0a712202030904e3a093c64656661...
2024-02-08T11:10:02.117+01:00 DEBUG 83706 --- [-worker-ELG-1-7] io.grpc.netty.NettyClientHandler         : [id: 0x8933b251, L:/127.0.0.1:58521 - R:/127.0.0.1:26500] INBOUND HEADERS: streamId=253 headers=GrpcHttp2ResponseHeaders[:status: 200, content-type: application/grpc, grpc-status: 16, grpc-message: Failed to parse bearer token, see cause for details] padding=0 endStream=true
2024-02-08T11:10:02.117+01:00  WARN 83706 --- [ault-executor-2] io.camunda.zeebe.client.job.poller       : Failed to activate jobs for worker timerEventTest#sendMessage and job type send-messages

io.grpc.StatusRuntimeException: UNAUTHENTICATED: Failed to parse bearer token, see cause for details
	at io.grpc.Status.asRuntimeException(Status.java:537) ~[grpc-api-1.60.0.jar:1.60.0]
	at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:481) ~[grpc-stub-1.60.0.jar:1.60.0]
	at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:574) ~[grpc-core-1.60.0.jar:1.60.0]
	at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:72) ~[grpc-core-1.60.0.jar:1.60.0]
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:742) ~[grpc-core-1.60.0.jar:1.60.0]
	at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:723) ~[grpc-core-1.60.0.jar:1.60.0]
	at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) ~[grpc-core-1.60.0.jar:1.60.0]
	at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133) ~[grpc-core-1.60.0.jar:1.60.0]
	at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144) ~[na:na]
	at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642) ~[na:na]
	at java.base/java.lang.Thread.run(Thread.java:1583) ~[na:na]

Environment:

  • OS: Sonoma 14.3 (23D56)
  • Deployment: Self-managed. Version: 8.4
  • Spring-Zeebe Version: 8.4.0
  • SpringBoot Version: 3.2.2
  • Configuration: No special configuration made.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant