camunda-community-hub / camunda-8-examples

44 stars 39 forks source link

Is deployment.yaml of payment-example-process-application wrong? #481

Closed WongYT closed 1 week ago

WongYT commented 2 months ago

Hi

I encountered an error when I ran the payment-example-process-application example.

Caused by: io.grpc.StatusRuntimeException: UNAUTHENTICATED: Expected bearer token at header with key [authorization], but found nothing
    at io.grpc.Status.asRuntimeException(Status.java:537) ~[grpc-api-1.58.0.jar:1.58.0]
    at io.grpc.stub.ClientCalls$StreamObserverToCallListenerAdapter.onClose(ClientCalls.java:481) ~[grpc-stub-1.58.0.jar:1.58.0]
    at io.grpc.internal.DelayedClientCall$DelayedListener$3.run(DelayedClientCall.java:489) ~[grpc-core-1.58.0.jar:1.58.0]
    at io.grpc.internal.DelayedClientCall$DelayedListener.delayOrExecute(DelayedClientCall.java:453) ~[grpc-core-1.58.0.jar:1.58.0]
    at io.grpc.internal.DelayedClientCall$DelayedListener.onClose(DelayedClientCall.java:486) ~[grpc-core-1.58.0.jar:1.58.0]
    at io.grpc.internal.ClientCallImpl.closeObserver(ClientCallImpl.java:567) ~[grpc-core-1.58.0.jar:1.58.0]
    at io.grpc.internal.ClientCallImpl.access$300(ClientCallImpl.java:71) ~[grpc-core-1.58.0.jar:1.58.0]
    at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInternal(ClientCallImpl.java:735) ~[grpc-core-1.58.0.jar:1.58.0]
    at io.grpc.internal.ClientCallImpl$ClientStreamListenerImpl$1StreamClosed.runInContext(ClientCallImpl.java:716) ~[grpc-core-1.58.0.jar:1.58.0]
    at io.grpc.internal.ContextRunnable.run(ContextRunnable.java:37) ~[grpc-core-1.58.0.jar:1.58.0]
    at io.grpc.internal.SerializingExecutor.run(SerializingExecutor.java:133) ~[grpc-core-1.58.0.jar:1.58.0]
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) ~[na:na]
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) ~[na:na]
    at java.base/java.lang.Thread.run(Unknown Source) ~[na:na]

According to the documentation, the environment variable "ZEEBE_CLIENT_CLOUD_CLIENTSECRET" should be "ZEEBE_CLIENT_SECRET" https://docs.camunda.io/docs/self-managed/zeebe-deployment/security/client-authorization/#environment-variables

        - name: ZEEBE_CLIENT_CLOUD_CLIENTSECRET
          valueFrom:
            secretKeyRef:
              name: payment-example-process-application-secrets
              key: ZEEBE_CLIENT_CLOUD_CLIENTSECRET

Here is my final YAML result, is right?

- name: ZEEBE_CLIENT_SECRET
          valueFrom:
            secretKeyRef:
              name: payment-example-process-application-secrets
              key: ZEEBE_CLIENT_CLOUD_CLIENTSECRET

thanks.

jonathanlukas commented 1 week ago

I adjusted the yaml to match the camunda spring sdk.