프런트엔드 인증 체계 설정
프런트엔드 인증 체계는 양식 자격 증명 수집기(FCC)인 selectlogin.fcc를 사용하여 보호된 리소스에 대한 액세스를 요청하는 데 사용되는 로그인 선택 화면을 생성합니다. FCC는 에이전트에 대한 FCC 지시문을 동적으로 구성하므로 에이전트가 인증 체계 선택 항목에 적절하게 사용자를 리디렉션할 수 있습니다.
casso12kr
프런트엔드 인증 체계는 양식 자격 증명 수집기(FCC)인 selectlogin.fcc를 사용하여 보호된 리소스에 대한 액세스를 요청하는 데 사용되는 로그인 선택 화면을 생성합니다. FCC는 에이전트에 대한 FCC 지시문을 동적으로 구성하므로 에이전트가 인증 체계 선택 항목에 적절하게 사용자를 리디렉션할 수 있습니다.
참고
selectlogin.fcc는 자격 증명 선택기가 사용하는 샘플입니다. 인증 선택 항목 및 HTML 서식 집합은 특성 상황에 따라 달라집니다.2
FCC(양식 자격 증명 수집기) 사용
FCC 형식은 웹 에이전트가 자격 증명을 수집하여 정책 서버로 전달하는 데 사용하는 고유한 형식입니다. FCC는 헤더와 본문으로 구성됩니다.
FCC 헤더 설명
FCC 헤더는 각 줄에 하나씩 있는 FCC 지시문의 목록입니다. FCC 지시문의 구문은 다음과 같습니다.
@<directive>[=<value>]
값에는 %
parameter
% 형식으로 지정되는 % 대체 항목이 포함될 수 있습니다. 매개 변수는 자격 증명이 제출될 때 POST 작업에서 FCC 파일과 함께 전달됩니다.FCC 지시문의 집합은 제한됩니다. 이 예에서 가장 중요한 지시문은 다음과 같습니다.
- @target웹 에이전트가 정책 서버에 전달해야 하는 리소스 URL입니다.
- @username웹 에이전트가 정책 서버에 전달해야 하는 사용자 이름입니다.
- @password웹 에이전트가 정책 서버에 전달해야 하는 암호입니다.
- @smagentname웹 에이전트가 정책 서버에 전달해야 하는 에이전트 이름입니다. 에이전트 구성에서 EncryptAgentName 매개 변수가 yes로 설정된 경우 이 이름은 암호화됩니다.
모든 FCC 지시문이 헤더에 나열되어야 하는 것은 아닙니다. 많은 지시문에는 다음과 같이 암시적 기본값이 있습니다.
- @target=%target%
- @username=%user%
- @password=%password%
- @smagentname=%smagentname%
FCC 본문 설명
FCC 본문에는 HTML이나 그 밖에 웹 브라우저가 읽을 수 있는 형식이 포함됩니다. FCC 본문은 사용자가 자격 증명을 제공할 때 웹 브라우저에 표시됩니다.
본문에는 $$parameter$$ 형식의 대체 항목이 포함될 수 있습니다. 매개 변수 이름은 GET 작업에서 FCC 파일과 함께 전달되는 알려진 매개 변수 집합에 속해 있어야 합니다.
이 예에서 중요한 지시문은 다음과 같습니다.
- $$target$$사용자가 요청한 리소스 URL입니다.
- $$smagentname$$에이전트 이름입니다. 에이전트 구성에서 EncryptAgentName 매개 변수가 yes로 설정된 경우 이 이름은 암호화됩니다.
프런트엔드 인증을 위한 selectlogin.fcc 파일 구성
웹 에이전트를 설치한 경우 selectlogin.fcc 파일이 샘플 FCC로 포함되어 있습니다. 프런트엔드 인증 체계는 selectlogin.fcc 파일을 사용하여 사용자가 보호된 리소스를 요청할 때 나타나는 로그인 대화 상자를 표시합니다.
사용자가 리소스를 요청하면 웹 에이전트는 요청된 URL을 정책 서버에 전달합니다. 대부분의 경우 웹 에이전트가 전달하는 리소스 URL은 사용자가 요청한 리소스 URL과 동일합니다. 인증 체계에 대해 정의된 FCC 파일은 $$target$$(GET 매개 변수)을 %target%(POST 매개 변수)으로 전달하고 @target=%target% 지시문을 사용하여 요청된 URL이 전달될 수 있도록 합니다. 예를 들면 다음과 같습니다.
<!-- some HTML code --> <formname="Login" method="POST"> <!-- some HTML code --> <inputtype="hidden" name="target" value="$$target$$"> <!-- more HTML code --> </form> <!-- more HTML code -->
참고:
@target=%target% 지시문은 기본적으로 사용됩니다.이 경우 %target% 매개 변수의 값을 다음 값으로 바꾸면 selectlogin.fcc 파일이 작동합니다.
/path/redirect.ext?authtype=type&target=$$target$$
- redirect.exttarget 매개 변수에 제공된 URL로 리디렉션되는 간단한 스크립트입니다. 예를 들어 redirect.asp 또는 redirect.jsp와 같은 값을 사용합니다. 또는 리디렉션 스크립트의 URL이 제공된 자격 증명에 의존하는 한 동일한 실제 파일을 노출하는 다른 가상 디렉터리나 다른 리디렉션 스크립트 파일을 사용할 수 있습니다.
- type사용자가 선택하는 자격 증명에 의해 결정되는 문자열입니다.다른 인증 체계가 다른 리디렉션 URL을 보호하는 경우 선택한 인증 체계는 FCC가 수집하는 자격 증명을 처리합니다. 선택한 인증 체계는 사용자 인증 수준을 포함한 사용자 세션을 구성합니다. 리디렉션 스크립트 리소스에 대해 인증되고 권한이 부여된 사용자는 원래 요청한 리소스로 리디렉션됩니다.
참고:
싱글 사인온이 적용되고 사용자 보호 수준이 프런트엔드 인증 체계의 보호 수준보다 높거나 같은 경우 원래 리소스에 대해 사용자 세션의 유효성이 검사됩니다. 사용자에게 권한이 부여되는지 여부는 정책 구성에 따라 달라지며, 사용자의 인증 컨텍스트가 검사될 수 있습니다. 예를 들어 특정 리소스에 액세스하는 데 최소 보호 수준이나 특정 조건이 필요할 수 있습니다.Selectlogin.fcc 구성 상세 정보
selectlogin.fcc 파일에서 다양한 인증 체계를 구성할 수 있습니다. 다음 목록은 일부 체계에 대한 구성 상세 정보를 보여 줍니다.
- 인증서 및 양식 체계에는 SSL 연결을 통한 포스트가 필요합니다. 프런트엔드 인증 체계가 SSL 연결을 사용하지 않는 경우 에이전트가 GET 요청이 획득한 것과 동일한 selectlogin.fcc URL에 포스트할 수 없습니다.다음 JavaScript 코드를 사용하여 URL을 SSL URL로 변환할 수 있습니다.arr = document.URL.split("://"); document.Login.action = "https://" + arr[1];
- SafeWord 2 단계 인증을 지원하려면 클라이언트 쪽에서 최초 챌린지 양식에서 수집된 사용자 이름을 두 번째 챌린지 때 기억해야 합니다. 에이전트 설치에도 포함되어 있는 safeword.fcc 파일은 @smtransient FCC 지시문을 사용하여 사용자 이름을 임시 쿠키에 보관합니다. 동일한 지시문을 selectlogin.fcc 파일에서 사용할 수도 있지만, 그러면 사용자가 다른 자격 증명을 선택할 경우에도 쿠키가 생성됩니다. 따라서 이 경우에는 다음과 같이 safeword.fcc 파일에 포스트하도록 action 인수를 수정하는 것이 좋습니다.document.Login.action = "safeword.fcc";
- Windows 인증 체계는 FCC 파일을 사용하지 않습니다. Windows 인증 체계의 경우 웹 서버에는 없지만 에이전트가 인식하는 특정 의사 리소스(pseudo-resource) URL을 사용합니다. Windows 인증이 작동하도록 하려면 다음과 같이action인수를 동일한 의사 리소스(pseudo-resource) URL로 설정하십시오.document.Login.action = "/siteminderagent/ntlm/creds.ntc";
- SecurID 인증 체계는 FCC를 사용하지 않지만 에이전트가 SecurID 자격 증명을 selectlogin.fcc 파일에 직접 포스트할 수 있습니다. 따라서 action 인수를 수정할 필요가 없습니다.
- 작업 URL은 다른 웹 서버에서 호스트할 수 있습니다. 하지만Single Sign-On관련 리소스 URL(FCC, SCC, NTC)이 인식되고 올바로 처리되도록 이 다른 웹 서버 또한 에이전트로 보호되어야 합니다.참고SCC 의사 리소스(pseudo-resource) URL은 인증서 전용 인증에 사용됩니다.
샘플 selectlogin.fcc 파일
아래에는 HTML 서식이 없는 간단한 selectlogin.fcc 파일이 나옵니다. smquerydata 및 postpreservationdata에 대한 숨겨진 입력 필드는 각각 GET 및 POST 매개 변수를 전달하는 데 필요합니다.
smauthreason 매개 변수는 정책 서버가 인증 챌린지와 함께 제공하는 사유 코드를 보관합니다.
샘플 selectlogin.fcc 파일은 다음과 같습니다.
@username=%USER% @smretries=0 <html> <head> <script language="JavaScript"> function submitForm(form) { authtype = "none"; if (form == 1) { document.Login.USER.value = document.Login.USER1.value; document.Login.PASSWORD.value = document.Login.PASSWORD1.value; if (!document.Login.UseCert.checked) { // username/password only authtype = "form"; } else if (document.Login.USER.value == "" && document.Login.PASSWORD.value == "") { // certificate only authtype = "cert"; } else { // username/password and certificate authtype = "certform"; // This option requires posting over SSL. arr = document.URL.split("://"); document.Login.action = "https://" + arr[1]; } } else if (form == 2) { // SecurID authentication authtype = "securid"; document.Login.USER.value = document.Login.USER2.value; document.Login.PASSWORD.value = document.Login.PASSWORD2.value; } else if (form == 3) { // SafeWord authentication authtype = "safeword"; document.Login.USER.value = document.Login.USER3.value; document.Login.PASSWORD.value = ""; // POST to safeword.fcc, for additional processing. // NOTE: This forces the web agent to POST to safeword.fcc // even if the authentication scheme's URL parameter // is set to selectlogin.fcc for redirection purposes. document.Login.action = "safeword.fcc"; } else if (form == 4) { // Authenticate with the current Windows login credentials authtype = "windows"; document.Login.USER.value = ""; document.Login.PASSWORD.value = ""; // POST to creds.ntc (required by the Windows authentication scheme). document.Login.action = "/siteminderagent/ntlm/creds.ntc"; } // Generate the target, depending on the user's choice of credentials. // This sample uses redirect.asp, but it could also be redirect.jsp, redirect.pl, etc. // This sample uses the following format: /auth/redirect.asp?authtype=<choice>&target=<original target> // Other formats are also possible, e.g.: /auth-<choice>/redirect.asp?target=<original target> // The helper realms' resource filters must be defined accordingly (see the tech note). // Check if the target is not already in the same format. The user may // have been redirected back to selectlogin.fcc upon authentication failure, // if the authentication scheme's URL parameter is set to selectlogin.fcc. if ("$$target$$".indexOf("/auth/redirect.asp?authtype=") == 0 && "$$target$$".indexOf("&target=") > 0) { // This must be a redirect. Extract the original target, but not // the authtype parameter, because the user may have made a different // choice of credentials this time. trgarr = "$$target$$".split("&target="); document.Login.target.value = "/auth/redirect.asp?authtype=" + authtype + "&target=" + trgarr[1]; } else { // This is not a redirect. Pass $$target$$ as a URL query parameter. document.Login.target.value = "/auth/redirect.asp?authtype=" + authtype + "&target=$$target$$"; } document.Login.submit(); } function resetCredFields() { document.Login.PASSWORD.value = ""; document.Login.PASSWORD1.value = ""; document.Login.PASSWORD2.value = ""; } </script> </head> <body onLoad="resetCredFields();"> <center> <form name="Login" method="POST"> <input type="hidden" name="USER"> <input type="hidden" name="PASSWORD"> <input type="hidden" name="smagentname" value="$$smagentname$$"> <input type="hidden" name="smauthreason" value="$$smauthreason$$"> <input type="hidden" name="smquerydata" value="$$smquerydata$$"> <input type="hidden" name="postpreservationdata" value="$$postpreservationdata$$"> <input type="hidden" name="target"> <!-- Some table formatting throughout --> <!-- Authentication Choice: Password And/Or Certificate --> <input type="text" name="USER1"> <input type="password" name="PASSWORD1"> <input type="button" value="Login" onClick="submitForm(1);"> <!-- Authentication Choice: Windows Authentication --> <input type="button" value="Login" onClick="submitForm(4);"> <!-- Authentication Choice: SecurID Authentication --> <input type="text" name="USER2"> <input type="password" name="PASSWORD2"> <input type="button" value="Login" onClick="submitForm(2);"> <!-- Authentication Choice: SafeWord Authentication --> <input type="text" name="USER3"> <input type="button" value="Login" onClick="submitForm(3);"> <!-- More table formatting --> </form> </center> </body> </html>
프런트엔드 인증 체계 구성
인사말을 생성하는 샘플 응용 프로그램을 보호하는 프런트엔드 인증 체계를 구성하십시오. 이를 위해서는 다음 설정을 사용하여 AuthChannel 인증 체계를 구성할 수 있습니다.
- 인증 유형 스타일HTML 양식 템플릿
- 보호 수준1프런트엔드 인증 체계의 보호 수준은 구성의 다른 체계보다 낮아야 하므로 AuthChannel 체계의 보호 수준은 1로 설정됩니다. 보호되는 리소스를 액세스하기 위해 사용자가 로그인할 때 선택하는 인증 체계는 해당 사용자의 실제 보호 수준을 결정합니다. 사용자가 다시 원래 요청한 리소스로 리디렉션되더라도 프런트엔드 체계의 낮은 보호 수준으로 인해 사용자에게 인증이 다시 요청되지 않습니다.
- 웹 서버 이름auth.sample.com샘플 응용 프로그램이 있는 웹 서버를 지정합니다.
- 대상/siteminderagent/forms/selectlogin.fcc이 대상은 selectlogin.fcc 파일을 가리킵니다. selectlogin.fcc 파일은 웹 에이전트 설치에 포함된 샘플 파일입니다.