AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / server / 问题

问题[shibboleth](server)

Martin Hope
jonathan
Asked: 2020-04-21 00:07:32 +0800 CST

代理后面的 docker 容器中的 shibboleth SP 问题

  • 0

我正在尝试在代理后面的 docker 容器中设置 shibboleth。

目前我可以被重定向到 shibboleth idp 页面,我可以在其中输入我的登录详细信息,shibboleth 将对我进行身份验证。当它尝试重定向回时失败并出现 404:https ://my-service.org/Shibboleth.sso/SAML2/POST

我不知道这是 apache 问题还是 shibboleth 配置的问题。

有一个运行 apache 和 docker 的服务器。这里的 apache 将流量代理到在同一台服务器上运行的 docker 容器。我有 dns 将域名指向代理。让我们称之为“my-service.org”。my-service.org 的 apache 代理配置如下:

<IfModule mod_ssl.c>
    <VirtualHost *:80>
        ServerName my-service.org
        ServerAdmin [email protected]
        DocumentRoot /var/www/html/my-service

        Redirect permanent / https://my-service.org/

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined
    </VirtualHost>
    <VirtualHost _default_:443>
        ServerName my-service.org
        ServerAdmin [email protected]
        DocumentRoot /var/www/html/my-service

        ErrorLog ${APACHE_LOG_DIR}/docker-dev/my-service.log
        CustomLog ${APACHE_LOG_DIR}/docker-dev/my-service_ssl_access.log combined

        SSLEngine on
        SSLCertificateFile  /etc/ssl/certs/blah.crt
        SSLCertificateKeyFile  /etc/ssl/private/blah.key
        SSLCipherSuite EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:ECDHE-RSA-AES128-SHA:DHE-RSA-AES128-GCM-SHA256:AES256+EDH:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-RSA-AES128-SHA256:ECDHE-RSA-AES256-SHA:DHE-RSA-AES256-SHA256:DHE-RSA-AES128-SHA256:DHE-RSA-AES256-SHA:DHE-RSA-AES128-SHA:ECDHE-RSA-DES-CBC3-SHA:EDH-RSA-DES-CBC3-SHA:AES256-GCM-SHA384:AES128-GCM-SHA256:AES256-SHA256:AES128-SHA256:AES256-SHA:AES128-SHA:DES-CBC3-SHA:HIGH:!aNULL:!eNULL:!EXPORT:!DES:!MD5:!PSK:!RC4
        SSLProtocol All -SSLv2 -SSLv3
        SSLCompression off
        SSLHonorCipherOrder on

        ProxyPreserveHost On
        RequestHeader set X-Forwarded-Proto expr=%{REQUEST_SCHEME}
        RequestHeader set X-Forwarded-SSL expr=%{HTTPS}
        ProxyPass / http://127.0.0.1:8088/
        ProxyPassReverse / http://127.0.0.1:8088/       
    </VirtualHost>
</IfModule>

'my-service' 容器基于 'php:7-apache-buster' 容器并使用 shibd 运行 apache。它是 docker-compose 堆栈的一部分。容器的 apache 配置为:

<VirtualHost *:80>
  ServerAdmin [email protected]
  DocumentRoot /var/www/html/my-service

  <Directory /var/www/html/my-service/>
      Options Indexes FollowSymLinks MultiViews
      AllowOverride All
      Order deny,allow
      Allow from all
  </Directory>

  <Location "/shibboleth_login.php">
    AuthType shibboleth
    ShibRequestSetting requireSession 1
    ShibUseHeaders On
    require valid-user
  </Location>

  ErrorLog ${APACHE_LOG_DIR}/error.log
  CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

就像我说的那样,一切都在正常工作,直到从 shibboleth idp 重定向回 SP,它的位置为 404。日志并没有告诉我太多,但是当我加载容器 apache 配置时出现错误日志:

AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 172.17.0.6. Set the 'ServerName' directive globally to suppress this message

我不确定这是否会对这种情况产生影响。

我认为可能会产生影响的一件事是我设置了 shibboleth 来处理 SSL:

<Sessions lifetime="28800" timeout="3600" relayState="ss:mem"
                  checkAddress="false" handlerSSL="true" cookieProps="https">

但是我的容器 apache 配置只定义了一个 HTTP 虚拟主机块。如您所见,代理通过X-Forwarded-ProtoandX-Forwarded-SSL标头将协议传递给容器。我需要那些用于“我的服务”的 php 应用程序,但不确定它们是否对 shibboleth 有影响。与 idp 的初始交互工作正常,只是重定向不起作用。

php apache2 docker docker-compose shibboleth
  • 1 个回答
  • 307 Views
Martin Hope
CoolMonster
Asked: 2017-03-05 22:27:41 +0800 CST

CentOS 服务器中的 Shibboleth SPNEGOAuthnConfiguration

  • 0

我的要求是用户已经加入使用来自 ldap 服务器的相同凭据登录的域,他们不想再次输入它来登录 shibboleth SSO,所以我搜索了 Shibboleth 文档,它已经支持基于 SPNEGO登录。

我必须回答以下问题:

  1. 在 Cent OS 下运行的 shibboleth 服务器是否支持此协议?
  2. 如果它支持 Cent OS,我可以知道我们必须如何以及是否必须配置它与 Active Directory 通信?
  3. 如果它只支持windows环境,我可以知道它只在windows服务器必须加入同一个域时才有效吗?

当前服务器环境

Centos 7 Shibboleth 3.3

SAML 和 CAS(我们同时使用这两种协议)

centos active-directory kerberos spnego shibboleth
  • 1 个回答
  • 653 Views
Martin Hope
bishop
Asked: 2016-07-19 10:45:37 +0800 CST

跳过未映射的 SAML 2.0 属性,即使 name 和 nameFormat 匹配

  • 1

SP 运行 Shibboleth 2.5.6。对于一个特定的 IdP,我有以下属性映射:

<Attribute name="role"
    nameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified"
    id="role" />
<Attribute name="urn:mace:dir:attribute-def:givenName"
    nameFormat="urn:mace:shibboleth:1.0:attributeNamespace:uri"
    id="givenName" />

我收到一封电报,其中包含:

<AttributeStatement>
    <Attribute Name="role" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified">
        <AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">Educator</AttributeValue>
    </Attribute>
    <Attribute Name="urn:mace:dir:attribute-def:givenName" NameFormat="urn:mace:shibboleth:1.0:attributeNamespace:uri">
        <AttributeValue xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">intraguest</AttributeValue>
    </Attribute>
</AttributeStatement>

哪些日志:

Shibboleth.AttributeExtractor.XML : creating mapping for Attribute role, Format/Namespace:urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified
Shibboleth.AttributeExtractor.XML : creating mapping for Attribute urn:mace:dir:attribute-def:givenName
...
DEBUG Shibboleth.AttributeDecoder.String [1]: decoding SimpleAttribute (role) from SAML 2 Attribute (role) with 1 value(s)
INFO Shibboleth.AttributeExtractor.XML [1]: skipping unmapped SAML 2.0 Attribute with Name: urn:mace:dir:attribute-def:givenName, Format:urn:mace:shibboleth:1.0:attributeNamespace:uri

为什么被givenName跳过,当它name和nameFormat匹配?

我注意到Format/Namespace“创建映射”日志行中缺少注释givenName,但我认为这是因为给定的nameFormat匹配默认值。


更新:

IdP 是 PingFederate 源,其元数据声明为 SAML 2。以下是元数据的相关摘录:

<md:EntityDescriptor xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata" ID="..." entityID="...">
    <md:IDPSSODescriptor protocolSupportEnumeration="urn:oasis:names:tc:SAML:2.0:protocol">
        <saml:Attribute xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" Name="urn:mace:dir:attribute-def:givenName" NameFormat="urn:mace:shibboleth:1.0:attributeNamespace:uri"/>
        <saml:Attribute xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion" Name="role" NameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:unspecified"/>
    </md:IDPSSODescriptor>
</md:EntityDescriptor>
saml shibboleth
  • 1 个回答
  • 4403 Views
Martin Hope
Panu Haaramo
Asked: 2016-04-21 06:16:55 +0800 CST

斯堪的纳维亚字符在 Shibboleth SP 标题属性中变得混乱

  • 0

我在 Windows 服务器 2008 R2 上的 Domino 9.0.1 服务器前面有 Shibboleth SP 2.5 和 Apache 2.4。

这是来自 Shibboleth SP 调试日志的传入 SAML 消息的开头:

<?xml version="1.0" encoding="UTF-8" standalone="no"?>

这是来自同一日志的属性值:

<saml:AttributeValue>Mäkelä Test</saml:AttributeValue>

属性作为 HTTP 头传递给 Domino。在 Domino 形式中,我确实@GetHTTPHeader("cn")获得了该属性值,我得到了

M├ñkel├ñ测试

在 Shibboleth SP 配置中,我没有在任何地方设置字符集,我相信它应该始终是 UTF-8。

我的 Apache 代理配置如下所示:

ServerName my.test.fi:8443
UseCanonicalName On
ProxyPass / http://my.test.fi/

我试过这些:

ProxyHTMLMeta On
RequestHeader unset Accept-Encoding
AddDefaultCharset utf-8
CharsetSourceEnc  UTF-8
CharsetDefault    UTF-8

在 domino 网站文档中,我将“使用 UTF-8 输出”设置为“是”,并将表单字符集设置为 UTF-8。Domino 响应标头包括:

Content-Type:text/html; charset=UTF-8

对我来说,当从 Shibbolet SP/Apache 到达 Domino 时,角色似乎已经搞砸了。任何想法如何解决这一问题?

ibm-domino apache-2.4 shibboleth
  • 1 个回答
  • 514 Views

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    新安装后 postgres 的默认超级用户用户名/密码是什么?

    • 5 个回答
  • Marko Smith

    SFTP 使用什么端口?

    • 6 个回答
  • Marko Smith

    命令行列出 Windows Active Directory 组中的用户?

    • 9 个回答
  • Marko Smith

    什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同?

    • 3 个回答
  • Marko Smith

    如何确定bash变量是否为空?

    • 15 个回答
  • Martin Hope
    Tom Feiner 如何按大小对 du -h 输出进行排序 2009-02-26 05:42:42 +0800 CST
  • Martin Hope
    Noah Goodrich 什么是 Pem 文件,它与其他 OpenSSL 生成的密钥文件格式有何不同? 2009-05-19 18:24:42 +0800 CST
  • Martin Hope
    Brent 如何确定bash变量是否为空? 2009-05-13 09:54:48 +0800 CST
  • Martin Hope
    cletus 您如何找到在 Windows 中打开文件的进程? 2009-05-01 16:47:16 +0800 CST

热门标签

linux nginx windows networking ubuntu domain-name-system amazon-web-services active-directory apache-2.4 ssh

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve