defguard
  • Introduction
  • User documentation (help)
    • 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
    • Desktop Client
    • CLI Client
  • Admin & features
    • Deploying your instance
      • One-line install script
      • Standalone package based installation
      • Docker images and tags
      • Docker Compose
      • Kubernetes
      • Upgrading
      • Gateway
        • Running gateway on MikroTik routers
      • Securing gRPC communication
      • OpenID RSA key
      • Configuration
      • Pre-production and development releases
      • High Availability and Failover
      • Health check
    • Features & configuration
      • 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
      • Gateway notifications
      • New version notifications
  • Troubleshooting Guide
    • Sending support information
    • Client Windows installer exit codes
    • Client "All traffic" connection issues
    • WebAuthn security keys
  • Enterprise Features
    • License
    • 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
      • REST API
      • Access Control List
        • ACL Aliases
      • LDAP and Active Directory integration
        • Configuration
        • Settings table
        • Two-way LDAP and Active Directory synchronization
  • Tutorials
    • Step by step setting up a VPN server
      • Adding additional VPN locations
  • In depth
    • Roadmap
    • Architecture
      • How do VPN statistics work
      • Security concepts
  • For Developers
    • Contributing
    • Environment setup
    • Translations (core/web)
      • Switching language
      • Adding translations
  • Translations (client)
    • Adding translations
  • Contact us
    • Community & Support
Powered by GitBook
On this page
  • RSA Setup
  • Add MinIO OpenID Client
  • MinIO Configuration

Was this helpful?

Edit on GitHub
  1. Admin & features
  2. Features & configuration
  3. SSO (OpenID Connect)

MinIO

PreviousDjangoNextVault

Last updated 4 months ago

Was this helpful?

MinIO has OpenID Connect functionality out of the box. We will use it to authenticate users from Defguard to MinIO.

RSA Setup

MinIO, like Django, requires Defguard to use RSA key instead of our default HMAC. This is due to the different response schema that MinIO expects.

Generate RSA key file if you don't have one :

openssl genpkey -out rsakey.pem -algorithm RSA -pkeyopt rsa_keygen_bits:2048

Now we need to set DEFGUARD_OPENID_KEY variable to path pointing to that rsakey.pem file.

When starting Defguard now you should be able to see the following info log:

INFO defguard: Using RSA OpenID signing key

Add MinIO OpenID Client

Navigate to the OpenID page in Defguard and add MinIO to the client's list. Redirect URL need to point to your MinIO console root domain and path should be /oauth_callback like:

http://localhost:9001/oauth_callback

MinIO Configuration

In this example, we will use the environment variables.

Reference MinIO docs for more detailed explanation: https://min.io/docs/minio/linux/reference/minio-server/minio-server.html#environment-variables

The table below assumes MinIO console exists on minio.example and Defguard exists on defguard.example

Variable
Example Value
Description

MINIO_IDENTITY_OPENID_CLIENT_ID

client_id_from_defguard

Click on Minio app row in OpenID page, copy from opened modal

MINIO_IDENTITY_OPENID_CLIENT_SECRET

client_secret_from_defguard

Click on Minio app row in OpenID page, copy from opened modal

MINIO_IDENTITY_OPENID_CONFIG_URL

http://defguard.example/.well-known/openid-configuration

MINIO_IDENTITY_OPENID_DISPLAY_NAME

Defguard

This will be displayed in minio login page.

MINIO_IDENTITY_OPENID_SCOPES

openid,email,profile

Scopes that Minio will ask access to

MINIO_BROWSER_REDIRECT_URL

http://minio.example

This should point to valid minio console domain. Check docs for more info.

MINIO_IDENTITY_OPENID_ROLE_POLICY

consoleAdmin

MinIO policy that will be granted to all users authneticated via OpenID Connect. This can be custom policy set by you or one of default ones like in this example every Defguard user will be regared as consoleAdmin.