MinIO
MinIO prend en charge la gestion des identités externes en utilisant un fournisseur compatible OpenID Connect (OIDC). Ce document couvre la configuration de Casdoor en tant que fournisseur d'identité pour supporter MinIO.
Étape 1 : Déployer Casdoor & MinIO
Tout d'abord, déployez Casdoor.
See Server installation.
Après un déploiement réussi, assurez-vous que :
- The Casdoor server is running on
http://localhost:8000. - Open your favorite browser and visit
http://localhost:7001to see the login page of Casdoor. - Testez la fonctionnalité de connexion en entrant
adminet123.
Implement a Casdoor-based login in your app with the following steps.
Deploy MinIO: MinIO quickstart. Install the mc client: MinIO mc.
Étape 2 : Configurer l'application Casdoor
-
Créez une nouvelle application Casdoor ou utilisez-en une existante.
-
Ajoutez votre URL de redirection.

-
Ajoutez le fournisseur que vous souhaitez et fournissez les paramètres nécessaires.
Note Client ID and Client secret for the next step. OIDC discovery:
http://<CASDOOR_HOSTNAME>/.well-known/openid-configuration. -
Cette étape est nécessaire pour MinIO. Comme MinIO a besoin d'utiliser un attribut de revendication dans JWT pour sa politique, vous devriez également le configurer dans Casdoor. Actuellement, Casdoor utilise
tagcomme solution de contournement pour configurer la politique de MinIO.See MinIO policy-based access control for supported policies.
Étape 3 : Configurer MinIO
Start a MinIO server, for example:
export MINIO_ROOT_USER=minio
export MINIO_ROOT_PASSWORD=minio123
minio server /mnt/export
Use --console-address to set the console address and port.
Ensuite, ajoutez un alias de service en utilisant le client MinIO mc.
mc alias set myminio <Votre adresse de console> minio minio123
Maintenant, configurez OpenID Connect de MinIO. Pour Casdoor, la commande sera :
mc admin config set myminio identity_openid config_url="http://CASDOOR_HOSTNAME/.well-known/openid-configuration" client_id=<client id> client_secret=<client secret> claim_name="tag"
See the MinIO OpenID identity management docs for more parameters.
Une fois configuré avec succès, redémarrez l'instance MinIO.
mc admin service restart myminio
Étape 4 : Essayez la démo !
Maintenant, ouvrez votre console MinIO dans le navigateur et cliquez sur Login with SSO.
You are redirected to the Casdoor login page; after sign-in, back to MinIO and logged in. You then see the buckets and objects available to you.
If the Casdoor frontend and backend use different ports, the redirect may hit the backend and show 404. Point the redirect URL to the frontend port so the login page loads correctly.