バックスラッシュ(\)部分は、$CFG->datarootの場所であり。
恐らく設定時にdirnameを使用していると思われるため、(Windowsである事から)
ディレクトリ間の区切り文字がバックスラッシュとなっていると思われます。
文字を変更して動作を確認したいですが、明示的に変更する場合はどのモジュール
に設定(もしくは、文字置換)を実施すればよいでしょうか?
以上、よろしくお願い致します。
下記テスト環境で「auth/saml2/README.mdの118行目からのTestShib設定に関する説明」をもとに非標準プラグイン「SAML2 Single sign on」の動作を確認させて頂きましたが、リダイレクトループなしに問題なく認証できるようです。
Apache 2.4.25
PHP 5.6.30
MariaDB 10.1.24
[auth/saml2/README.mdの118行目からのTestShib設定に関する説明]
--------------------------------------------------------------------------------------
To configure this against testshib you will need a moodle which is publicly
accessible over the internet. Turn on the SAML2 plugin and then configure it:
Home ► Site administration ► Plugins ► Authentication ► SAML2
1. Set the Idp URL to: https://www.testshib.org/metadata/testshib-providers.xml
2. Set dual auth to Yes
3. Set auto create users to Yes
4. Click on 'Download SP Metadata'
5. Save the settings
6. Upload that file to: https://www.testshib.org/register.html
7. Logout and login, you should see 'TestShib Test IdP' as an alternate login method
and be able to login via the example credentials.
--------------------------------------------------------------------------------------
可能でしたら、「管理 > サイト管理 > プラグイン > 認証 > 認証管理」の「SAML2」欄右側にあります「テスト設定」をクリックして「Test using isPassive」および「Test isAuthenticated and login」を使って認証テストして頂けませんでしょうか。
以下、私のテスト環境で「Test using isPassive」および「Test isAuthenticated and login」をクリックした結果です。
----------------------------------------------------
Authed!
array(10) {
["uid"]=>
array(1) {
[0]=>
string(8) "alterego"
}
["eduPersonAffiliation"]=>
array(1) {
[0]=>
string(6) "Member"
}
["eduPersonPrincipalName"]=>
array(1) {
[0]=>
string(21) "alterego@testshib.org"
}
["sn"]=>
array(1) {
[0]=>
string(3) "Ego"
}
["eduPersonScopedAffiliation"]=>
array(1) {
[0]=>
string(19) "Member@testshib.org"
}
["givenName"]=>
array(1) {
[0]=>
string(5) "Alter"
}
["eduPersonEntitlement"]=>
array(1) {
[0]=>
string(41) "urn:mace:dir:entitlement:common-lib-terms"
}
["cn"]=>
array(1) {
[0]=>
string(9) "Alter Ego"
}
["eduPersonTargetedID"]=>
array(1) {
[0]=>
string(28) "873riJMi1Q3eqEp11vwkD+qTpA0="
}
["telephoneNumber"]=>
array(1) {
[0]=>
string(8) "555-5555"
}
}
返信ありがとうございます。
IdPはOktaを使用しており、若干設定が異なっています。
(TestShibへは名前引きではアクセスできませんでした)
> 可能でしたら、「管理 > サイト管理 > プラグイン > 認証 > 認証管理」の「SAML2」欄右側にあります「テスト設定」をクリックして「Test using isPassive」および「Test isAuthenticated and login」を使って認証テストして頂けませんでしょうか。
> 4. Click on 'Download SP Metadata'
以下のリンクをクリックすると「ERR_INVALID_RESPONSE」を返してしまいます。
(IdP(Okta)側では、SP側のメタデータ要求がないため飛ばしています)
「README.md」に従って設定を実施し、「Test using isPassive」を実行したところ。
下記ダイアログが表示されてしまいます。
また、Moodleの外に設置しているsimlpeSAMLphpのIdPメタデータを設定してから「Test using isPassive」
を実行したところ下記テキストが出力されています。
Authed!
array(5) {
["FirstName"]=>
array(1) {
[0]=>
string(8) "Tadanori"
}
["LastName"]=>
array(1) {
[0]=>
string(6) "Takami"
}
["gid"]=>
array(1) {
[0]=>
string(10) "$$$$$$$$$$$"
}
["Login"]=>
array(1) {
[0]=>
string(22) "$$
$$$$$$$$$@xxxx.xx.xx"}
["mail"]=>
array(1) {
[0]=>
string(24) "Tadanori.Takami@xxxx.xx.xx"
}
}
以上、よろしくお願い致します。
詳細な情報を頂きまして、ありがとうございます。
あくまでも私の推測ですが、今回の問題はMoodleおよび非標準プラグイン「SAML2 Single sign on」を起因とするものではなく、Oktaの設定が影響しているような気がします。
下記オンラインドキュメントを参考にSAML2 Single sign on「テスト設定」ページの「Test using isPassive」をクリックしてもエラーが表示されないよう試行錯誤されてはいかがでしょうか。
[Configuring SSO with OKTA - ORACLE]
http://docs.oracle.com/cloud/latest/marketingcs_gs/OMCAA/Help/SingleSignOn/Tasks/ConfiguringSSOWithOKTA.htm#Step
[Acquiring the IDP.XML metadata file for a SAML Template App - akta Help Center]
https://support.okta.com/help/Documentation/Knowledge_Article/23445146-Acquiring-the-IDPXML-metadata-file-for-a-SAML-Template-App
[Setting up a SAML application in Okta - Okta Developer]
https://developer.okta.com/standards/SAML/setting_up_a_saml_application_in_okta
多忙の所、調査・ご返答ありがとうございます。
[Setting up a SAML application in Okta - Okta Developer]を参考にOkta側の設定を修正し、
「Test using isPassive」のクリックにて下記テキストが出力されるようになりました。
Authed!
array(5) {
["FirstName"]=>
array(1) {
[0]=>
string(8) "Tadanori"
}
["LastName"]=>
array(1) {
[0]=>
string(6) "Takami"
}
["gid"]=>
array(1) {
[0]=>
string(10) "$$$"
}
["Login"]=>
array(1) {
[0]=>
string(22) "$$$@xxxx.xx.xx"
}
["Email"]=>
array(1) {
[0]=>
string(24) "Tadanori.Takami@xxxx.xx.xx"
}
}
この状態で改めてログインを実施致しましたが、残念ながら状況が改善されませんでした。
(auth.php/saml_loginメソッドにてホームへリダイレクト後、saml_loginメソッドで設定したユーザ情報が消えてしまいます)
本来登録されるべきMoodleSession自体は、上記saml_loginメソッドの開始時点で有効となっていましたので、
おそらくsimpleSAMLphpモジュール使用時に異なるセッションへつなげたように思います。
PHP.ini、ならびに、saml2プラグインのconfig.phpなどのセッションに関する定義を調べつつ、調査を続けようと思います。
また、何かしらの変化がある場合にご報告致します。
ありがとうございました。