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
    • 最新
    • 标签
主页 / user-104153

OrangeGrover's questions

Martin Hope
OrangeGrover
Asked: 2015-06-24 10:36:50 +0800 CST

AD FS - 将 AD 属性发送到 Shibboleth SP

  • 4

我设置了一个 AD FS 声明提供程序,并且一个 Shibboleth SP 成功地对其进行了身份验证。当我登录到受 Shibboleth 保护的站点时,索引会显示所有标题。我按预期收到了 UPN,但我无法获取要发送的其他属性,例如 surname 或 sAMAccountName。

我目前有 3 条索赔规则: 索赔规则

规则1:

规则 2:

规则 3:

从 Shibboleth SP 机器上的日志来看,sn 似乎没有作为 OID 属性发送。

如果我编辑 attribute-map.xml 并删除对 eppn 的引用,那么我会在 shibd 日志中得到以下内容:

2015-06-23 11:29:08 INFO Shibboleth.AttributeExtractor.XML [1]: skipping unmapped SAML 2.0 Attribute with Name: urn:oid:1.3.6.1.4.1.5923.1.1.1.6

在 shibd 日志中没有提到与上述输出类似的 surname 或 sn,这让我认为“转换 SN”规则没有正确写入。


更新信息:

sn通过将规则 1 从手动输入更改为选择下拉选项,我能够让姓氏起作用surname。我需要做什么才能让其他没有下拉菜单的 AD 字段选择工作?

我正在添加诸如streetAddress. 对于规则 1,我为 LDAP 属性和传出声明类型手动输入了 streetaddress。

然后我添加了一个附加规则:

c:[Type == "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/streetaddress"]
 => issue(Type = "urn:oid:2.5.4.232", Value = c.Value, Properties["http://schemas.xmlsoap.org/ws/2005/05/identity/claimproperties/attributename"] = "urn:oasis:names:tc:SAML:2.0:attrname-format:uri");

我不知道是否http://schemas.xmlsoap.org/ws/2005/05/identity/claims/streetaddress正确,但值不是映射。
如何让无法从下拉列表中选择的 LDAP 属性起作用?


编辑2:

我忘了添加选择查看规则语言的结果(按照下面的 Matthieu 的要求):

c:[Type == "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", Issuer == "AD AUTHORITY"]
 => issue(store = "Active Directory", types = ("http://schemas.xmlsoap.org/ws/2005/05/identity/claims/upn", "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname", "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname", "http://schemas.microsoft.com/ws/2008/06/identity/claims/windowsaccountname", "streetaddress"), query = ";userPrincipalName,sn,givenName,sAMAccountName,streetaddress;{0}", param = c.Value);

似乎它只是 get streetaddress,而所有其他值都有一个模式。由于没有架构,它不会匹配 Transform 规则,streetaddress因为 if 语句正在寻找http://schemas.xmlsoap.org/ws/2005/05/identity/claims/streetaddress. 对于未从下拉选择中选择的值,我应该怎么做?


我想到了:

我将转换规则更改为以下内容:

 c:[Type == "streetaddress"]
     => issue(Type = "urn:oid:2.5.4.232", Value = c.Value, Properties["http://schemas.xmlsoap.org/ws/2005/05/identity/claimproperties/attributename"] = "urn:oasis:names:tc:SAML:2.0:attrname-format:uri");

我没有寻找 Type == A 模式,而是输入街道地址。然后在 Shibboleth SP 中,我更改了 Attribute-map.xml 以添加以下内容:

<Attribute name="urn:oid:2.5.4.232" id="streetaddress"/>

上面的 OID 是任意的。

adfs
  • 1 个回答
  • 2071 Views
Martin Hope
OrangeGrover
Asked: 2015-06-19 15:25:17 +0800 CST

将 AD 属性作为 AD FS 声明发送到 Shibboleth SP 属性

  • 3

我设置了一个 AD FS 声明提供程序,并且一个 Shibboleth SP 成功地对其进行了身份验证。

我正在尝试将 Active Directory 属性发送到 SP。

我按照这篇文章尝试发送声明: https ://technet.microsoft.com/en-us/library/gg317734(v=ws.10).aspx

相关部分是Step 2: Configure AD FS 2.0 as the Identity Provider and Shibboleth as the Relying Party--> Configure AD FS 2.0--> Edit Claim Rules for Relying Party Trust--> To configure eduPerson claims for sending to a relying party trust:

在第 16 步中,它声明我应该粘贴或键入以下内容(并将其包含在 2 个代码块中):

c:[Type == "http://schemas.xmlsoap.org/claims/Group", Value == "Domain Users"]

和

=> issue(Type = "urn:oid:1.3.6.1.4.1.5923.1.1.1.9", Value = "member@contoso.com", Properties["http://schemas.xmlsoap.org/ws/2005/05/identity/claimproperties/attributename"] = "urn:oasis:names:tc:SAML:2.0:attrname-format:uri");

我相信这是一个单一的陈述(如果我错了,请纠正我)所以我的条目如下:

在此处输入图像描述

我正在使用 givenName 进行测试,所以我添加了以下内容: 在此处输入图像描述

在 Shibboleth SP 机器上,我attribute-map.xml通过添加以下内容进行了编辑,然后重新启动了 Shibboleth 服务:

<Attribute name="urn:mace:dir:attribute-def:GivenName" id="GivenName"/>

当我浏览该网站并使用 AD FS 重新进行身份验证时,我没有看到 givenName 显示。我有一个输出所有标题及其值的索引文件。


编辑:我的问题的解决方案


我让 UPN 作为 epPN 发送。上述规则(文章中的规则)有效,但我必须attribute-policy.xml在 Shibboleth SP 上编辑以禁用范围规则,因为我没有正确设置该部分。

我在attribute-policy.xml

afp:AttributeRule attributeID="eppn">
    <afp:PermitValueRuleReference ref="ScopingRules"/>
</afp:AttributeRule>
adfs
  • 1 个回答
  • 3516 Views
Martin Hope
OrangeGrover
Asked: 2015-02-12 16:06:13 +0800 CST

Shibboleth SP - 签名和加密密钥

  • 0

我在 Server 2012 R2 上安装了 Shibboleth SP。我尝试提交要导入 IDP 的元数据,并被告知如果没有签名或加密密钥,他们将无法向 SP 发送任何断言。

根据我的发现,Shibboleth SP 的密钥包含在默认安装中。我相信这是 C:\opt\shibboleth-sp\etc\shibboleth 文件夹中包含的 sp-cert.pem 和 sp-key.pem。

我也不确定如何在 Shibboleth2.xml 文件中引用它。这是我现在的 shibboleth2.xml:

<SPConfig xmlns="urn:mace:shibboleth:2.0:native:sp:config"
xmlns:conf="urn:mace:shibboleth:2.0:native:sp:config"
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"    
xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"
logger="syslog.logger" clockSkew="180">

<!-- The OutOfProcess section contains properties affecting the shibd daemon. -->
<OutOfProcess logger="shibd.logger">

</OutOfProcess>

<!-- The InProcess section conrains settings affecting web server modules/filters. -->
<InProcess logger="native.logger">
    <ISAPI normalizeRequest="true">

        <Site id="1" name="sp-example.com"/>
    </ISAPI>
</InProcess>


<!-- This set of components stores sessions and other persistent data in daemon memory. -->
<StorageService type="Memory" id="mem" cleanupInterval="900"/>
<SessionCache type="StorageService" StorageService="mem" cacheTimeout="3600" inprocTimeout="900" cleanupInterval="900"/>
<ReplayCache StorageService="mem"/>
<ArtifactMap artifactTTL="180"/>



<!-- To customize behavior, map hostnames and path components to applicationId and other settings. -->
<RequestMapper type="Native">
    <RequestMap applicationId="default">
        <Host name="sp-example.com" authType="shibboleth" requireSession="true"/>

    </RequestMap>
</RequestMapper>


<ApplicationDefaults id="default" policyId="default"
    entityID="urn:mace:university.edu:shibboleth:test:sp:university:administrative:cscn:sp-example.com"
    homeURL="https://sp-example.com"
    REMOTE_USER="eppn persistent-id targeted-id"
    signing="false" encryption="false"
    >


    <Sessions lifetime="28800" timeout="3600" checkAddress="false"
        handlerURL="/Shibboleth.sso" handlerSSL="true"
        exportLocation="http://sp-example.com/Shibboleth.sso/GetAssertion" exportACL="165.91.23.32"
        idpHistory="false" idpHistoryDays="7" cookieProps="https" >


        <SessionInitiator type="Chaining" Location="/Login" isDefault="true" id="Intranet"
                relayState="cookie" entityID="urn:mace:university.edu:shibboleth:test:idp:university:administrative:cscn:idp-test.university.edu">
            <SessionInitiator type="SAML2" defaultACSIndex="1" acsByIndex="false" template="bindingTemplate.html"/>
            <SessionInitiator type="Shib1" defaultACSIndex="5"/>
        </SessionInitiator>

        <md:AssertionConsumerService Location="/SAML2/POST" index="1"
            Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"/>
        <md:AssertionConsumerService Location="/SAML2/POST-SimpleSign" index="2"
            Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST-SimpleSign"/>
        <md:AssertionConsumerService Location="/SAML2/Artifact" index="3"
            Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"/>
        <md:AssertionConsumerService Location="/SAML2/ECP" index="4"
            Binding="urn:oasis:names:tc:SAML:2.0:bindings:PAOS"/>
        <md:AssertionConsumerService Location="/SAML/POST" index="5"
            Binding="urn:oasis:names:tc:SAML:1.0:profiles:browser-post"/>
        <md:AssertionConsumerService Location="/SAML/Artifact" index="6"
            Binding="urn:oasis:names:tc:SAML:1.0:profiles:artifact-01"/>

        <!-- LogoutInitiators enable SP-initiated local or global/single logout of sessions. -->
        <LogoutInitiator type="Chaining" Location="/Logout" relayState="cookie">
            <LogoutInitiator type="SAML2" template="bindingTemplate.html"/>
            <LogoutInitiator type="Local"/>
        </LogoutInitiator>

        <!-- md:SingleLogoutService locations handle single logout (SLO) protocol messages. -->
        <md:SingleLogoutService Location="/SLO/SOAP"
            Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"/>
        <md:SingleLogoutService Location="/SLO/Redirect" conf:template="bindingTemplate.html"
            Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"/>
        <md:SingleLogoutService Location="/SLO/POST" conf:template="bindingTemplate.html"
            Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"/>
        <md:SingleLogoutService Location="/SLO/Artifact" conf:template="bindingTemplate.html"
            Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"/>

        <!-- md:ManageNameIDService locations handle NameID management (NIM) protocol messages. -->
        <md:ManageNameIDService Location="/NIM/SOAP"
            Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"/>
        <md:ManageNameIDService Location="/NIM/Redirect" conf:template="bindingTemplate.html"
            Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect"/>
        <md:ManageNameIDService Location="/NIM/POST" conf:template="bindingTemplate.html"
            Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST"/>
        <md:ManageNameIDService Location="/NIM/Artifact" conf:template="bindingTemplate.html"
            Binding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Artifact"/>


        <md:ArtifactResolutionService Location="/Artifact/SOAP" index="1"
            Binding="urn:oasis:names:tc:SAML:2.0:bindings:SOAP"/>

        <!-- Extension service that generates "approximate" metadata based on SP configuration. -->
        <Handler type="MetadataGenerator" Location="/Metadata" signing="false"/>

        <!-- Status reporting service. -->
        <Handler type="Status" Location="/Status" acl="127.0.0.1"/>

        <!-- Session diagnostic service. -->
        <Handler type="Session" Location="/Session" showAttributeValues="false"/>

    </Sessions>


    <Errors session="sessionError.html"
        metadata="metadataError.html"
        access="accessError.html"
        ssl="sslError.html"
        localLogout="localLogout.html"
        globalLogout="globalLogout.html"
        supportContact="root@localhost"
        logoLocation="/shibboleth-sp/logo.jpg"
        styleSheet="/shibboleth-sp/main.css"/>


    <!-- Chains together all your metadata sources. -->
    <MetadataProvider type="Chaining">
        <!-- Example of remotely supplied batch of signed metadata. -->
        <MetadataProvider type="XML" uri="https://idp-test.university.edu/universityfed-test-metadata-signed.xml"
             backingFilePath="C:\opt\shibboleth-sp\etc\shibboleth\universityfed-test-metadata-signed.xml" reloadInterval="7200">
        </MetadataProvider>
    </MetadataProvider>

    <!-- Chain the two built-in trust engines together. -->
    <TrustEngine type="Chaining">
        <TrustEngine type="ExplicitKey"/>
        <TrustEngine type="PKIX"/>
    </TrustEngine>

    <!-- Map to extract attributes from SAML assertions. -->
    <AttributeExtractor type="XML" path="attribute-map.xml"/>

    <!-- Use a SAML query if no attributes are supplied during SSO. -->
    <AttributeResolver type="Query"/>

    <!-- Default filtering policy for recognized attributes, lets other data pass. -->
    <AttributeFilter type="XML" path="attribute-policy.xml"/>


</ApplicationDefaults>

<!-- Each policy defines a set of rules to use to secure messages. -->
<SecurityPolicies>
    <!-- The predefined policy enforces replay/freshness and permits signing and client TLS. -->
    <Policy id="default" validate="false">
        <Rule type="MessageFlow" checkReplay="true" expires="60"/>
        <Rule type="ClientCertAuth" errorFatal="true"/>
        <Rule type="XMLSigning" errorFatal="true"/>
        <Rule type="SimpleSigning" errorFatal="true"/>
    </Policy>
</SecurityPolicies>

根据我收到的一封电子邮件,我需要包括<md:KeyDescriptor use="encryption">和<md:KeyDescriptor use="signing">

根据我在网上找到的,它应该类似于:

<md:SPSSODescriptor>
<md:KeyDescriptor>
    <ds:KeyInfo xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
        <ds:X509Data>
            <ds:X509Certificate>
                hash found in sp-cert.pem file
            </ds:X509Certificate>
        </ds:X509Data>
    </ds:KeyInfo>
</md:KeyDescriptor>

我不知道我应该把它放在 Shibboleth.xml 文件的什么地方。

任何人都可以帮助我走上正轨吗?我已经阅读了来自不同机构的大量文档和指南,但没有找到任何方向。

encryption
  • 1 个回答
  • 2169 Views
Martin Hope
OrangeGrover
Asked: 2015-01-29 16:15:59 +0800 CST

到 Tomcat 的 IIS 7.5 JK 连接器

  • 1

我有许多 Tomcat 服务器使用较旧的 32 位版本的 isapi_redirect.dll 工作,我将默认应用程序池设置为启用 32 位应用程序。在客户端的服务器上,他们需要在同一应用程序池下安装另一个 ISAPI,该应用程序池不适用于 32 位。

我正在尝试将 isapi_redirect.dll 更新为 64 位。我tomcat-connectors-1.2.40-windows-x86_64-iis.zip从这里下载了。我禁用了对默认应用程序池的 32 位支持并浏览到 localhost。我看到的只是 IIS 7 默认欢迎页面,而不是出现错误。如果我从它的文件夹中删除 isapi_redirect.dll,我不会收到错误消息。我认为这意味着 IIS 甚至没有尝试找到 .dll。

我是否需要启用或更改其他内容以允许 Tomcat 使用 64 位 isapi 过滤器?

我遵循与此类似的设置,除了我有一个 isapi_redirect.properties 文件而不是注册表项并且文件夹不同。这适用于我的 32 位 isapi 过滤器。我确实尝试了使用 64 isapi 过滤器的注册表方式,但也没有运气。

iis
  • 1 个回答
  • 855 Views
Martin Hope
OrangeGrover
Asked: 2014-12-09 15:08:18 +0800 CST

ADFS 2.0 和 Shibboleth SP 2.5.3 - 无法定位元数据

  • 3

我正在尝试使用 Shibboleth SP(Windows Server 2008 R2 上的 64 位)对 ADFS 2.0(64 位 Windows Server 2008 R2)进行身份验证。当我浏览到受 Shibboleth 保护的站点时,我在 Shibboleth native_warn 日志中收到 500 错误并显示以下内容:

2014-12-08 14:44:28 ERROR Shibboleth.Listener [2648] isapi_shib: remoted message returned an error: Unable to locate metadata for identity provider (https://adfs.int.example.com/adfs/ls/)
2014-12-08 14:44:28 ERROR Shibboleth.ISAPI [2648] isapi_shib: Unable to locate metadata for identity provider (https://adfs.int.example.com/adfs/ls/)
2014-12-08 14:44:30 ERROR Shibboleth.Listener [2648] isapi_shib: remoted message returned an error: Unable to locate metadata for identity provider (https://adfs.int.example.com/adfs/ls/)
2014-12-08 14:44:30 ERROR Shibboleth.ISAPI [2648] isapi_shib: Unable to locate metadata for identity provider (https://adfs.int.example/adfs/ls/)

在本机日志中,它显示元数据已加载:

2014-12-08 14:44:23 INFO OpenSAML.MetadataProvider.XML : loaded XML resource (https://adfs.int.example.com/FederationMetadata/2007-06/FederationMetadata.xml)

这是我的整个 Shibboleth2.xml 文件:

<SPConfig xmlns="urn:mace:shibboleth:2.0:native:sp:config"
xmlns:conf="urn:mace:shibboleth:2.0:native:sp:config"
xmlns:saml="urn:oasis:names:tc:SAML:2.0:assertion"
xmlns:samlp="urn:oasis:names:tc:SAML:2.0:protocol"    
xmlns:md="urn:oasis:names:tc:SAML:2.0:metadata"
clockSkew="180">

<!--
The InProcess section contains settings affecting web server modules.
Required for IIS, but can be removed when using other web servers.
-->
<InProcess logger="native.logger">
    <ISAPI normalizeRequest="true" safeHeaderNames="true">
        <!--
        Maps IIS Instance ID values to the host scheme/name/port. The name is
        required so that the proper <Host> in the request map above is found without
        having to cover every possible DNS/IP combination the user might enter.
        -->
        <Site id="1" name="iris-shib.int.example.com" scheme="https" port="443"/>
        <!--
        When the port and scheme are omitted, the HTTP request's port and scheme are used.
        If these are wrong because of virtualization, they can be explicitly set here to
        ensure proper redirect generation.
        -->
        <!--
        <Site id="42" name="virtual.example.org" scheme="https" port="443"/>
        -->
    </ISAPI>
</InProcess>

<!--
By default, in-memory StorageService, ReplayCache, ArtifactMap, and SessionCache
are used. See example-shibboleth2.xml for samples of explicitly configuring them.
-->

<!--
To customize behavior for specific resources on IIS, and to link vhosts or
resources to ApplicationOverride settings below, use the XML syntax below.
See https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPRequestMapHowTo for help.

Apache users should rely on web server options/commands in most cases, and can remove the
RequestMapper element. See https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPApacheConfig
-->
<RequestMapper type="Native">
    <RequestMap>
        <!--
        The example requires a session for documents in /secure on the containing host with http and
        https on the default ports. Note that the name and port in the <Host> elements MUST match
        Apache's ServerName and Port directives or the IIS Site name in the <ISAPI> element above.
        -->

        <Host name="iris-shib.int.example.com" authType="shibboleth" requireSession="true"/>

    </RequestMap>
</RequestMapper>

<!--
The ApplicationDefaults element is where most of Shibboleth's SAML bits are defined.
Resource requests are mapped by the RequestMapper to an applicationId that
points into to this section (or to the defaults here).
-->
<ApplicationDefaults entityID="https://iris-shib.int.example.com/shibboleth"
                     REMOTE_USER="eppn persistent-id targeted-id">

    <!--
    Controls session lifetimes, address checks, cookie handling, and the protocol handlers.
    You MUST supply an effectively unique handlerURL value for each of your applications.
    The value defaults to /Shibboleth.sso, and should be a relative path, with the SP computing
    a relative value based on the virtual host. Using handlerSSL="true", the default, will force
    the protocol to be https. You should also set cookieProps to "https" for SSL-only sites.
    Note that while we default checkAddress to "false", this has a negative impact on the
    security of your site. Stealing sessions via cookie theft is much easier with this disabled.
    -->
    <Sessions lifetime="28800" timeout="3600" relayState="ss:mem"
              checkAddress="false" handlerSSL="true" cookieProps="https">

        <!--
        Configures SSO for a default IdP. To allow for >1 IdP, remove
        entityID property and adjust discoveryURL to point to discovery service.
        (Set discoveryProtocol to "WAYF" for legacy Shibboleth WAYF support.)
        You can also override entityID on /Login query string, or in RequestMap/htaccess.
        -->
        <SSO entityID="https://adfs.int.example.com/adfs/ls/"
             discoveryProtocol="SAMLDS" discoveryURL="https://ds.example.org/DS/WAYF">
          SAML2 SAML1
        </SSO>

        <!-- SAML and local-only logout. -->
        <Logout>SAML2 Local</Logout>

        <!-- Extension service that generates "approximate" metadata based on SP configuration. -->
        <Handler type="MetadataGenerator" Location="/Metadata" signing="false"/>

        <!-- Status reporting service. -->
        <Handler type="Status" Location="/Status" acl="127.0.0.1 ::1"/>

        <!-- Session diagnostic service. -->
        <Handler type="Session" Location="/Session" showAttributeValues="false"/>

        <!-- JSON feed of discovery information. -->
        <Handler type="DiscoveryFeed" Location="/DiscoFeed"/>
    </Sessions>

    <!--
    Allows overriding of error template information/filenames. You can
    also add attributes with values that can be plugged into the templates.
    -->
    <Errors supportContact="root@localhost"
        helpLocation="/about.html"
        styleSheet="/shibboleth-sp/main.css"/>

    <!-- Example of remotely supplied batch of signed metadata. -->
    <!--
    <MetadataProvider type="XML" uri="http://federation.org/federation-metadata.xml"
          backingFilePath="federation-metadata.xml" reloadInterval="7200">
        <MetadataFilter type="RequireValidUntil" maxValidityInterval="2419200"/>
        <MetadataFilter type="Signature" certificate="fedsigner.pem"/>
    </MetadataProvider>
    -->

    <!-- Example of locally maintained metadata. -->

    <!--<MetadataProvider type="XML" file="FederationMetadata.xml"/>-->

    <MetadataProvider 
        type="XML"
        uri="https://adfs.int.example.com/FederationMetadata/2007-06/FederationMetadata.xml"
        backingFilePath="federation-metadata.xml"
        reloadInterval="7200"
    />

    <!-- Map to extract attributes from SAML assertions. -->
    <AttributeExtractor type="XML" validate="true" reloadChanges="false" path="attribute-map.xml"/>

    <!-- Use a SAML query if no attributes are supplied during SSO. -->
    <AttributeResolver type="Query" subjectMatch="true"/>

    <!-- Default filtering policy for recognized attributes, lets other data pass. -->
    <AttributeFilter type="XML" validate="true" path="attribute-policy.xml"/>

    <!-- Simple file-based resolver for using a single keypair. -->
    <CredentialResolver type="File" key="sp-key.pem" certificate="sp-cert.pem"/>

    <!--
    The default settings can be overridden by creating ApplicationOverride elements (see
    the https://wiki.shibboleth.net/confluence/display/SHIB2/NativeSPApplicationOverride topic).
    Resource requests are mapped by web server commands, or the RequestMapper, to an
    applicationId setting.

    Example of a second application (for a second vhost) that has a different entityID.
    Resources on the vhost would map to an applicationId of "admin":
    -->
    <!--
    <ApplicationOverride id="admin" entityID="https://admin.example.org/shibboleth"/>
    -->
</ApplicationDefaults>

<!-- Policies that determine how to process and authenticate runtime messages. -->
<SecurityPolicyProvider type="XML" validate="true" path="security-policy.xml"/>

<!-- Low-level configuration about protocols and bindings available for use. -->
<ProtocolProvider type="XML" validate="true" reloadChanges="false" path="protocols.xml"/>

我尝试加载本地元数据文件,结果相同。我还注释掉了这两种类型的元数据行,并且在 native_warn 日志中收到以下错误,因此似乎元数据实际上正在加载:

2014-12-08 14:57:31 ERROR Shibboleth.Listener [2648] isapi_shib: remoted message returned an error: No MetadataProvider available.
2014-12-08 14:57:31 ERROR Shibboleth.ISAPI [2648] isapi_shib: No MetadataProvider available.

此时,我不确定 ADFS 2.0 提供的元数据是否存在问题。我不能在这里全部粘贴(由于字符限制)。我应该检查某个部分吗?

adfs
  • 1 个回答
  • 4447 Views
Martin Hope
OrangeGrover
Asked: 2014-11-19 14:57:55 +0800 CST

在 Server 2008 R2 上安装 AD FS 2.0

  • 1

我正在尝试在 64 位 Server 2008 R2 上安装 AD FS 2.0。
我从MS 下载中心下载了它,它指出 Server 2008 R2 是受支持的操作系统之一。

当我运行下载的可执行文件时,我收到一条错误消息:

此 AD FS 2.0 安装需要 Windows Server 2008 SP2 操作系统。

我找到了一个关于在 Server 2008 和 2008 R2 上安装的要求的MS 页面。以下是我已经安装或已经安装的一些要求:

  • Windows Identity Foundation (WIF):从MS 下载中心安装
  • IIS 7:安装了 7.5,因为它是 Server 2008 R2 机器。
  • Windows 修补程序 (KB981002):我点击了可以从此处下载修补程序的链接,但我收到更新不适用于我的计算机的消息。
  • .NET Framework 3.5 Service Pack 1:我安装了 .Net 3.5.1 和 4.5.1。

在 AD FS 可执行文件运行之前,我还需要安装其他东西吗?

任何线索表示赞赏。

windows-server-2008-r2
  • 1 个回答
  • 2273 Views
Martin Hope
OrangeGrover
Asked: 2014-08-20 09:08:02 +0800 CST

LAMP 服务器 HTTP-> .htaccess 中的 HTTPS 重定向

  • 0

我有 2 台具有相同版本 Apache 的 LAMP 服务器,它们都运行 Wordpress。SSL 在两台服务器上都有效(尽管测试服务器使用不同域的证书)。

在这两个上,我都有以下 .htaccess 文件(/var/www/html/.htaccess):

# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>


# END WordPress

测试服务器正确重定向到 HTTPS,但生产服务器根本不尝试重定向。我可以通过 HTTPS 手动浏览生产站点。

.htaccess 文件的权限为 755,由两台服务器上的 apache:apache 拥有。

为了确保测试站点上的重定向是由于 .htaccess 文件,我通过删除以下内容对其进行了更改:

RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

测试站点上的重定向停止,直到我将其添加回来。

是否有一些可能已经在测试站点上完成而需要在生产环境中完成的事情?

apache-2.2
  • 1 个回答
  • 970 Views
Martin Hope
OrangeGrover
Asked: 2012-11-15 12:13:19 +0800 CST

Server 2008 服务无法连接到可执行文件

  • 0

我有一项用于将 MS Word 文档转换为 PDF 的服务。该服务在某些系统上运行良好,但在其他系统上却没有响应。

该服务启动一个可执行文件(已通过任务管理器验证它正在运行)。
然后,当我尝试使用该软件转换文档时,它失败了。

我注意到的一件事是,当我尝试停止服务时没有错误,但可执行文件仍在运行(而在系统正在运行时,可执行文件也会停止)。

然后,当我尝试重新启动服务时,我收到一条失败消息 ------

“错误 1053:服务未及时响应启动或控制请求”。

当我在任务管理器中终止可执行文件然后启动服务时,可执行文件已启动并且似乎再次正常运行。

我以机器的本地管理员身份运行此服务。除了 Program Files,我还尝试将它安装在不同的文件夹中,但我仍然会遇到同样的问题。

有没有人有过这样的问题?

windows-server-2008
  • 1 个回答
  • 150 Views
Martin Hope
OrangeGrover
Asked: 2012-08-10 16:05:19 +0800 CST

Shibboleth、IIS 7.5、Tomcat

  • 4

我正在尝试在 Server 2008 R2/IIS 7.5 计算机上设置 Shibboleth SP。

IIS 在浏览到本地主机时抛出以下错误:

HTTP Error 500.0 - Internal Server Error
Calling LoadLibraryEx on ISAPI filter "C:\opt\shibboleth-sp\lib64\shibboleth\isapi_shib.dll" failed

我假设这是因为 IIS 没有访问该 dll 文件的权限,但我不确定如何修复它。我去了 C:\opt 文件夹并为 shibboleth-sp 文件夹的 IIS_USRS 组添加了权限,但仍然没有用。是否有其他用户因为使用 IIS 6 兼容模式而必须授予其权限?

除了文件夹权限之外,还有什么我应该根据此错误检查的吗?

iis
  • 1 个回答
  • 1926 Views
Martin Hope
OrangeGrover
Asked: 2012-08-04 08:22:19 +0800 CST

Java Tomcat SQL 2005 连接失败

  • 1

在调试这个问题时,我的处境有点奇怪。我正在与一个由第 3 方管理其服务器的客户合作,该第 3 方不允许为了测试而进行任何更改,而是需要任何更改的正式文档以及我们进行更改的理由或否则更改请求会被拒绝...因此我必须尝试在无法更改和测试任何内容的情况下得出结论性的答案。

因此,你们对这个问题的任何信息/推测都是有用的。

我正在使用 Java Tomcat 尝试连接到 64 位 MSSQL 2005 服务器,但没有成功。此日志文件是否表明确实没有找到驱动程序,或者是否意味着找到了驱动程序,但连接未被接受?他们还有其他解释此错误消息的方法吗?我被告知这些连接配置设置适用于其他服务器设置,但由于某种原因我不断收到以下错误。

我不确定它是否有所作为,但 Tomcat 服务器是 32 位的。是否有不同的驱动程序能够连接到 64 位而不是 32 位 MSSQL 2005?

 Login session = 5E3673D5B92737D27B9710CE28E37D66
    No suitable driver found for jdbc:sqlserver://serverName:1433;DatabaseName=DbName;user=DbUser;password=Password
    java.lang.Exception: No suitable driver found for jdbc:sqlserver://serverName:1433;DatabaseName=DbName;user=DbUser;password=Password
        at com.medical.ConnectionPool.getConnection(Unknown Source)
        at org.apache.jsp.Login_jsp._jspService(Login_jsp.java:135)
        at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:374)
        at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
        at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at com.medical.Utilities_Charset_Filter.doFilter(Unknown Source)
        at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
        at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
        at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
        at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
        at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
        at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
        at org.apache.jk.server.JkCoyoteHandler.invoke(JkCoyoteHandler.java:190)
        at org.apache.jk.common.HandlerRequest.invoke(HandlerRequest.java:283)
        at org.apache.jk.common.ChannelSocket.invoke(ChannelSocket.java:767)
        at org.apache.jk.common.ChannelSocket.processConnection(ChannelSocket.java:697)
        at org.apache.jk.common.ChannelSocket$SocketConnection.runIt(ChannelSocket.java:889)
        at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:690)
        at java.lang.Thread.run(Thread.java:619)
sql-server
  • 1 个回答
  • 180 Views
Martin Hope
OrangeGrover
Asked: 2012-07-26 08:36:11 +0800 CST

Tomcat-如何检查当前使用的内存设置

  • 7

我已经使用 Server 2008 和 IIS 7 设置了一个 Tomcat 服务器。
如何判断是否实际使用了 JAVA_OPTS 环境变量?

我之前听说我必须编辑 service.bat 文件才能使用 JAVA_OPTS 环境变量,但我怎么知道它是否成功?

我一直没能找到是否有办法在日志或其他更定量的东西中查看它。我能想到的尝试测试它的唯一方法是编辑变量并尝试判断性能是否存在差异。我将 JAVA_OPTS 设置为以下内容:

-server -Xmx1k -Xms1k-Xmn1k -Xss128k -XX:+UseParallelGC -XX:ParallelGCThreads=20 -XX:PermSize=1k -XX:MaxPermSize=1k  

此外,我发现文档说要更改 service.bat 中的以下行:

"%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.io.tmpdir=%CATALINA_BASE%\temp;-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager;-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties" --JvmMs 128 --JvmMx 256

至:

"%EXECUTABLE%" //US//%SERVICE_NAME% ++JvmOptions "-Djava.io.tmpdir=%CATALINA_BASE%\temp;-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager;-Djava.util.logging.config.file=%CATALINA_BASE%\conf\logging.properties" %JAVA_OPTS%

运行命令时我没有收到任何错误

service install ServiceName

到目前为止,在我使用更改的内存设置重新安装服务之前,一切似乎都像往常一样快速运行,这让我认为 JAVA_OPTS 没有影响任何东西。

抱歉,如果这是一个广泛的问题,但关于后端实际发生的事情,我还没有找到好的线索。有人可以阐明这一点吗?

tomcat
  • 2 个回答
  • 48722 Views
Martin Hope
OrangeGrover
Asked: 2012-07-23 16:34:34 +0800 CST

IIS 7.5 和 Tomcat 设置:错误 500.19

  • 2

我正在设置一个 64 位 IIS 7.5 / Tomcat 7.0.26 服务器,当我导航到http://localhost-

错误摘要

HTTP Error 500.19 - Internal Server Error
The requested page cannot be accessed because the related configuration data for the page is invalid.

详细错误信息

Module  IIS Web Core
Notification    BeginRequest
Handler Not yet determined
Error Code  0x80070021
Config Error    This configuration section cannot be used at this path. This happens when the section is locked at a parent level. Locking is either by default (overrideModeDefault="Deny"), or set explicitly by a location tag with overrideMode="Deny" or the legacy allowOverride="false".
Config File \\?\C:\Folder\apache-tomcat-7.0.29\jk\web.config
Requested URL   http://localhost:80/jakarta/isapi_redirect.dll
Physical Path   C:\Folder\apache-tomcat-7.0.29\jk\isapi_redirect.dll
Logon Method    Not yet determined
Logon User  Not yet determined

配置源 (第 4 行以红色突出显示)

3:     <system.webServer>
4:         <handlers accessPolicy="Read, Execute, Script" />
5:     </system.webServer>

我猜测问题是 web.config 文件(在 Config source error 中提到)写错了。有人可以证实这一点吗?我一直无法找到一个样本 web.config 文件来关闭。

我从另一台正在工作的服务器复制了整个 jk 文件夹(包括 isapi_redirect.dll、isapi_redirect.properties、uriworkermap.properties、web.config 和 workers.properties),但是该服务器的配置与原来不同设置以不同的方式运行 Tomcat。

tomcat
  • 1 个回答
  • 3276 Views
Martin Hope
OrangeGrover
Asked: 2012-07-07 14:57:16 +0800 CST

sSMTP 无法使用外部邮件服务器 SMTP 发送邮件

  • 3

我试图通过让它给我发电子邮件来完成我的 Nagios 安装。它使用 /bin/mail 给我发电子邮件,所以它总是被发送到我的垃圾邮件文件夹。我安装了 sSMTP 来尝试向我工作的电子邮件服务器发送请求,以便能够从经过身份验证的用户发送消息。

这是我的 /etc/ssmtp/ssmtp.conf 文件:

mailhub=10.200.120.148:25
UseTLS=NO
AuthUser= nagios@domain.com
AuthPass=PASSWORD

到目前为止,我一直在使用以下命令,它仍然会作为 root@localhost 到达我的电子邮件收件箱,这导致它进入我的垃圾邮件文件夹(我拥有的一个电子邮件提供商除外)。

cat message |ssmtp me@myemail.com

网上看了几个例子,好像都跟我差不多。有人看到我犯的任何错误吗?

澄清一下,nagios@domain.com 是我工作使用的邮件服务器上的一个用户。

ssmtp centos6.2
  • 2 个回答
  • 12339 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