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 を指定します。
アカウント所有者名を指定します。
注: 属性がアカウントに対して設定されていない場合、キーはアカウントが属するエンドポイントの属性を指定します。
部門名を指定します。
注: 属性がアカウントに対して設定されていない場合、キーはアカウントが属するエンドポイントの属性を指定します。
セッションが ObserverIT Enterprise に記録されている場合に、ACLauncher ActiveX が記録されたセッション ID の送信に使用する URL を指定します。
アカウント固有の属性を指定します。 アカウント固有のカスタム属性を 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 の自動ログイン アプリケーション スクリプトの構造は以下のとおりです。
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 = " & id
GetWindowTitle(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 は 5 秒間隔で SAM をクエリします。
例: Set test = CreateObject("ACLauncher.ACWebLauncher") hwnd = test.LauncheRDP("hostname", "administrator", "password") test.SetServerCheckinEvent("http://server.com/__azy?djfhwek5jy34brfhwkeb") (replace with variable)
WaitForEvents(VARIANT *pRetVal);
レジスタ条件の 1 つに該当するまで、スクリプトの実行をブロックします。
オプション: 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")
|
Copyright © 2013 CA.
All rights reserved.
|
|