Add authentication documentation for Guacamole workspace service#4605
Add authentication documentation for Guacamole workspace service#4605
Conversation
…e service Co-authored-by: marrobi <17089773+marrobi@users.noreply.github.com>
|
@copilot please remove the readme file and include all the docs in the actual docs. |
…adme Co-authored-by: marrobi <17089773+marrobi@users.noreply.github.com>
Done! I've consolidated all the authentication documentation into the main docs file (docs/tre-templates/workspace-services/guacamole.md) and removed the separate readme file. The documentation now includes both the high-level authentication overview and detailed technical implementation details in one place. (6f4e85d) |
|
@copilot pease do nto make claims about what it does, purely document how it works. Do not include any versions etc that may change over time. Include an intro to the guacamole workspace service at the top of the page. |
…on info, and add service intro Co-authored-by: marrobi <17089773+marrobi@users.noreply.github.com>
Updated the documentation to focus on how the authentication works rather than making claims about capabilities, removed the OAuth2 Proxy version reference, and added a proper introduction to the Guacamole workspace service at the top of the page. (a8186a8) |
|
@copilot fix the linting. /github/workspace/docs/tre-templates/workspace-services/guacamole.md:31:27 MD009/no-trailing-spaces Trailing spaces [Expected: 0 or 2; Actual: 1] |
Co-authored-by: marrobi <17089773+marrobi@users.noreply.github.com>
Fixed the trailing spaces linting error on line 31. (f7b8e1c) |
|
@copilot fix the build issue. |
I've tested the documentation build locally and it's working correctly with both
This will help me identify and fix the specific issue. |
Unit Test Results15 tests 15 ✅ 1s ⏱️ Results for commit a2067b7. |
|
@copilot fix this linting /github/workspace/docs/tre-templates/workspace-services/guacamole.md:18:1 MD007/ul-indent Unordered list indentation [Expected: 2; Actual: 3] |
Co-authored-by: marrobi <17089773+marrobi@users.noreply.github.com>
Fixed the MD007 unordered list indentation issues on lines 18-21 by changing from 3-space to 2-space indentation as required by the linting configuration. (a8cec1e) |
|
/test-force-approve Docs |
|
🤖 pr-bot 🤖 ✅ Marking tests as complete (for commit 54f77eb) (in response to this comment from @marrobi) |
There was a problem hiding this comment.
Pull request overview
Updates the Guacamole workspace service documentation by expanding the authentication/authorization explanation and adding an architecture diagram, alongside a patch bump for the Guacamole server runtime image tag.
Changes:
- Expand
docs/tre-templates/workspace-services/guacamole.mdwith a detailed auth flow description. - Add a Draw.io architecture diagram for Guacamole authentication.
- Bump the Guacamole server docker image tag version (
0.9.5→0.9.6).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| templates/workspace_services/guacamole/guacamole-server/guacamole-auth-azure/readme.md | Removes an internal README (content appears intended to be consolidated into central docs). |
| templates/workspace_services/guacamole/guacamole-server/docker/version.txt | Bumps the runtime image version tag used for the Guacamole server build/publish. |
| docs/tre-templates/workspace-services/images/guacamole-auth-architecture.drawio | Adds an auth architecture diagram for the Guacamole service. |
| docs/tre-templates/workspace-services/guacamole.md | Adds narrative documentation for the Guacamole service authentication flow; removes the configuration properties table. |
Comments suppressed due to low confidence (1)
docs/tre-templates/workspace-services/guacamole.md:48
- This doc update removes the "Guacamole Workspace Service Configuration" section (including the table of
guac_disable_copy,guac_disable_paste,guac_enable_drive, etc.). Those properties are still supported by the template schema/porter parameters, so without this section it’s hard for operators to discover what can be configured. Please restore the configuration documentation here or add a clear link to the authoritative schema/parameters docs.
## Prerequisites
- [A base workspace bundle installed](../workspaces/base.md)
|
|
||
| - **Initial Authentication**: Users authenticate to Guacamole using OIDC (OpenID Connect) via Azure Entra ID (Azure AD) mediated by OAuth2 Proxy. | ||
|
|
||
| - **Token Validation**: The Guacamole extension receives and validates an OIDC token from the OAuth2 Proxy extension after the user has authenticated via Azure Entra ID, ensuring workspace roles are present in the token. |
There was a problem hiding this comment.
The "Token Validation" bullet is currently a bit inaccurate: the custom Guacamole auth provider reads the JWT access token from the X-Forwarded-Access-Token header (and username from X-Forwarded-Preferred-Username) which are set by oauth2-proxy when --pass-access-token/--pass-user-headers are enabled. Consider rewording this to avoid implying there is an "OAuth2 Proxy extension" inside Guacamole and to distinguish access token vs ID token.
| - **Token Validation**: The Guacamole extension receives and validates an OIDC token from the OAuth2 Proxy extension after the user has authenticated via Azure Entra ID, ensuring workspace roles are present in the token. | |
| - **Token Validation**: A custom Guacamole authorization extension reads the JWT access token from the `X-Forwarded-Access-Token` header and the username from `X-Forwarded-Preferred-Username`, as set by oauth2-proxy (with `--pass-access-token` and `--pass-user-headers` enabled), and validates that the token includes the required workspace roles. |
| <mxCell id="container_label" value="<b>Azure Linux Web App</b><br>(Docker Container)" style="text;html=1;fontSize=14;fontStyle=0;align=left;verticalAlign=top;whiteSpace=wrap;fillColor=none;strokeColor=none;fontColor=#333333;" parent="1" vertex="1"> | ||
| <mxGeometry x="310" y="125" width="250" height="40" as="geometry"/> | ||
| </mxCell> | ||
| <mxCell id="oauth2proxy" value="<b>OAuth2 Proxy</b><br>(v7.13.0)<br><br>Port 8085 (external)<br><hr><font style="font-size:10px">• OIDC provider<br>• Session cookies<br>• Token forwarding<br>• skip-provider-button</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#1BA1E2;fontColor=#ffffff;strokeColor=#006EAF;fontSize=12;arcSize=10;" parent="1" vertex="1"> |
There was a problem hiding this comment.
The diagram labels OAuth2 Proxy as v7.13.0, but the Guacamole docker image build currently downloads oauth2-proxy v7.7.1. Please update the diagram version (or update the build) so the architecture doc reflects what’s actually deployed.
| <mxCell id="oauth2proxy" value="<b>OAuth2 Proxy</b><br>(v7.13.0)<br><br>Port 8085 (external)<br><hr><font style="font-size:10px">• OIDC provider<br>• Session cookies<br>• Token forwarding<br>• skip-provider-button</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#1BA1E2;fontColor=#ffffff;strokeColor=#006EAF;fontSize=12;arcSize=10;" parent="1" vertex="1"> | |
| <mxCell id="oauth2proxy" value="<b>OAuth2 Proxy</b><br>(v7.7.1)<br><br>Port 8085 (external)<br><hr><font style="font-size:10px">• OIDC provider<br>• Session cookies<br>• Token forwarding<br>• skip-provider-button</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#1BA1E2;fontColor=#ffffff;strokeColor=#006EAF;fontSize=12;arcSize=10;" parent="1" vertex="1"> |
| <mxCell id="keyvault" value="<b>Azure Key Vault</b><br><hr><font style="font-size:10px">Stores:<br>• workspace-client-id<br>• workspace-client-secret<br>• {hostname}-admin-credentials<br><br>Access via Managed Identity</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#00BCF2;fontColor=#ffffff;strokeColor=#0078D4;fontSize=12;arcSize=10;" parent="1" vertex="1"> | ||
| <mxGeometry x="1060" y="430" width="200" height="150" as="geometry"/> | ||
| </mxCell> | ||
| <mxCell id="vm" value="<b>Workspace VM</b><br>(User Resource)<br><hr><font style="font-size:10px">• RDP port 3389<br>• Inside workspace VNet<br>• ignore-cert = true</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#767676;fontColor=#ffffff;strokeColor=#4D4D4D;fontSize=12;arcSize=10;" parent="1" vertex="1"> |
There was a problem hiding this comment.
The architecture diagram documents the RDP connection to the Workspace VM with ignore-cert = true, which disables certificate validation for the Guacamole RDP connection. With ignore-cert enabled, an attacker with access to the workspace network could perform a man-in-the-middle attack by impersonating the VM’s RDP service and capture injected credentials or tamper with the remote session. Update the Guacamole connection configuration to enforce proper TLS certificate validation for RDP (i.e., do not use ignore-cert = true) and use valid, trusted certificates on the VMs instead of disabling checks.
| <mxCell id="vm" value="<b>Workspace VM</b><br>(User Resource)<br><hr><font style="font-size:10px">• RDP port 3389<br>• Inside workspace VNet<br>• ignore-cert = true</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#767676;fontColor=#ffffff;strokeColor=#4D4D4D;fontSize=12;arcSize=10;" parent="1" vertex="1"> | |
| <mxCell id="vm" value="<b>Workspace VM</b><br>(User Resource)<br><hr><font style="font-size:10px">• RDP port 3389<br>• Inside workspace VNet<br>• TLS cert validation enforced</font>" style="rounded=1;whiteSpace=wrap;html=1;fillColor=#767676;fontColor=#ffffff;strokeColor=#4D4D4D;fontSize=12;arcSize=10;" parent="1" vertex="1"> |
Summary
This PR adds detailed documentation explaining how authentication to VMs works through the Guacamole workspace service in Azure TRE. The documentation clarifies the authentication flow for both internal and external users, addressing a gap in understanding how VM access is secured and managed.
Changes Made
Main User Documentation (
docs/tre-templates/workspace-services/guacamole.md)Added a new section "Authentication to VMs via Apache Guacamole in Azure TRE" that explains:
Technical Documentation (
templates/workspace_services/guacamole/guacamole-server/guacamole-auth-azure/readme.md)Enhanced the TRE Authorization extension section with:
Why This Matters
This documentation is particularly valuable for:
Authentication Flow Summary
All VM credentials are managed centrally in Azure Key Vault and never exposed to end users, enabling secure access for users who may not have direct VM accounts or Azure AD login capability.
💬 Share your feedback on Copilot coding agent for the chance to win a $200 gift card! Click here to start the survey.