SAML SP 시작 웹 싱글 사인온(SSO) 사용
기본적으로, WebSphere® Application Server SAML TAI(Trust Association Interceptor)는 IdP 시작 SSO를 지원합니다. 사용자 정의 코드가 제 위치에 있으면 SP 시작 SSO를 지원하도록 SAML TAI를 구성할 수 있습니다.
시작하기 전에
이 태스크는 시스템이 SAML 웹 SSO 기능을 사용하도록 했다고 가정합니다. 아직 이를 완료하지 않았으면 시스템이 SAML 웹 싱글 사인온(SSO) 기능을 사용하도록 함을 참조하십시오.
이 태스크 정보
이 태스크는 예제 클래스 및 SP-시작 SSO를 구성하는 단계를 제공합니다.
프로시저
- com.ibm.wsspi.security.web.saml.AuthnRequestProvider
인터페이스를 구현하는 SAML 인증 요청 제공자를 개발하십시오. getAuthnRequest(HttpServletRequest req, String errorMsg, String acsUrl, ArrayList<String> ssoUrls) 메소드는 다음 키의 4개 항목이 포함된 맵을 리턴해야 합니다.
- AuthnRequestProvider.SSO_URL
- SAML ID 제공자의 싱글 사인온 URL입니다.
- AuthnRequestProvider.RELAY_STATE
- SAML 웹 브라우저 싱글 사인온 프로파일에서 정의하는 relayState입니다.
- AuthnRequestProvider.REQUEST_ID
- 이 키의 값은 AuthnRequest 메시지에서 ID 속성의 값과 일치해야 합니다.
- AuthnRequestProvider.AUTHN_REQUEST
- 스펙에 정의된 Base64 인코딩된 AuthnRequest 메시지입니다. 사용자 코드는 AuthnRequest 메시지의 생성을 담당합니다.
public HashMap <String, String> getAuthnRequest(HttpServletRequest req, String errorMsg, String acsUrl, ArrayList<String> ssoUrls) throws NotImplementedException { //create map with following keys HashMap <String, String> map = new HashMap <String, String>(); String ssoUrl = "https://example.com/saml20/Login"; map.put(AuthnRequestProvider.SSO_URL, ssoUrl); String relayState = generateRandom(); map.put(AuthnRequestProvider.RELAY_STATE, relayState); String requestId = generateRandom(); map.put(AuthnRequestProvider.REQUEST_ID, requestId); //create AuthnRequest String authnMessage = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>" +"<samlp:AuthnRequest xmlns:samlp=\"urn:oasis:names:tc:SAML:2.0:protocol\" " +"ID=\""+requestID+"\" Version=\"2.0\" " + "IssueInstant=\"" +getUTC()+ "\" ForceAuthn=\"false\" IsPassive=\"false\"" + "ProtocolBinding=\"urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST\" " + "AssertionConsumerServiceURL=\"" +acs+"\" " + "Destination=\"" +destination +"\"> " + "<saml:Issuer xmlns:saml=\"urn:oasis:names:tc:SAML:2.0:assertion\">" + issuer +"</saml:Issuer> <samlp:NameIDPolicy" +"Format=\"urn:oasis:names:tc:SAML:2.0:nameid-format:transient\"" +"SPNameQualifier=\"mysp\"" +"AllowCreate=\"true\" /> <samlp:RequestedAuthnContext Comparison=\"exact\"> " +"<saml:AuthnContextClassRef xmlns:saml=\"urn:oasis:names:tc:SAML:2.0:assertion\">" +"urn:oasis:names:tc:SAML:2.0:ac:classes:</samlp:RequestedAuthnContext> </samlp:AuthnRequest>"; map.put(AuthnRequestProvider.AUTHN_REQUEST, authnMessage); return map; }
- (WAS_HOME)/lib/ext 디렉토리에 사용자 정의 클래스가 포함된 jar 파일을 두십시오.
- AuthnRequest 메시지를 사용하도록 SAML 웹 SSO TAI를 구성하십시오.
- WebSphere Application Server 관리 콘솔에 로그온하십시오.
- 보안 > 글로벌 보안을 클릭하십시오.
- 웹 및 SIP 보안을 펼치고 신뢰 연관을 클릭하십시오.
- 인터셉터를 클릭하십시오.
- com.ibm.ws.security.web.saml.ACSTrustAssociationInterceptor를 클릭하십시오.
- 사용자 정의 특성의 경우에는 새로 작성을
클릭한 후에 다음의 사용자 정의 특성 정보를 완료하십시오. 여기서 id는
이 특성이 적용될 SSO 서비스 제공자(SP)에 지정한 것입니다.
- 이름: sso_<id>.sp.login.error.page
- 값: 사용자 정의 AuthnRequestProvider 구현의 클래스 이름.


http://www14.software.ibm.com/webapp/wsbroker/redirect?version=cord&product=was-nd-mp&topic=tsec_enable_saml_sp_sso
파일 이름:tsec_enable_saml_sp_sso.html