Skip to content

Configuring Vouch Proxy with self hosted GitLab on FreeBSD (including SSL via LetsEncrypt) #371

@YetAnotherBugHunter

Description

@YetAnotherBugHunter

Server OS: FreeBSD dev.ccr.net 12.2-RELEASE-p2 FreeBSD 12.2-RELEASE-p2 663e6b09467(HEAD) TRUENAS amd64
Nginx: nginx version: nginx/1.18.0
vouch-proxy:

gist with the config.yaml, vouch-proxy.log and nginx.conf

Describe the problem

Setup two FreeBSD jail, csserver.ccr.net and gitlab.ccr.net (this is an instance of gitlab-ce) within private network ccr.net. Note ccr.net is not the real domain name.

In the gitlab.ccr.net jail I:

Within the csserver.ccr.net jail I did the following:

  • Built and installed the latest release of vouch-proxy
  • Installed nginx 1.18 and added a server block for csserver.ccr.net and vouch.ccr.net using this template as a starting point.
  • Installed the protected app, code-server, and configured it to run on port 8080

In testing mode I see the following behavior:

  • validate : no jwt found in request
  • login http://vouch.ccr.net/login: 400 bad request
  • Click on the gitlab link and I'm take to the gitlab's login page, login and the authorise the access and am taken back to the vouch proxy page. Clearly the gitlab authorization is working
  • Click on the validate link: no jwt found in request

In normal mode when I go to the https://csserver.ccr.net, I'm taken to the gitlab login page. After successful login I'm presented with the gitlab authorize request page and upon clicking the authorize button, nothing happens other than the url changing to:

https://gitlab.ccr.net/oauth/authorize?client_id=REDACTED&redirect_uri=https%3A%2F%2Fvouch.ccr.net%2Fauth&response_type=code&scope=openid+email+profile&state=ImjII9xwyErrP6VNxaCpP2fmUB9u0kv4

I see the same behavior with firefox, chrome and edge.

Expected behavior
If all went well, I was expecting to see code-server's, the protected application, page displayed.

Desktop (please complete the following information):

  • OS: Windows 10
  • Browser firefox
  • Version 86.0 (64-bit)
  • Browser Chrome Version
  • Version 88.0.4324.182 (Official Build) (64-bit)
  • Browser Edge
  • Version 44.18362.449.0

Additional context

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions