Description
I started the JetBrains Gateway and want to connect to my coder workspace. The workspace is located behind an Azure AppProxy, so the Authorization-Header has to be set. This is accomplished by the use of the header-command.
When I try to connect, a new session token is requested, I authorize against AAD and retrieve the token. Then the Gateway want to retrieve the coder-binary and this fails with an error:
` CLI exited unexpectedly with 2.
org.zeroturnaround.exec.InvalidExitValueException: Unexpected exit value: 2, allowed exit values: [0], executed command [/Users/mnebel/Library/Application Support/coder-gateway/coder...e/coder-darwin-amd64, login, https://coder....de, --token, GwDRJ0azLh-Ctaklf3TdDpZmC7Hwfa5UX, --global-config, /Users/mnebel/Library/Application Support/coder-gateway/coder..../config], output was 583 bytes:
/Users/mnebel/Library/Application Support/coder-gateway/coder..../coder-darwin-amd64: line 1:
: command not found
/Users/mnebel/Library/Application Support/coder-gateway/coder.c.../coder-darwin-amd64: line 2:
: command not found
/Users/mnebel/Library/Application Support/coder-gateway/coder..../coder-darwin-amd64: line 3: syntax error near unexpected token (
/Users/mnebel/Library/Application Support/coder-gateway/coder.c.../coder-darwin-amd64: line 3: < -- Copyright (C) Microsoft Corporation. All rights reserved. -- >
'
at org.zeroturnaround.exec.InvalidExitUtil.checkExit(InvalidExitUtil.java:27)
`
I tried to debug the problem by using the mitmproxy and got the following screenshot:
The first two requests have the Authorization-Header set (not shown here) - but the requests to get the coder-binary lacks the header. This seems to be the cause for my problem, but I may be wrong. Has anyone been able to connect to a coder workspace behind an AppProxy?
Activity
bpmct commentedon Nov 15, 2023
Thanks for reporting! We plan on taking a look next week :)
code-asher commentedon Nov 17, 2023
I think this got fixed in #323, we were missing headers on the binary download.
mnebelnlb commentedon Nov 17, 2023
confirmed - updating to 2.9.1 solved the problem!