1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

NextcloudでGoogleのSAMLログインを構成した時の話

Posted at

筆者について

name → Koki Teramoto
age → 18
language → ja_JP, en_US

本編

今回は題名にある通り、急にぶっ飛んだ話題ですが、何卒ご了承ください。さて、実は今Proxmoxでサーバーを立てているのですが、そのProxmoxにNextcloudのVMを立てて、Cloudflareでアクセスできるようにしました。そして、そのサーバーにCloud Identity経由でログインしましたので、その軌跡を残しておきます。

前提

前提条件は以下の通りです。

  • Nextcloudが構築されていて、Cloudflareで自分のドメインで公開されている(example.comとします)
  • Cloud Identityの設定が終わっている
  • NextcloudにSAMLオプションのインストールが終わっている

設定(Nextcloud)

  1. 一般設定

usernameをUIDにマップするようにします。

Screenshot 2025-02-20 at 10.59.29.png

  1. サービスプロバイダデータ

ここですね、基本的には一般的なSAMLの設定と一緒です。ただし、一箇所気をつけていただきたいところが、“URL Location of the IdP where the SP will send the SLO Request”ですね。ここを設定しないとログアウトボタンが表示されなくします。なので、ここにログアウトURLを設定する必要があります。僕は、ログインページに飛ぶようにしていますのでhttps://nextcloud.tba-lab.tech/index.php/apps/user_saml/saml/selectUserBackEnd?redirectUrl=に設定しました。

Screenshot 2025-02-20 at 11.01.06.png 

設定(Cloud Identity/Google Workspace)

  1. URL

URLはそれぞれACSはhttps://example.com/index.php/apps/user_saml/saml/acs、エントリーIDはhttps://example.com/index.php/apps/user_saml/saml/metadataに設定してください。

image.png

  1. マッピング

マッピングは次のように設定ください。また、ここに関しては適宜変更していただいたほうがいいと思います。

image.png

最後に

SAMLの設定は奥が深いですね!今後ともNextcloudとともに研究していきたいと思います。

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?