diff --git a/README.md b/README.md index ac9c0bf..3310b09 100644 --- a/README.md +++ b/README.md @@ -320,16 +320,24 @@ make install ## Testing locally A convenience docker-compose allows you to test the RDPGW locally. It uses [Keycloak](http://www.keycloak.org) -and [xrdp](http://www.xrdp.org) and exposes it services on port 443. You will need to allow your browser +and [xrdp](http://www.xrdp.org) and exposes it services on port 9443. You will need to allow your browser to connect to localhost with and self signed security certificate. For chrome set `chrome://flags/#allow-insecure-localhost`. The username to login to both Keycloak and xrdp is `admin` as is the password. +__NOTE__: The redirecting relies on DNS. Make sure to add ``127.0.0.1 keycloak`` to your `/etc/hosts` file to ensure +that the redirect works. + +__NOTE__: The local testing environment uses a self signed certificate. This works for MAC clients, but not for Windows. +If you want to test it on Windows you will need to provide a valid certificate. + ```bash cd dev/docker docker-compose build docker-compose up ``` +You can then connect to the gateway at `https://localhost:9443/connect` which will start the authentication flow. + ## Use Point your browser to `https://your-gateway/connect`. After authentication and RDP file will download to your desktop. This file can be opened by one diff --git a/dev/docker/Dockerfile.xrdp b/dev/docker/Dockerfile.xrdp index d1743a2..71e1acd 100644 --- a/dev/docker/Dockerfile.xrdp +++ b/dev/docker/Dockerfile.xrdp @@ -1,4 +1,4 @@ -FROM rattydave/docker-ubuntu-xrdp-mate-custom:20.04 +FROM rattydave/docker-ubuntu-xrdp-mate-custom:latest RUN cd /etc/xrdp/ && \ openssl req -x509 -newkey rsa:2048 -nodes -keyout key.pem -out cert.pem -days 3650 \ diff --git a/dev/docker/docker-compose-arm64.yml b/dev/docker/docker-compose-arm64.yml index 0ec46e7..04ab6a7 100644 --- a/dev/docker/docker-compose-arm64.yml +++ b/dev/docker/docker-compose-arm64.yml @@ -28,7 +28,7 @@ services: xrdp: container_name: xrdp hostname: xrdp - image: bolkedebruin/docker-ubuntu-xrdp-mate-rdpgw:20.04 + image: bolkedebruin/docker-ubuntu-xrdp-mate-rdpgw:latest ports: - 3389:3389 restart: on-failure @@ -43,11 +43,12 @@ services: - 9443:9443 restart: on-failure depends_on: - - keycloak + keycloak: + condition: service_healthy environment: RDPGW_SERVER__SESSION_STORE: file healthcheck: test: ["CMD", "curl", "-f", "http://keycloak:8080"] - interval: 30s + interval: 10s timeout: 10s retries: 10 diff --git a/dev/docker/docker-compose.yml b/dev/docker/docker-compose.yml index cdad9e4..6d898f3 100644 --- a/dev/docker/docker-compose.yml +++ b/dev/docker/docker-compose.yml @@ -33,7 +33,7 @@ services: xrdp: container_name: xrdp hostname: xrdp - image: bolkedebruin/docker-ubuntu-xrdp-mate-rdpgw:20.04 + image: bolkedebruin/docker-ubuntu-xrdp-mate-rdpgw:latest ports: - 3389:3389 restart: on-failure @@ -47,7 +47,8 @@ services: - 9443:9443 restart: on-failure depends_on: - - keycloak + keycloak: + condition: service_healthy healthcheck: test: ["CMD", "curl", "-f", "http://keycloak:8080"] interval: 30s