使用Guacamole和ADFS进行SAML集成

首先

由于Guacamole可以与LDAP进行协作,我认为没有必要特意与ADFS进行协作。我第一次使用了ADFS,所以试了一下。

尝试的配置 de

image.png
    • ドメインやFQDNはデタラメに設定しましたが、動作には影響なさそうでした。

 

    認証はブラウザとGuacamole、ブラウザとADFS間で行われるため、GuacamoleとADFSは直接通信は必要ないと思います。

ADFS的设置

通过添加 Windows Server 的角色和功能,已安装了 ADFS。在过程中,需要 ADFS 的 FQDN 的 TLS 证书,因此我设置了自签名证书。

image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png
image.png

鳄梨酱的设置

image.png
image.png
version: "3"
services:

  postgres:
    image: postgres:latest
    restart: unless-stopped
    environment:
      PGDATA: /var/lib/postgresql/data/guacamole
      POSTGRES_DB: guacamole_db
      POSTGRES_PASSWORD: guacamole123456789
      POSTGRES_USER: guacamole_user
    volumes:
      - ./pginit:/docker-entrypoint-initdb.d
      - ./pgdata:/var/lib/postgresql/data

  guacd:
    image: guacamole/guacd:latest
    restart: unless-stopped

  guacamole:
    image: guacamole/guacamole:latest
    restart: unless-stopped
    ports:
      - "8080:8080"
    environment:
      GUACD_HOSTNAME: guacd
      POSTGRES_DATABASE: guacamole_db
      POSTGRES_HOSTNAME: postgres
      POSTGRES_PASSWORD: guacamole1234567890
      POSTGRES_USER: guacamole_user
      GUACAMOLE_HOME: /etc/guacamole
    volumes:
      - ./guacamole:/etc/guacamole
    depends_on:
      - postgres
      - guacd

  nginx:
    image: nginx:latest
    restart: unless-stopped
    ports:
      - "443:443"
    volumes:
      - ./nginx/conf.d:/etc/nginx/conf.d
      - ./nginx/ssl:/etc/nginx/ssl:ro
image.png
# SAML Metadata URL from IdP (Azure AD, Okta, etc)
saml-idp-metadata-url: file:///etc/guacamole/FederationMetadata.xml

# Alternative: Single Sign On URL
# saml-idp-url: https://www.test.com/adfs/ls/IdpInitiatedSignOn.aspx

# These must match what was entered into Azure AD or Okta
saml-entity-id: https://guac.company.com
saml-callback-url: https://guac.company.com/guacamole

# Change this to true if SSO is not working
saml-debug: true

# Automatically redirect to SSO portal for sign-on
extension-priority: saml

# Alternative: Go to Guacamole local login before SSO
# extension-priority: *, saml

# SAML attribute/claim for group membership
saml-group-attribute: groups

# If SAML extension fails, default back to local login
skip-if-unavailable: saml
saml-strict: false
image.png
image.png
server {
    listen 443 ssl;
    server_name  localhost;
    ssl_certificate      /etc/nginx/ssl/nginx.pem;
    ssl_certificate_key  /etc/nginx/ssl/nginx.key;

    location /guacamole/ {
        proxy_pass http://guacamole:8080/guacamole/;
        proxy_buffering off;
        proxy_http_version 1.1;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection $http_connection;
        client_max_body_size 10g;
        access_log off;
    }

    error_page   500 502 503 504  /50x.html;
    location = /50x.html {
        root   /usr/share/nginx/html;
    }
}

访问Guacamole

image.png
image.png
image.png

無事アクセスできました。

在旅途中遇到的困境

    ActiveDirectoryのユーザーのメールアドレスを設定していないと、GuacamoleとAFDSのサインインの画面をループした。
bannerAds