zeebe-io/zeebe-modeler

Zeebe Modeler OAuth token issue

younes-io opened this issue · 1 comments

Describe the Bug

I have created and exposed an authentication endpoint that returns an access token. When I enter this endpoint in the Deploy popup in Zeebe Modeler and all the other OAuth details, Zeebe Modeler indicates the error “Unknown error. Please check Zeebe cluster status” in the Contact Point, and I get this in the logs:

ERROR app:zeebe-api Failed to connect with config (secrets omitted): {
endpoint: {
type: 'oauth',
url: 'localhost:50051',
clientId: '****************************',
oauthURL: 'http://localhost:4000/token'
}
} Error: 14 UNAVAILABLE: No connection established
at Object.callErrorFromStatus (C:\dev\experiment\zeebe-modeler\app\node_modules@grpc\grpc-js\build\src\call.js:30:26)
at Object.onReceiveStatus (C:\dev\experiment\zeebe-modeler\app\node_modules@grpc\grpc-js\build\src\client.js:174:52)
at C:\dev\experiment\zeebe-modeler\app\node_modules@grpc\grpc-js\build\src\call-stream.js:63:35
at Object.onReceiveStatus (C:\dev\experiment\zeebe-modeler\app\node_modules\zeebe-node\dist\lib\GrpcClient.js:138:36)
at InterceptingListenerImpl.onReceiveStatus (C:\dev\experiment\zeebe-modeler\app\node_modules@grpc\grpc-js\build\src\call-stream.js:58:23)
at Object.onReceiveStatus (C:\dev\experiment\zeebe-modeler\app\node_modules@grpc\grpc-js\build\src\client-interceptors.js:340:141)
at Object.onReceiveStatus (C:\dev\experiment\zeebe-modeler\app\node_modules@grpc\grpc-js\build\src\client-interceptors.js:303:181)
at Http2CallStream.outputStatus (C:\dev\experiment\zeebe-modeler\app\node_modules@grpc\grpc-js\build\src\call-stream.js:114:27)
at Http2CallStream.maybeOutputStatus (C:\dev\experiment\zeebe-modeler\app\node_modules@grpc\grpc-js\build\src\call-stream.js:153:22)
at Http2CallStream.endCall (C:\dev\experiment\zeebe-modeler\app\node_modules@grpc\grpc-js\build\src\call-stream.js:140:18) {
code: 14,
details: 'No connection established',
metadata: Metadata { internalRepr: Map {}, options: {} }
}

I did some debugging and I noticed that when I enter the OAuth details in Zeebe Modeler, it seems that the gRPC call for the method Topology does not contain the access_token returned by the OAuth URL in its headers. This is the content of the call object from the Topology method (I added some logging in the Zeebe Modeler code):

image

Environment

  • OS: Windows 10 10.0.19042
  • Zeebe Modeler Version: 0.12
  • Node: 12.18.3
  • npm: 6.14.9
  • Chrome: 90.0.4430.85

I have opened a clearer issue about this