我对Shibboleth比较陌生,但似乎无法解决将REMOTE_USER传达给我的应用程序的问题。
我的堆栈是shibd 2.5.3和Apache 2.4.18通过unix套接字馈入Gunicorn服务器。
我在我的shibboleth2.xml有以下内容:
<ApplicationDefaults entityID="https://server.uchicago.edu/shibboleth" REMOTE_USER="uid mail eppn">
和我的Apacheconfiguration:
<Location /minimum> AuthType Shibboleth Require shibboleth ShibRequestSetting requireSession false </Location> ... ### Shibboleth Auth Test App ### <Directory /var/www/testing/shib_test_app/minimum_srv/> require valid-user <Files wsgi.py> Require all granted </Files> </Directory> ProxyPass /minimum/ unix:/var/www/testing/shib_test_app/run/minimum.socket|http://server.uchicago.edu/minimum/
在transaction.log成功login会产生以下结果:
2017-11-13 11:07:09 INFO Shibboleth-TRANSACTION [1724]: New session (ID: _c7733778bc32d918c86af6ed3032b4d8) with (applicationId: default) for principal from (IdP: urn:mace:incommon:uchicago.edu) at (ClientAddress: 128.135.219.225) with (NameIdentifier: AAdzZWNyZXQxyKNPOa4xNc3jfe3SU1ECnug95BZZklugt27zSuUOLFPnF/G8zlPSTB9M5bAIXSN2WZoR9DB5mxo6w0wii7KQWJQLHtYSQM/H5dyLa+B9MOLq6ZqB7x7z9b6fjvjPpMVCxsjKhr7C7OglCHw2gqk=) using (Protocol: urn:oasis:names:tc:SAML:2.0:protocol) from (AssertionID: _2b139b94d61993652304709bb6a7a1e3) 2017-11-13 11:07:09 INFO Shibboleth-TRANSACTION [1724]: Cached the following attributes with session (ID: _c7733778bc32d918c86af6ed3032b4d8) for (applicationId: default) { 2017-11-13 11:07:09 INFO Shibboleth-TRANSACTION [1724]: entitlement (5 values) 2017-11-13 11:07:09 INFO Shibboleth-TRANSACTION [1724]: ucDepartment (1 values) 2017-11-13 11:07:09 INFO Shibboleth-TRANSACTION [1724]: mail (1 values) 2017-11-13 11:07:09 INFO Shibboleth-TRANSACTION [1724]: unscoped-affiliation (1 values) 2017-11-13 11:07:09 INFO Shibboleth-TRANSACTION [1724]: displayName (1 values) 2017-11-13 11:07:09 INFO Shibboleth-TRANSACTION [1724]: givenName (1 values) 2017-11-13 11:07:09 INFO Shibboleth-TRANSACTION [1724]: ucisMemberOf (57 values) 2017-11-13 11:07:09 INFO Shibboleth-TRANSACTION [1724]: cn (1 values) 2017-11-13 11:07:09 INFO Shibboleth-TRANSACTION [1724]: uid (1 values) 2017-11-13 11:07:09 INFO Shibboleth-TRANSACTION [1724]: affiliation (2 values) 2017-11-13 11:07:09 INFO Shibboleth-TRANSACTION [1724]: persistent-id (1 values) 2017-11-13 11:07:09 INFO Shibboleth-TRANSACTION [1724]: nickname (1 values) 2017-11-13 11:07:09 INFO Shibboleth-TRANSACTION [1724]: eppn (1 values) 2017-11-13 11:07:09 INFO Shibboleth-TRANSACTION [1724]: sn (1 values) 2017-11-13 11:07:09 INFO Shibboleth-TRANSACTION [1724]: }
而我进入我的/Shibboleth.sso/Session / Session截图
好像SP正在给我返回属性,而在shibboleth2.xml我已经configuration了我希望将uid作为REMOTE_USER的主要用户,但是在Apache环境variables中将其设置为null(至less据我所知,它没有出现在Django的request.META )。 如果我将Apacheconfiguration为ShibUseHeaders On ,可能值得知道一切工作都很好,但我宁愿不启用它。
任何帮助的地方断开连接可能是?