MinIO
MinIOは、OpenID Connect(OIDC)互換プロバイダーを 使用した外部アイデンティティ管理をサポートしています。 このドキュメントでは、Casdoorをアイデンティティプロバイダーとして設定し、MinIOをサポートする方法について説明します。
ステップ1: Casdoor & MinIOをデプロイする
まず、Casdoorをデプロイします。
See Server installation.
成功したデプロイメントの後、以下を確認してください:
- The Casdoor server is running on
http://localhost:8000. - Open your favorite browser and visit
http://localhost:7001to see the login page of Casdoor. adminと123を入力してログイン機能をテストします。
Implement a Casdoor-based login in your app with the following steps.
Deploy MinIO: MinIO quickstart. Install the mc client: MinIO mc.
ステップ2: Casdoorアプリケーションを設定する
-
新しいCasdoorアプリケーションを作成するか、既存のものを使用します。
-
リダイレクトURLを追加します。

-
必要な設定を提供して、使用したいプロバイダーを追加します。
Note Client ID and Client secret for the next step. OIDC discovery:
http://<CASDOOR_HOSTNAME>/.well-known/openid-configuration. -
このステップはMinIOにとって必要です。 MinIOはJWTのポリシーにクレーム属性を使用する必要があるため、Casdoorでもそれを設定する必要があります。 現在、Casdoorは
tagを使用してMinIOのポリシーを設定するためのワークアラウンドとして使用しています。See MinIO policy-based access control for supported policies.
ステップ3: 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.
次に、MinIOクライアントmcを使用してサービスエイリアスを追加します。
mc alias set myminio <Your console address> minio minio123
今、MinIOのOpenID Connectを設定します。 Casdoorの場合、コマンドは以下になります:
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.
正常に設定されたら、MinIOインスタンスを再起動してください。
mc admin service restart myminio
ステップ4: デモを試してみましょう!
今、ブラウザでMinIOコンソールを開き、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.