2012-11-16 1 views
3

간단한 구성으로 무엇이 높고 낮은지 검색했습니다.CAS 및 Shibboleth 통합 SAML의 특성으로 사용자 이름 (Username)을 공개했습니다.

나는 CAS를 조금이라도 사용해 왔지만, Shibboleth에 완전히 익숙하지 않다. Shibboleth가 인증을 위해 CAS로 리다이렉트하도록 (가이드 번호 : https://wiki.jasig.org/display/CASUM/Shibboleth-CAS+Integration) 설정했습니다. 이것은 정상적으로 작동하고 일단 사용자가 인증되면 Shibboleth를 통해 리다이렉트되며 SAML 응답이 발송됩니다. https://sp.testshib.org을 사용하여 테스트 중이며 응답을 제대로 수신하고 페이지를 표시하고 있습니다.

내가 알아낼 수없는 것은 CAS에 로그인하는 데 사용되는 사용자 이름으로 간단한 속성을 해제하는 방법입니다. 나는 Shibboleth가 idp-process.log에서 본 것을 안다.하지만 이것을 풀어 내기 위해 resolver.xml과 attribute-filter.xml에 무엇을 넣어야 할지를 알 수 없다.

현재 SAML 응답은 다음과 같습니다

<?xml version="1.0" encoding="UTF-8"?><saml2:Assertion xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" ID="_da56752846e00c2693ece2c486d7c870" IssueInstant="2012-11-16T14:08:07.570Z" Version="2.0"> 
    <saml2:Issuer Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity">https://<idpurl>/idp/shibboleth</saml2:Issuer> 
    <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> 
     <ds:SignedInfo> 
     <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> 
     <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> 
     <ds:Reference URI="#_da56752846e00c2693ece2c486d7c870"> 
      <ds:Transforms> 
       <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/> 
       <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> 
      </ds:Transforms> 
      <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> 
      <ds:DigestValue>7OHKEiEQ0ZcPDcnt4B8PIGoLEfw=</ds:DigestValue> 
     </ds:Reference> 
     </ds:SignedInfo> 
     <ds:SignatureValue>S3FZI+KpNf8wUYWMA96ccAj0Y5ebojB1xKHlixHWNEr4voqHOGSpBzxdui0IVtUwLEzj4RrDFdYarJaZj6ltzFV4hfNx5bN88zYQG6w9BBP9UybG+81Wrhii2O31AmRz2Y6XIqa72CeN2R4DKo70awn6FXIPLAcEKs+7dAG2lQ87VS3Wv126DghE/eGcMLW6+z9a3MxXtUFSmWYosaIbNREJn4mGO/uGzD27eeo6SNmvBx/BgVh7T2cOIbtD8b9OOZT8Urt0kZ2nsoCZHgp1T0V6ZgnE2TDvPTInrxzC5c4S+YOYZlB0ijMI6pk+PpJGshe7MVUcEO34Nn0I3i0OUw==</ds:SignatureValue> 
     <ds:KeyInfo> 
     <ds:X509Data> 
      <ds:X509Certificate><!--Valid Certificate--></ds:X509Certificate> 
     </ds:X509Data> 
     </ds:KeyInfo> 
    </ds:Signature> 
    <saml2:Subject> 
     <saml2:NameID Format="urn:oasis:names:tc:SAML:2.0:nameid-format:transient" NameQualifier="https://<idpurl>/idp/shibboleth" SPNameQualifier="https://sp.testshib.org/shibboleth-sp">_4b1a2780b2ce3db36ea7e7f6192b7108</saml2:NameID> 
     <saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"> 
     <saml2:SubjectConfirmationData Address="<valid ip address>" InResponseTo="_aa4e23dd783eddb1be18ad224c26e7cf" NotOnOrAfter="2012-11-16T14:13:07.570Z" Recipient="https://sp.testshib.org/Shibboleth.sso/SAML2/POST"/> 
     </saml2:SubjectConfirmation> 
    </saml2:Subject> 
    <saml2:Conditions NotBefore="2012-11-16T14:08:07.570Z" NotOnOrAfter="2012-11-16T14:13:07.570Z"> 
     <saml2:AudienceRestriction> 
     <saml2:Audience>https://sp.testshib.org/shibboleth-sp</saml2:Audience> 
     </saml2:AudienceRestriction> 
    </saml2:Conditions> 
    <saml2:AuthnStatement AuthnInstant="2012-11-16T14:08:07.554Z" SessionIndex="00568a153d3cccf9c17abf2c77a043ed8b74a74fe5e2c61000590269aa87f99a"> 
     <saml2:SubjectLocality Address="<valid ip address>"/> 
     <saml2:AuthnContext> 
     <saml2:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml2:AuthnContextClassRef> 
     </saml2:AuthnContext> 
    </saml2:AuthnStatement> 
</saml2:Assertion> 

난 그냥이 설정 얻는 방법의 예를해야합니다. 나는 wiki.shibboleth.net에 대한 모든 문서를 읽었으며 아직도 얻을 수없는 것 같습니다.

사전에 도움을 주셔서 감사합니다. 설정하는 것만 알지만 내 머리가 바보 같아서 TestShib보다 강렬한 것을 통합하려고 시도조차하지 못했습니다!

편집 : 부분적으로 도움이되는이 설정 가이드를 찾았습니다. 활성 디렉토리를 검색하여 이름을 속성으로 전달할 수 있었지만 CAS가 확인할 수 있기 때문에 적절한 장기 해결책은 아닙니다. 둘 이상의 사용자 리포지토리가 있어야하며, 반드시이를 확인하는 것과 동일한 것은 아닙니다. $ {requestContext.principalName}을 속성으로 릴리스하기 만하면됩니다.

더 좋은 아이디어가 있습니까? 어쩌면 정적 커넥터,하지만 $ {requestContext.principalName} 해결하는 방법을 모르겠어요?

+0

NameID 태그 또는 속성에서 사용자 이름을 해제 하시겠습니까? – performanceuser

+0

속성으로,이 IDP 시스템에서 결국 서비스해야 할 SP가 여러 개 있으며, 각각에 대한 응답 형식이 아직 없습니다 (아직 단계 연구 중이므로 이것이 우리가 할 경로인지 확인해야 함). go) SAML 2를 허용하는 경우0이면 속성이 아마도 가장 쉽게 수용 할 수 있습니다. – CDerrig

답변

4

결국 나는 그것을 알아낼 수있었습니다. 이 문제를 해결하기 위해 여기에 올 솔루션을 게시하고 단순해야하는 세부 정보를 놓치지 마십시오.

<AttributeFilterPolicy id="releaseBasicAttributesToAnyone"> 
     <PolicyRequirementRule xsi:type="basic:ANY"/> 
     <AttributeRule attributeID="principal"> 
       <PermitValueRule xsi:type="basic:ANY" /> 
     </AttributeRule> 
    </AttributeFilterPolicy> 
: 나는 다음과 같은 필터를 추가하는 데 필요한 속성 - filter.xml에서

<resolver:AttributeDefinition id="principal" xsi:type="PrincipalName" xmlns="urn:mace:shibboleth:2.0:resolver:ad"> 

    <resolver:AttributeEncoder 
     xsi:type="SAML1String" 
     xmlns="urn:mace:shibboleth:2.0:attribute:encoder" 
     name="urn:mace:dir:attribute-def:principal" /> 

    <resolver:AttributeEncoder 
     xsi:type="SAML2String" 
     xmlns="urn:mace:shibboleth:2.0:attribute:encoder" 
     name="urn:oid:1.3.6.1.4.1.5923.1.1.1.1" 
     friendlyName="principal" /> 

</resolver:AttributeDefinition> 

: 표어에 대한 속성-resolver.xml 파일에서

, 나는 다음과 같은 해결을 추가했다

모든 SP에 주체를 공개하지 않으려는 경우 정책 요구 사항 규칙을 변경하십시오.

이 간단한 내용이 어디에서나 명확하게 문서화되지 않은 것 같습니다. 이 방법보다 길게 shibboleth 문서를 살펴본 결과 누군가가 PrincipalName 값을 변경하려는 Google 그룹 게시물에 단서를 찾았습니다.

다른 사람에게 도움이되기를 바랍니다.

+0

감사합니다. – drox

+0

@CDerrig, 어떻게 attribute-resolver.xml에 데이터 커넥터가없는 프린시 펄 이름을 얻을 수 있습니까? –

관련 문제