文書の表示以前のリビジョンバックリンク文書の先頭へ この文書は読取専用です。文書のソースを閲覧することは可能ですが、変更はできません。もし変更したい場合は管理者に連絡してください。 ====== ローカルでの SimpleSAML 2 . 0 ====== {{indexmenu_n>45}} [[:ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]] **Introduction** **概要** Once [[:en:documentation:pandorafms:technical_annexes:12_saml|SAML Single Sign-On]] is installed following the official documentation, you may use these steps to configure a local authentication. 公式ドキュメントに従って [[:ja:documentation:pandorafms:technical_annexes:12_saml|SAML シングルサインオン]] をインストールしたら、次の手順でローカル認証を設定できます。 <WRAP center round important 90%> **Important**: this local authentication is for testing purposes only, it is never recommended for use in production environments and it is recommended to revert [[#ks1|step 1]] and [[#ks1|step 2]] changes before moving to production. </WRAP> <WRAP center round important 90%> **重要**: このローカル認証はテスト目的のみであり、実稼働環境での使用は推奨されません。実稼働環境に移行する前に、[[#ks1|ステップ 1]] と [[#ks2|ステップ 2]] の変更を元に戻すことをお勧めします。 </WRAP> <wrap #ks1 /> ===== ステップ 1: exampleauth の有効化 ===== Open the following configuration file with the text editor of your choosing: 次の設定ファイルを、任意のテキストエディタで開きます。 <file> /opt/simplesamlphp/config/config.php </file> Find the block ''module.enable'', then ''exampleauth'', whose default value is ''false'' and change it to ''true''. ブロック ''module.enable'' を探し、次に ''exampleauth'' を見つけます。デフォルト値は ''false'' ですが、これを ''true'' に変更します。 {{ :wiki:45_simplesaml_2_local-image_010.png }} Save and exit. 保存して終了します。 <wrap #ks2 /> ===== ステップ 2: ローカル認証ソースの作成 ===== With the text editor of your choosing, open the file: 任意のテキストエディタで次のファイルを開きます。 <file> /opt/simplesamlphp/config/authsources.php </file> A block must be created for the new ''authentication source'', the easiest way is to create it just before the ''default-sp'': 新しい「認証ソース」用のブロックを作成する必要があります。最も簡単な方法は、''default-sp'' の直前に作成することです。 {{ :wiki:45_simplesaml_2_local-image_020.png }} With a block similar to the following: 次のようなブロックがあります。 <file | /opt/simplesamlphp/config/authsources.php> // Example local authentication source 'example-pandora' => [ 'exampleauth:UserPass', 'user:password' => [ 'uid' => ['user'], 'mail' => ['user@example.com'], 'givenName' => ['User One'], 'Group' => ['All'], 'Role' => ['admins'], ], 'user2:password2' => [ 'uid' => ['user2'], 'mail' => ['user2@example.com'], 'givenName' => ['User Two'], 'Group' => ['network'], 'Role' => ['operators'], ], ], </file> The result should be similar to: 結果は次のようになります。 {{ :wiki:45_simplesaml_2_local-image_030.png }} The <wrap :en>**auth source**</wrap> named ''example-pandora'' contains 2 users: ''example-pandora'' という名前の <wrap :ja>**認証ソース**</wrap> には 2 人のユーザが含まれています: * ''user'' with the password ''password'' and ''user2'' with the password ''password2''. * Each user has a number of attributes such as ''uid'', ''mail'', ''givenName'', ''Group'' and ''Role''. * These attributes are defined in the array so you can change or add more attributes in order to perform further authentication tests. * ''user'' にはパスワード ''password'' が、''user2'' にはパスワード ''password2'' が設定されます。 * 各ユーザには、''uid''、''mail''、''givenName''、''Group''、''Role'' などのいくつかの属性があります。 * これらの属性は配列内で定義されているため、さらに認証テストを実行するために属性を変更したり追加したりすることができます。 <wrap #ks3 /> ===== ステップ 3: ローカル認証の確認 ===== It is accessed through the URL ''<nowiki>https://pandora.local/simplesamlphp/admin/</nowiki>'' (you must change ''pandora.local'' for the URL of the PFMS Web Console). URL ''<nowiki>https://pandora.local/simplesamlphp/admin/</nowiki>'' からアクセスします (PFMS Web コンソールの URL については ''pandora.local'' を変更する必要があります)。 <WRAP center round important 90%> It must be accessed with HTTPS, as HTTP will fail authentication. </WRAP> <WRAP center round important 90%> HTTP では認証に失敗するため、HTTPS でアクセスする必要があります。 </WRAP> Enter the credentials for the ''admin'' user previously configured in SAML. 前もって SAML で設定した ''admin'' ユーザの認証情報を入力します。 Click on the ''test'' tab which will display the new //authentication source// (''example-pandora''): ''test'' タブをクリックすると、新しい //認証ソース// (''example-pandora'') が表示されます。 {{ :wiki:45_simplesaml_2_local-image_040.png }} Click on ''example-pandora'' and it will ask for username and password, check with one of those defined in [[#ks2|step 2]] (shown for ''user''): ''example-pandora'' をクリックすると、ユーザ名とパスワードの入力を求められます。[[#ks2|ステップ 2]] で定義したもののいずれかを確認してください (''user'' に表示)。 {{ :wiki:45_simplesaml_2_local-image_050.png }} Observe in <wrap :en>**Your attributes**</wrap> and compare with all the defined attributes, with this you can check that authentication using SAML works correctly and you can [[:en:documentation:pandorafms:technical_annexes:12_saml#ks2|configure in Pandora FMS]]. <wrap :en>**Your attribute**</wrap> を確認し、定義されているすべての属性と比較します。これにより、SAML を使用した認証が正しく機能していることを確認でき、[[:ja:documentation:pandorafms:technical_annexes:12_saml#ks2|Pandora FMS で設定]] できます。 <WRAP center round important 90%> **Important**: this local authentication is for testing purposes only, it is never recommended for use in production environments and it is recommended to revert [[#ks1|step 1]] and [[#ks2|step 2]] changes before moving to production. </WRAP> <WRAP center round important 90%> **重要**: このローカル認証はテスト目的のみであり、実稼働環境での使用は推奨されません。実稼働環境に移行する前に、[[#ks1|ステップ 1]] と [[#ks2|ステップ 2]] の変更を元に戻すことをお勧めします。 </WRAP> [[:ja:documentation:start|Pandora FMS ドキュメント一覧に戻る]] CKG Edit ja/documentation/pandorafms/technical_annexes/45_simplesaml_2_local.txt 最終更新: 2025/02/20 03:18by junichi