MinIO

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

Last updated