SAM 自動ログイン アプリケーションは、Visual Basic スクリプトを使用して、自動ユーザ ログインを有効にします。 Visual Basic スクリプトをカスタマイズして新しいログイン アプリケーションを作成するか、既存のログイン アプリケーションを変更できます。
SAM 自動ログイン アプリケーション スクリプトには、エンタープライズ管理サーバからクライアント マシン上へのダウンロード時に ActiveX によって値が置換される変数が含まれています。 エンタープライズ管理サーバによりスクリプトが処理され、キーワードが値に置換されます。 次に、ActiveX によりクライアント マシン上でスクリプトが実行されます。
SAM 自動ログイン アプリケーション スクリプトは以下のディレクトリにあります。
JBOSS_HOME/server/default/deploy/IdentityMinder.ear/config/sso_scripts
エレメント
SAM ログイン アプリケーション スクリプトには以下のキーが含まれます。
ユーザが自動的にログインするエンドポイントの名前を指定します。
チェックアウトされた特権アカウントを指定します。
チェックアウトする特権アカウントのパスワードを指定します。
(Active Directory)特権アカウント ドメイン名を指定します。
ACLauncher ActiveX がアカウント パスワード チェックイン イベントの確認に使用する URL を指定します。
ACLauncher ActiveX で、ユーザがエンドポイントからログアウトした場合にアカウント パスワードをチェックインするために使用する URL を指定します。
ACLauncher ActiveX で、セッションが ObserverIT Enterprise に記録された場合に記録されたセッション IDs を送信するために使用する URL を指定します。
例
SAM 自動ログイン アプリケーションの以下の抜粋は、変数がどのように使用されるかを示しています。
Dim hwnd
Set pupmObj = CreateObject("ACLauncher.ACWebLauncher")
pupmObj.SetRDPOption "administrative session","i","1"
hwnd = pupmObj.LauncheRDP("#host#:3389", "#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 の自動ログイン アプリケーション スクリプトの構造は以下のとおりです。
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 では以下のメソッドを使用します。
指定されたクレデンシャルでリモート デスクトップ セッションを開始し、リモート デスクトップ ウィンドウ ハンドルを返します。
例: Dim test Set test = CreateObject("ACLauncher.ACWebLauncher") Hwnd = test.LauncheRDP("hostname.com", "hostname¥administrator", "password")
入力クレデンシャルで PuTTY セッションを開始し、PuTTY ウィンドウ ハンドルを返します。
例: Dim test Set test = CreateObject("ACLauncher.ACWebLauncher") Hwnd = test. LaunchePUTTY ("hostname.ca.com", "root", "password")
指定されたクレデンシャルでプロセスを起動し、プロセス ウィンドウ ハンドルを返します。
例: Dim test Set test = CreateObject("ACLauncher.ACWebLauncher") Hwnd = test.LauncheProcessAsUser("cmd.exe", "/k echo This console is run under %USERNAME% account...", "administrator" , "password")
指定されたウィンドウ ハンドルのプロセス ID を返します。
例: Set test = CreateObject("ACLauncher.ACWebLauncher") hwnd = test.LauncheRDP("hostname", "administrator", "password") id = test.GetWindowProcessID(hwnd) test.Echo "Process ID = " & id
指定されたウィンドウ ハンドルのタイトルを返します。
例: Set test = CreateObject("ACLauncher.ACWebLauncher") hwnd = test.LauncheRDP("hostname", "administrator", "password") title = test.GetWindowTitle(hwnd)
ウィンドウが X 秒後に閉じるように指定するメッセージを含むダイアログ ボックスを表示し、指定されたウィンドウ ハンドルのウィンドウを閉じます。
例: Set test = CreateObject("ACLauncher.ACWebLauncher") hwnd = test.LauncheRDP("hostname", "administrator", "password") test.Sleep(5000) test.CloseWindow(hwnd, 60)
レジストリ HKEY_CURRENT_USER¥Software¥user_name¥PuTTY¥Sessions¥session_name の下の Putty セッションでユーザ オプションを設定します。 このメソッドを使用するのは、ポート番号や X11Forward などのデフォルト値を変更する場合です。
例: 以下のコールによって、X11Forward オプションを 1 に設定し、X11Display オプションを "host.ca.com" に設定します。
pupmObj.SetPUTTYOption "X11Forward", "REG_DWORD", "1"
pupmObj.SetPUTTYOption "X11Display", "REG_SZ", "HOST.CA.COM"
hwnd = pupmObj.LaunchePUTTY("#host#", "#userName#", "#password#")
"WaitForEvents" メソッドのタイムアウトを指定します。 指定されたタイムアウト値に達すると、WaitForEvents メソッドは、タイムアウトに達したことを示す戻り値で、ブロックしているコールから戻ります。
例: Set test = CreateObject("ACLauncher.ACWebLauncher") hwnd = test.LauncheRDP("hostname", "administrator", "password") test.SetTimeoutEvent(10)
"WaitForEvents" メソッドに対して、ウィンドウを閉じるイベントを指定します。 ウィンドウが閉じられた後、"WaitForEvents" メソッドは、ブロックしているコールから戻り、ウィンドウが閉じられたことを示す戻り値を表示します。
例: Set test = CreateObject("ACLauncher.ACWebLauncher") hwnd = test.LauncheRDP("hostname", "administrator", "password") test.SetWindowCloseEvent(hwnd)
SAM チェックイン イベントを、実行ブロック条件として設定します。 ActiveX は 5 秒間隔で SAM をクエリします。
例: Set test = CreateObject("ACLauncher.ACWebLauncher") hwnd = test.LauncheRDP("hostname", "administrator", "password") test.SetServerCheckinEvent("http://server.com/__azy?djfhwek5jy34brfhwkeb") (replace with variable)
レジスタ条件の 1 つに該当するまで、スクリプトの実行をブロックします。
ユーザはウィンドウを閉じました。
タイムアウト時間が経過しました。
パスワードはサーバ側にチェックインされました。
例: 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
Z オーダの一番上にウィンドウを配置して、そのウィンドウを前面に表示します。
例: Set test = CreateObject("ACLauncher.ACWebLauncher") hwnd = test.LauncheRDP("hostname", "administrator", "password") test.SwitchToThisWindow(hwnd)
ユーザがウィンドウを閉じたら、チェックイン イベントを送信します。
例: Set test = CreateObject("ACLauncher.ACWebLauncher") hwnd = test.LauncheRDP("hostname", "administrator", "password")
スクリプトの実行を一時停止します。
Example: Set test = CreateObject("ACLauncher.ACWebLauncher") hwnd = test.Sleep(2000)
メッセージを画面に出力します。
Example: Set test = CreateObject("ACLauncher.ACWebLauncher") hwnd = test.Echo("Password Checkin")
|
Copyright © 2013 CA.
All rights reserved.
|
|