MinIO
Last updated
Last updated
MinIO has OpenID Connect functionality out of the box. We will use it to authenticate users from Defguard to MinIO.
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 :
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 :
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:
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
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.