Конфигурация модуля Drupal shib_auth для Shibboleth SP в IIS - PullRequest
0 голосов
/ 20 января 2020

У меня проблема с аутентификацией shibboleth (модуль: shib_auth 8.x-1 .x-dev) в Drupal 8 и IIS (версия 8.5), после входа в IDP я перенаправляюсь в Drupal, но я не logged.
С расширением браузера SAML я вижу POST-вызов для https://example.com/SAML2/POST, этот вызов открывает страницу входа в drupal с отладочной информацией, где я нахожу имя пользователя и адрес электронной почты в переменных массива Server, но модуль В разделе не установлены переменные shib_auth.
Я проверяю /Shibboleth.sso/Session и нахожу правильно открытый сеанс с правильными атрибутами.

У меня нет ошибок в отчетах, пользователь присутствует в базе данных (таблица shib_authmap) и нового пользователя нет. Я думаю, что проблема в конфигурации модуля shib_auth, но я не могу найти ни одного файла журнала или ошибки на сайте drupal.

Это моя конфигурация:

Мой веб-файл IIS:

<rule name="Ignore Shibboleth" stopProcessing="true">        
<match  url="Shibboleth\.sso" />        
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />        
<action  type="None" />
</rule>

Мой shibboleth2. xml:

<Host scheme="https" name="mysite.com"  requireSession="true" authType="shibboleth">
<Path name="secure" authType="shibboleth" requireSession="true"/>
<Path name="shib_login" authType="shibboleth" requireSession="true" />
</Host>
...
<ApplicationDefaults entityID="mysite.com"
REMOTE_USER="eppn persistent-id targeted-id username email firstname lastname"
...
<Sessions lifetime="28800" timeout="3600" relayState="ss:mem"
checkAddress="false" handlerSSL="true" cookieProps="https"
 handlerURL="/Shibboleth.sso">
...
<SSO entityID="https://MYIDP.com">
SAML2 SAML1
 </SSO>
<SessionInitiator type="Chaining" Location="/Login" isDefault="true"
relayState="cookie" entityID="https://MYIDP.com">
<SessionInitiator type="SAML2" acsIndex="1" template="bindingTemplate.html"/>
</SessionInitiator>
<LogoutInitiator type="Chaining" Location="/Logout" relayState="cookie">
<LogoutInitiator type="SAML2" template="bindingTemplate.html"/>
<LogoutInitiator type="Local"/>
</LogoutInitiator>
...

Мой .htaccess для сайта drupal:

<Location / >
  AuthType shibboleth
  ShibRequireSession on
  ShibUseHeaders on
  require shibboleth
</Location>

Отладка информации shib_auth:

$_SERVER:
Array (
    [HTTP_REMOTEUSER] => value of REMOTEUSER
    [HTTP_USERNAME] => value of USERNAME
    [HTTP_LASTNAME] => value of LASTNAME
    [HTTP_FIRSTNAME] => value of FIRSTNAME
    [HTTP_EMAIL] => value of EMAIL
...
)

Конфигурация модуля:

Array
(
    [_core] => Array
        (
            [default_config_hash] => 
        )

    [debug_prefix_path] => /user/
    [enable_debug_mode] => 1
    [force_https_on_login] => 1
    [logout_error_message] => 

    [server_variable_email] => HTTP_EMAIL -> not valorized
    [server_variable_username] => HTTP_USERNAME -> not valorized

    [shibboleth_account_linking_text] => Link this account with another identity
    [shibboleth_login_handler_url] => /Shibboleth.sso/Login
    [shibboleth_login_link_text] => Shibboleth Login
    [shibboleth_logout_handler_url] => /Shibboleth.sso/Logout
    [url_redirect_login] => /
    [url_redirect_logout] => /
)

Большое спасибо за любые предложения или ответы

1 Ответ

0 голосов
/ 28 февраля 2020

Я решаю эту проблему, я устанавливаю модуль анонимного перенаправления и вставляю "/ shib_login" в Переопределения URL перенаправления.
Этот обходной путь позволяет Shibboleth вызывать страницу shib_login и устанавливать переменные shib_auth.

...