SAM 자동 로그인 응용 프로그램 스크립트 사용자 지정
목차
cminder12902kr
목차
SAM 자동 로그인 응용 프로그램 스크립트를 사용자 지정하여 SAM 자동 로그인 기능을 개선할 수 있습니다. SAM 자동 로그인 SDK를 사용하여 사용자가 끝점에 자동으로 로그인할 수 있도록 사용자 지정 스크립트를 만듭니다.
다음 프로세스는 자동 로그인 응용 프로그램 스크립트를 사용자 지정하는 방법에 대해 설명합니다.
- Visual Basic 스크립트를 만듭니다.표준 COM 개체 또는 ACLauncher ActiveX 메서드를 사용하여 스크립트를 만들 수 있습니다.
- Privileged Identity Manager엔터프라이즈 콘솔에서 로그인 응용 프로그램을 구성하고 만든 스크립트를 이 응용 프로그램과 연결합니다.
- 로그인 스크립트를 끝점에 연계합니다.
SAM 자동 로그인 응용 프로그램 Visual Basic 스크립트
SAM 자동 로그인 응용 프로그램은 Visual Basic 스크립트를 사용하여 자동 사용자 로그인을 활성화합니다. Visual Basic 스크립트를 사용자 지정하여 새 로그인 응용 프로그램을 만들거나 기존 로그인 응용 프로그램을 수정할 수 있습니다.
SAM 자동 로그인 응용 프로그램 스크립트에는 엔터프라이즈 관리 서버에서 클라이언트 컴퓨터로 다운로드될 때 ActiveX가 값으로 대체하는 변수가 수록되어 있습니다. 엔터프라이즈 관리 서버는 이 스크립트를 처리하고 값으로 키워드를 대체합니다. 그런 다음 ActiveX는 클라이언트 컴퓨터에서 이 스크립트를 실행합니다.
SAM 자동 로그인 응용 프로그램 스크립트는 다음 디렉터리에 있습니다.
JBOSS_HOME/server/default/deploy/IdentityMinder.ear/config/sso_scripts
요소
SAM 로그인 응용 프로그램 스크립트는 다음 키를 포함합니다.
- #host#사용자가 자동으로 로그인하는 끝점의 이름을 지정합니다.
- #username#체크 아웃된 권한 있는 계정을 지정합니다.
- #password#체크 아웃할 권한 있는 계정 암호를 지정합니다.
- #userdomain#(Active Directory) 권한 있는 계정 도메인 이름을 지정합니다.
- #isActiveServletUrl#ACLauncher ActiveX가 계정 암호 체크 인 이벤트에 대해 확인하기 위해 사용하는 URL을 지정합니다.
- #CheckinUrl#사용자가 끝점에서 로그아웃한 경우 ACLauncher ActiveX가 계정 암호를 체크 인하는 데 사용하는 URL을 지정합니다.
- #Owner#계정 소유자 이름을 지정합니다.참고계정에 대해 특성이 설정되지 않은 경우 키는 계정이 속한 끝점의 특성을 지정합니다.
- #Department#부서 이름을 지정합니다.참고계정에 대해 특성이 설정되지 않은 경우 키는 계정이 속한 끝점의 특성을 지정합니다.
- #SessionidUrl#세션이 ObserverIT Enterprise에 기록된 경우 ACLauncher ActiveX가 기록된 세션 ID를 보내기 위해 사용하는 URL을 지정합니다.
- #CustomInfo1...5#계정 관련 특성을 지정합니다. 최대 5개까지 사용자 지정 계정 관련 특성을 지정할 수 있습니다.참고계정에 대한 사용자 지정 특성이 설정되지 않은 경우 키에 의해 계정이 속한 끝점의 특성이 지정됩니다.
다음은 SAM 자동 로그인 응용 프로그램 스크립트의 조각입니다.
Set pupmObj = CreateObject("ACLauncher.ACWebLauncher") hwnd = pupmObj.LauncheRDP("#host#", "#userDomain#\#userName#", "#password#") ' Set window close event pupmObj.SetWindowCloseEvent(hwnd) ' Set server checkin event pupmObj.SetServerCheckinEvent("#isActiveServletUrl#") ' Wait until one of the events signaled rc = pupmObj.WaitForEvents() If rc = 1 Then 'user has closed the window - notify the server side pupmObj.SendCheckinEvent("#CheckinUrl#") ElseIf rc = 2 Then 'timeout elapsed - close the window call pupmObj.CloseWindow(hwnd, 0) ElseIf rc = 3 Then 'the account was checkedin at the server side - close the window call pupmObj.CloseWindow(hwnd, 120) End If
구조
SAM 자동 로그인 응용 프로그램 스크립트 구조는 다음과 같습니다.
- COM 개체의 초기화Set pupmObj = CreateObject("ACLauncher.ACWebLauncher")
- 자동 로그인 응용 프로그램의 실행hwnd = pupmObj.LauncheRDP("#host#", "#userDomain#\#userName#", "#password#")
- 실행 후 작업 - 암호 체크 인, 대화형 로그인 또는 시간 만료' Wait until one of the events signaled rc = pupmObj.WaitForEvents() If rc = 1 Then 'user has closed the window - notify the server side pupmObj.SendCheckinEvent("#CheckinUrl#") ElseIf rc = 2 Then 'timeout elapsed - close the window call pupmObj.CloseWindow(hwnd, 0) ElseIf rc = 3 Then 'the account was checkedin at the server side - close the window call pupmObj.CloseWindow(hwnd, 120) End If
로그인 응용 프로그램 세션을 기록하려면 다음과 같이 스크립트에 기록 지침을 추가하십시오.
- 초기화 섹션에서 다음을 추가합니다.Set observeIT = CreateObject("ObserverIT.AgentAPI.Proxy")
- 응용 프로그램 실행 섹션에서 다음을 추가합니다.'Get application processid processID = pupmObj.GetWindowProcessID(hwnd) 'Start recording sessionid = observeIT.StartByProcessID(processID, true) 'Send the sessions if to the ENTM server pupmObj.AssignSessionID "#SessionidUrl#" ,sessionId
- 실행 후 섹션에서 다음을 추가합니다.'Stop recording observeIT.StopBySessionId sessionId, true
메서드
ACLauncher ActiveX는 다음 메서드를 사용합니다.
LauncheRDP (BSTR bsHostName, BSTR bsUserName, BSTR bsPassword, VARIANT *phWindow);
입력 자격 증명을 사용하여 원격 데스크톱 세션을 시작하고 원격 데스크톱 창 핸들을 반환합니다.
예
: Dim test Set test = CreateObject("ACLauncher.ACWebLauncher") Hwnd = test.LauncheRDP("hostname.com", "hostname\administrator", "password")LaunchePUTTY (BSTR bsHostName, BSTR bsUserName, BSTR bsPassword, VARIANT *phWindow);
입력 자격 증명을 사용하여 PuTTY 세션을 시작하고 PuTTY 창 핸들을 반환합니다.
예
: Dim test Set test = CreateObject("ACLauncher.ACWebLauncher") Hwnd = test. LaunchePUTTY ("hostname.ca.com", "root", "password")LauncheProcessAsUser (BSTR bsApplication, BSTR bsCommandline, BSTR bsUsername, BSTR bsPassword, VARIANT *phWindow);
입력 자격 증명을 사용하여 프로세스를 시작하고 프로세스 창 핸들을 반환합니다.
예
: Dim test Set test = CreateObject("ACLauncher.ACWebLauncher") Hwnd = test.LauncheProcessAsUser("cmd.exe", "/k echo This console is run under %USERNAME% account...", "administrator" , "password")GetWindowProcessID(VARIANT *phWindow, LONG *pProcessID);
지정된 창 핸들의 프로세스 ID를 반환합니다.
예
: Set test = CreateObject("ACLauncher.ACWebLauncher") hwnd = test.LauncheRDP("hostname", "administrator", "password") id = test.GetWindowProcessID(hwnd) test.Echo "Process ID = " & idGetWindowTitle(VARIANT *phWindow, BSTR *pbsTitle);
지정된 창 핸들의 제목을 반환합니다.
예
: Set test = CreateObject("ACLauncher.ACWebLauncher") hwnd = test.LauncheRDP("hostname", "administrator", "password") title = test.GetWindowTitle(hwnd)CloseWindow(VARIANT *phWindow, LONG Seconds);
창이 X초 후에 닫힘을 나타내는 메시지가 있는 대화 상자를 표시하고 지정된 창 핸들의 창을 닫습니다.
예
: Set test = CreateObject("ACLauncher.ACWebLauncher") hwnd = test.LauncheRDP("hostname", "administrator", "password") test.Sleep(5000) test.CloseWindow(hwnd, 60)SetTimeoutEvent(LONG seconds);
"WaitForEvents" 메서드의 만료 시간을 지정합니다. 이 시간에 도달하면 WaitForEvents 메서드는 만료 시간에 도달했음을 나타내는 반환 값을 사용하여 차단 호출로부터 반환됩니다.
예
: Set test = CreateObject("ACLauncher.ACWebLauncher") hwnd = test.LauncheRDP("hostname", "administrator", "password") test.SetTimeoutEvent(10)SetWindowCloseEvent(VARIANT *phWindow);
"WaitForEvents" 메서드에 대한 창 닫기 이벤트를 지정합니다. 창이 닫힌 후에 "WaitForEvents" 메서드는 차단 호출로부터 반환되고 창이 닫혔음을 나타내는 반환 값을 표시합니다.
예
: Set test = CreateObject("ACLauncher.ACWebLauncher") hwnd = test.LauncheRDP("hostname", "administrator", "password") test.SetWindowCloseEvent(hwnd)SetServerCheckinEvent(BSTR bsURL);
SAM 체크 인 이벤트를 차단 실행 조건으로 설정합니다. ActiveX는 SAM을 5초마다 쿼리합니다.
예
: Set test = CreateObject("ACLauncher.ACWebLauncher") hwnd = test.LauncheRDP("hostname", "administrator", "password") test.SetServerCheckinEvent("http://server.com/__azy?djfhwek5jy34brfhwkeb")(변수로 대체)WaitForEvents(VARIANT *pRetVal);
등록 조건 중 하나가 맞을 때까지 스크립트 실행을 차단합니다.
옵션
:1 - 사용자가 창을 닫음, 2 - 시간 만료됨, 3 - 서버 측에서 암호 체크 인됨예
: Set test = CreateObject("ACLauncher.ACWebLauncher") hwnd = test.LauncheRDP("hostname", "administrator", "password") test.SetServerCheckinEvent("http://server.com/__azy?djfhwek5jy34brfhwkeb")test.SetWindowCloseEvent(hwnd) test.SetTimeoutEvent(360) rc = test.WaitForEvents() If rc = 3 Then call test.CloseWindow(hwnd, 10) End If
SwitchToThisWindow(VARIANT *phWindow);
Z 순서의 맨 위에 창을 배치합니다.
예
: Set test = CreateObject("ACLauncher.ACWebLauncher") hwnd = test.LauncheRDP("hostname", "administrator", "password") test.SwitchToThisWindow(hwnd)SendCheckinEvent(BSTR bsURL);
사용자가 창을 닫을 때 체크 인 이벤트를 보냅니다.
예
: Set test = CreateObject("ACLauncher.ACWebLauncher") hwnd = test.LauncheRDP("hostname", "administrator", "password")Sleep(LONG milliseconds);
스크립트 실행을 일시 중지합니다.
Set test = CreateObject("ACLauncher.ACWebLauncher") hwnd = test.Sleep(2000)
Echo(VARIANT* pArgs);
화면에 메시지를 출력합니다.
Set test = CreateObject("ACLauncher.ACWebLauncher") hwnd = test.Echo("Password Checkin")