Skip to content

problem connecting to workspace behind application proxy #324

Closed
@mnebelnlb

Description

@mnebelnlb

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:

image

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

bpmct commented on Nov 15, 2023

@bpmct
Member

Thanks for reporting! We plan on taking a look next week :)

code-asher

code-asher commented on Nov 17, 2023

@code-asher
Member

I think this got fixed in #323, we were missing headers on the binary download.

mnebelnlb

mnebelnlb commented on Nov 17, 2023

@mnebelnlb
Author

confirmed - updating to 2.9.1 solved the problem!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @bpmct@code-asher@mnebelnlb

        Issue actions

          problem connecting to workspace behind application proxy · Issue #324 · coder/jetbrains-coder