defguard
  • Welcome
  • Getting help
  • About
    • About defguard
    • Features overview
  • Getting started
    • One-line install script
  • Admin Features
    • Overview
    • Zero-Trust VPN with 2FA/MFA
      • Create/manage VPN Location
      • Network overview
      • Executing custom gateway commands
      • Multi-Factor Authentication (MFA/2FA)
        • MFA Architecture
      • Remote desktop client configuration
      • DNS and domains
    • Remote user enrollment
      • User onboarding after enrollment
    • SSO (OpenID Connect)
      • Portainer
      • Grafana setup
      • Proxmox
      • Matrix / Synapse
      • Django
      • MinIO
      • Vault
    • SMTP for email notifications
    • YubiKey Provisioning
    • Webhooks
    • Forward auth
    • SSH Authentication
    • Network devices
    • Activity & Audit logs
    • Gateway notifications
    • New version notifications
  • User features
    • Overwiew
    • Desktop Client
    • CLI Client
    • Configuring VPN
      • Defguard Desktop Client
        • Update instance
      • Other WireGuard® Clients
        • Configuring a device for new VPN Location manually
    • Password change / Reset
    • Enrollment & Onboarding
      • With internal Defguard SSO
      • With external SSO (Google/Microsoft/Custom)
    • Setting up 2FA/MFA
  • Enterprise Features
    • Overview
    • Enteprise features
      • Automatic (real time) desktop client configuration & sync
      • External OpenID providers
        • Google
        • Microsoft
        • Zitadel
        • Keycloak
        • JumpCloud
        • Okta
        • Custom
      • External OIDC secure enrollment
      • VPN & Client behavior customization
      • Access Control List
        • ACL Aliases
        • Implementation Details
      • Audit Log Streaming to SIEM systems
        • Supported SIEM systems integrations
          • Vector integration guide
          • Logstash integration guide
      • LDAP and Active Directory integration
        • Configuration
        • Settings table
        • Two-way LDAP and Active Directory synchronization
      • REST API
  • Deployment strategies
    • Prerequisites
    • Standalone package based installation
    • Docker images and tags
    • Docker Compose
    • Kubernetes
    • Terraform
    • High Availability and Failover
    • Upgrading
    • Pre-production and development releases
    • Gateway
      • Running gateway on MikroTik routers
  • Securing gRPC communication
  • OpenID RSA key
  • Health check
  • Configuration
  • Tutorials
    • Step by step setting up a VPN server
      • Adding additional VPN locations
  • In depth
    • Architecture
      • How do VPN statistics work
      • Security concepts
    • Roadmap
    • Release cycle
  • For Developers
    • Contributing
    • Environment setup
      • Translations (core/web)
        • Switching language
        • Adding translations
      • Translations (client)
        • Adding translations
  • Resources
    • Troubleshooting Guide
      • Sending support information
      • Client Windows installer exit codes
      • Client "All traffic" connection issues
      • WebAuthn security keys
Powered by GitBook
On this page
  • Add Synapse app to Defguard
  • Matrix configuration

Was this helpful?

Edit on GitHub
  1. Admin Features
  2. SSO (OpenID Connect)

Matrix / Synapse

PreviousProxmoxNextDjango

Last updated 1 year ago

Was this helpful?

For Synapse OIDC to work you'll have to run Defguard with .

Add Synapse app to Defguard

First, go to the Defguard OpenID tab and click add new app button.

  1. Add the name Matrix

  2. Add your matrix address as redirect URL (e.g. https://matrix.com/_synapse/client/oidc/callback)

  3. Select scopes:

  • OpenID

  • Profile

  • Email

  • Phone

  1. Submit the form.

After successfully adding your app you can see it in the OpenID apps list. When you click on it you will be redirected to the client details page. From this page copy Client ID and Client secret values for later.

Matrix configuration

  1. Open your homeserver.yaml configuration file.

  2. Paste below configuration with appropriate values

# OpenID Connect provider settings
oidc_providers:
  - idp_id: Defguard
    idp_name: "Defguard"
    discover: false
    issuer: "https://yourdefguard.com/"
    client_id: "CLIENT_ID_FROM_DEFGUARD"  
    client_secret: "CLIENT_SECRET_FROM_DEFGUARD"  
    scopes: ["openid", "profile", "email", "phone"]
    authorization_endpoint: "https://yourdefguard.com/api/v1/oauth/authorize"
    token_endpoint: "https://yourdefguard.com/api/v1/oauth/token"
    userinfo_endpoint: "https://yourdefguard.com/api/v1/oauth/userinfo"
    jwks_uri: "https://yourdefguard.com/api/v1/oauth/discovery/keys"
    user_mapping_provider:
      config:
        localpart_template: "{{ user.email.split('@')[0] }}"
        display_name_template: "{{ user.first_name }} {{ user.last_name }}"
        email_template: "{{ user.email }}"

After logging out of your Matrix client of choice you should now be able to select your new realm and login with Defguard using OpenID Connect.

RSA signing key