レベル: 中級 Scott Rice, Senior I/T Specialist , IBM Matthew Milza, Senior I/T Specialist, IBM, Software Group
2008年 8月 05日 インターネット・ロックアウト機能は、Lotus Domino 8に新たに加わった機能です。この記事ではその機能概要、設定方法を解説するのに加えて、カスタム・ログイン・フォームの作成するためのサンプルについても提供しています。
インターネット・パスワード・ロックアウト機能は、Lotus Dominoのアプリケーションにユーザーがログインする際に許容される、認証の失敗回数の限度を管理者が予め決めておくものです。この機能は、Lotus Domino Web Accessでも有効に動作します。ログイン時の認証失敗回数が限られているので、このロックアウト機能を使えば、総当たりや辞書を使った攻撃を防御することができます。失敗したことを示す情報とロックアウトに関する情報は、インターネット・ロックアウト・アプリケーションに格納され、管理者はその記録を消去したり、ロックされたアカウントを解除したりすることができます。
ここで注意すべきことは、この機能はDoS(denial-of-service)攻撃に晒される可能性があることです。DoS攻撃は悪意あるユーザーが、本来正当な権利を持っているユーザーがサービスへアクセスできないようにする意図的な行為です。インターネット・ロックアウト機能については悪意あるユーザーが、アクセスが許可されている正しいユーザーのアカウント名を使ってわざとログインの失敗を重ねて、ユーザーを閉め出すことが可能です。
インターネット・パスワード・ロックアウト機能には以下の制限事項があります。
- この機能はWebでのアクセスにのみ利用できます。他のイン他ネット・プロトコル (LDAP、POP、IMAP、DIIOP、IBM Lotus QuickPlace、Lotus Sametimeなど)についてはサポートされていません。しかし、Webアクセスで認証に使われるパスワードがLDAPサーバーに格納されている場合には利用可能です。
- カスタムDSAPIフィルタ機能を使っている場合には、この機能は利用できないことがあります。この理由は、DSAPIフィルタはLotus Notes/Dominoの認証をバイパスする手段として使うことができるためです。
- シングル・サインオン(SSO)を行っている場合は、この機能を使っているLotus DominoサーバーがSSOのキーを発行する必要があります。キーが別のサーバー(Lotus DOみのやIBM WebSphereなど)から供給された場合には、インターネット・ロックアウト機能が有効であっても、そのSSOトークンは常に有効とみなされてしまいます。
また、この機能を利用するには、Lotus Domino 8サーバーと、8のLotus Dominoディレクトリが必要ですのでご注意ください。
インターネット・ロックアウト機能の設定
Lotus Domino 8サーバーでは、インターネット・ロックアウト機能がデフォルトで無効です。このセクションでは、それを有効にする方法について、順を追って解説します。
- Lotus Notesクライアントを使って、Lotus Dominoディレクトリを開きます。
- 「設定」 - 「サーバー」 - 「サーバー設定」をクリックします。
- デフォルトのサーバー設定文書を編集するか、あるいはサーバー別の設定文書を編集します。
- 「セキュリティ」のタブをクリックします。
- 「インターネットパスワードを強制的にロックアウト」を「はい」にします。
- 「ログの設定」で、「ロックアウト」と「失敗」の双方にチェックを入れます。
- 「デフォルトの最大試行回数」を設定します。
ユーザーがロックアウトされるまでに許容される、失敗回数を設定します。デフォルトは5です。ユーザーがロックアウトされてしまうと、この回数の設定値を変更しても、ロックされたままです。ロックアウトされたユーザーに新しい設定値を適用するには、一旦アンロックする必要があります。
ユーザーポリシーを使って、この設定とは異なる値がユーザーに割り当てられている場合には、ポリシーの値が優先されます。
- ロックアウトの有効期限(解除までの期間)のデフォルト値をセットします。
この期間を過ぎると、ロックアウトされたユーザーのアカウントは自動的に、ロックが解除されます。それ以降、ユーザーは通常通りログインできます。ログインに失敗した記録も、ロックアウトの解除と同時に消去されます。
|
注意:
値を0に設定した場合には、自動的に解除されなくなります。この場合は手動で解除する必要があります。 |
- 試行間隔の最大デフォルト値を設定します。
認証に失敗するとロックアウト・データベースに記録されますが、その記録が保持される期間を設定します。デフォルト値は24時間です。尚、認証に成功した時点で、失敗の記録は消去されるようになっています。
この設定は、既にロックアウトされたユーザーには適用されません。ロックアウトされてしまうと、失敗の記録を消去する方法、およびロックを解除する方法はロックアウトデータベース上で手動解除を行うか、ロックアウトの有効期間が過ぎるのを待つことになります。
|
注意:
値が0の場合は、ユーザーがロックアウトされていない場合に限り、認証に成功するたびに、認証の失敗の記録がクリアされます |
図1 インターネット・ロックアウト設定画面
- 保存して閉じます。
- Lotus Dominoサーバーを再起動します。
インターネット・ロックアウト機能は、セキュリティ・ポリシーを使っても設定ができます。この方法をとれば、管理者は指定したユーザーに対してのみインターネット・ロックアウト機能を適用することができます。セキュリティ・ポリシーは、サーバー設定文書よりも優先されますので注意が必要です。
セキュリティ・ポリシーを使ってインターネット・ロックアウト機能を設定する方法は以下の通りです。
- Lotus Dominoディレクトリを開きます。
- 「設定」 - 「ポリシー」 - 「設定」をクリックします。
- 既存のセキュリティ・ポリシー文書があればそれを開きます。ない場合には、「設定の追加」ボタンを押して、新規にセキュリティ・ポリシー文書を作成します。
- 「パスワード管理」タブを開き、以下の設定値を入力します。(図2参照)
- 「サーバーのインターネットロックアウト設定を上書きしますか?」: 「はい」
- 「許可される最大入力回数」: 5
- 「ロックアウトの有効期限」: 60分
- 「最大試行間隔」: 1日
- 上記すべての設定の「強制」にチェックを入れて、子ポリシーでも引き継がれるようにします。
図2 セキュリティ・ポリシーの設定画面
セキュリティ・ポリシー設定文書の作成が終了したら、そのポリシーを個人ユーザーに割り当てたり、組織単位で割り当てたりすることができるようになります。ポリシーの設定の詳細に関してはLotus Domino Administratorヘルプ(US)を参照してください。ポリシーでインターネット・ロックアウトの設定を強制するには、サーバー設定文書でインターネット・ロックアウト機能を有効にしておくことが前提条件ですので注意が必要です。ポリシーを使えば、異なる設定をグループ別や個人別に適用でき、柔軟な運用が可能となります。
以上の設定が終了すると、inetlockout.nsfというデータベースが作成されます。このデータベースには、ロックアウトされたユーザー名とログインの失敗の記録が保持されます。このデータベースを、HTTPタスクが起動しているサーバー間で複製することで、社内全体で整合性のとれたロックアウトの運用が実現できます。inetlockout.nsfデータベースはinetlockout.ntfテンプレートから作成されます。セキュリティの観点から、管理者以外のすべてのユーザーはこのデータベースにはアクセスできないようにしておきます。
図3は、ロックアウトされた時にユーザーに表示される画面です。この画面はデフォルトのログイン・フォームのものです。これについては、カスタマイズの方法を後述します。
図3. ロックアウト時にユーザーに表示される画面
管理者は、このinetlockout.nsfを使って、どのユーザーがロックされたかを確認することができます。また、管理者はそのロックされたユーザーを解除することもできます。図4は、データベースを表示したところです。このデータベースは、ログインの失敗についても記録しますので、ハッキング行為の検出にも利用できます。サーバーのコンソール画面には以下の記録が残りますので、どのIPからのアクセスかを特定できます。
図4 インターネット・ロックアウトデータベース (このテンプレートは日本語化されていませんので、日本語版でも英語画面です)
カスタム・ログイン・フォーム
ここからは、カスタマイズを加えたサンプル・ログイン・フォームについて解説します。このログイン・フォームでは、ユーザーインターフェースの改善を図るとともに、パスワードのリセットの機能を加えています。この改善を図るために、カスタム・データベースとログイン・フォームを作成しました。
Lotus Domino Webサーバーの構成データベースの設定
デフォルトの状態では、Lotus Domino Webサーバーの構成データベースは作成されていませんので、domcfg5.ntfのテンプレートを使って手動で作成する必要があります。
Lotus Domino Webサーバーの構成データベースの修正手順は以下の通りです。
- サーバー上にあるdomcfg.nsfを開きます。
- 「マッピングの追加」ボタンをクリックします。「適用」フィールドは「すべてのWebサイト/サーバー」を選択します。
- 「目的のデータベース」にはカスタマイズしたログイン・フォームが入ったデータベース名を設定します。
- 「目的のフォーム」には、上で指定したデータベース内のフォーム名を設定します。今回のサンプルでは、PwdMgt.nsfとCustomLoginFormです。
図5 「サインイン」フォーム・マッピングの設定画面
- 「保存して閉じる」をクリックします
- Lotus DominoサーバーのHTTPタスクを再起動します。
この設定により、認証を必要とするデータベースにユーザーがアクセスした際に、カスタマイズしたログイン・フォームが表示されるようになりました。
カスタム・ログイン・フォームは図6に示した通りです。この画面にはパスワードをリセットするボタンが付いています。ユーザーがUser IDフィールドにユーザーIDを入れて、Password Resetボタンを押すと、ユーザーは新しいパスワードが記されたメールを受信します。
図6 カスタム・ログイン・フォーム (ダウンロードできるファイルに一部日本語化を加えています)
パスワードがリセットされた時には、ユーザーは図7に示すメールを受信します。
図7 パスワードがリセットされた時に、ユーザーが受け取るメール画面
パスワードのリセット・ツール
これから示すサンプルコードでは、ブラウザのカスタム・ログイン画面からどのようにしてHTTPパスワードが更新されるかを解説していきます。このコードは実際の業務が稼働している環境にそのまま入れることを前提としていませんが、同様の機能を実装する上で、開発期間を短縮するなど参考にはなると思います。
この記事で提供されるコードでは、パスワードリセットのカスタム・アプリケーション内のカスタム・ログイン・フォームに置かれたPassword Resetボタンを、ユーザーが押せるようになっています。このボタンを押すとPwdQueryエージェントが実行され、ランダムなパスワード文字列が生成されます。そして、Lotus Dominoディレクトリのユーザー文書内にあるパスワードを更新します。さらに、そのパスワードをメールでユーザーに通知します。
表1にはこのサンプルコードで使われている設計要素の概略が示されています。サンプルコードで示されたエージェントは、サーバーで実行できるように署名をしておく必要があります。使用する署名者は、サーバー上でエージェントを実行する正しい権限を持っていると同時に、Lotus Dominoディレクトリに対して適切な権限を持っている必要があります。
表1 サンプルコードの設計要素
| 設計要素名 | タイプ | 内容 |
|---|
| Custom password management | アプリケーション | この設計要素は、カスタム・ログイン・フォームや処理を行うエージェントの殆どが含まれるカスタムNSFファイルです。 | | CustomLogonForm | フォーム | この設計要素はカスタム・ログイン・フォームで、パスワード管理(PwdMgt.nsf)内にあります。この機能とフォームは、Lotus Domino構成データベース内に置くことも可能です。このフォームはHTTP認証要求がLotus Dominoサーバーに送られた際に、ユーザーに表示されるものです。 | | Reset Password | ボタン | The このボタンはCustomLogonFormに配置されているもので、ユーザーから見えるようになっています。ユーザーがこれをクリックした場合には、PwdQueryを実行するURLをJavaScriptコードが生成します。 | | PwdQuery | エージェント | このエージェントはLotusScriptで書かれており以下のことを行います。
- URLからユーザー名を取得します。
- ランダムなパスワード文字列を生成します。
- Lotus Dominoディレクトリ内にあるユーザー文書のHTTPPasswordとHTTPPasswordChangeDateの場所を特定し更新します。
- 新しいパスワードをユーザーに送信します
- パスワードリセットが完了したことを示す画面をユーザーに表示する
|
PwdQuery Agent: Invocation
このエージェントはURLを使って起動されます。URLにはQueryStringとしてユーザー名が加えられている必要があります。以下は、エージェントを起動するサンプルのURLです。
/PwdMgt.nsf/PwdQuerySave?OpenAgent&QueryString=Scott Rice/ibm
PwdQueryエージェント: 入力
エージェントの入力はHTTPパスワードを更新するユーザーのユーザー名です。このサンプルコードでの実装では、Lotus Notesの短縮名を使う必要があります。このユーザー名は、URL内のQueryStringメソッドを使ってエージェントに渡されます。このエージェントコードは変更可能で、異なるビューにマッピングすることも可能です。また、Lotus Dominoディレクトリに新たにビューを作成してそこにマッピングすることも可能です。
PwdQueryエージェント: 出力
エージェントの出力は2種類で、一つはパスワードリセットが成功して新しいパスワードが生成されたことを示すもの。もう一つはエージェントの実行時にエラーが起きたことを示すエラーメッセージで、いずれもブラウザの画面に表示されます。
サンプルコード
以下にサンプルコードを示します。
CustomLogonForm内のパスワードリセット(Password Reset)ボタン
以下に示すコードは、ユーザーからの要求により、パスワード変更の処理を初期化するものです。パスワードリセットボタンをユーザーがクリックすると、JavaScriptのchangePwd()が開始されます。
CustomLogonForm内のForm JSヘッダーコード
このJavaScript関数は、Lotus DominoフォームのJSヘッダー内にあり、URLにある?OpenAgentを使ってPwdQueryエージェントを実行します。このコードはパスワードリセットボタンをユーザーが押した際に実行されます。
function changePwd(){
var uname = document.forms[0].Username.value;
window.location = '/PwdMgt.nsf/PwdQuery?OpenAgent&QueryString=' + uname;
}
|
PwdQuery: エージェント初期化コード
リスト1に示したコードはchangePwd()のJavaScript関数により実行されるエージェントを示しています。この部分が処理の多くを示しています。このエージェントはランダムなパスワード文字列と日付/時間を、Lotus Dominoディレクトリにあるユーザー文書内に書き込みます。そして、HTTPPパスワードがリセットされたことをメールで通知します。
リスト1 エージェント初期化コード
Sub Initialize
%REM
Purpose - This agent is for demo/sample purposes only and is not intended to be
implemented in a production environment. This agent createsa random password and sets
the HTTPPassword and HTTPPasswordChangeDate fields with appropriate values. Then an
email is sent to the user with the new password. Please note that it may take a few
minutes for the user to use new password after the agent has be executed.
Input. Abbreviated Lotus Notes name that is used to look up the person document in
the Lotus Domino Public Directory.
Output. The Print statement in this agent writes to the browser and shows the user
that the agent has been processed as the password has been changed. The output of
this agent is only a sample and is limited in nature but could be expanded on greatly.
Instantiated. This is agent is to be executed by a URL with the user name of the
person to have the password change appended to the URLusing QueryString.
The URL should conform to this standard for the agent to execute properly:
http://domain/PwdMgt.nsf/PwdQuerySave?OpenAgent&QueryString=Abbreviated Name
%END REM
' Setup the Agent Log
Dim errStr As String 'Error string variables
Dim agentLog As New NotesLog("Agent log") 'Used to write to the Agent Log
Call agentLog.OpenAgentLog
Call agentLog.LogAction("Entering the Initialize")
On Error Goto ErrorHandler
' Setup the variable to be used to process the Admin P Request
Dim session As New NotesSession 'Domino Session object
Dim dbDirectory As NotesDatabase 'Database object for the Domino directory
Dim db As NotesDatabase 'Database object for this database
Dim viewDirectory As NotesView 'View object in the Domino Directory to look up
the person document
Dim personDoc As NotesDocument 'Person document related to the User
Name password to be changed
Dim userName As String 'User Name of the end user to be processed
Dim dirName As String 'Domino Directory file name (normally names.nsf)
Dim vwName As String 'View name used in the Domino Directory to
look up the person document
Dim password As String 'New random password to be used on the
Person document in the HTTPPassword field
Dim docContext As NotesDocument 'Web document used to get the
QueryString / User Name variable
Dim queryString As String 'Variable from the URL that executes
this agent containing the user name
'set variables for the agent
Set docContext = session.DocumentContext
If Not(docContext Is Nothing) Then
queryString = docContext.QUERY_STRING(0)
agentLog.LogAction("QueryString = " + queryString)
Else
agentLog.LogAction("There is no docContext for
QueryString variable.
Must execute this agent from a URL with
'/PwdMgt.nsf/PwdQuerySave?OpenAgent&QueryString=Abbreviated Name'")
errStr = "There is no docContext for QueryString variable. Must execute this
agent from a URL with
'/PwdMgt.nsf/PwdQuerySave?OpenAgent&QueryString=Abbreviated Name'"
Goto ErrorHandler
End If
'get the username to be processed
userName = getUserName(agentLog, queryString)
'variables to run code below
dirName = "names.nsf"
vwName = "($VIMPeople)"
'create a unqiue password to be reset
password = createUniquePwd(agentLog)
'open the directory and the custom pwd change mgt tool
Set dbDirectory = session.GetDatabase("", dirName)
Set db = session.CurrentDatabase
If dbDirectory.IsOpen Then
'set the vew to lookup the person document with
Call agentLog.LogAction("Opened the directory")
Set viewDirectory = dbDirectory.GetView(vwName)
If Not(viewDirectory Is Nothing) Then
Call agentLog.LogAction("Set the Directory View")
'set the person document in the view
Call agentLog.LogAction("viewName is " + viewDirectory.Name)
Set personDoc = viewDirectory.GetDocumentByKey(userName, True)
If Not(personDoc Is Nothing) Then
Call agentLog.LogAction("Set the person document")
'set the HTTP Password field to a unique random value
personDoc.HTTPPassword = password
'set the date time value that the HTTP Password was set
personDoc.HTTPPasswordChangeDate = Now
'save the person document
Call personDoc.Save(True, False)
Call agentLog.LogAction("Saved the persondocument")
'send email using the DisplayName field in the person document
Dim emailDoc As NotesDocument
Dim sendToName As String
sendToName = personDoc.InternetAddress(0)
Call agentLog.LogAction("SendTo: " + sendToName )
Set emailDoc = New NotesDocument( db )
Call agentLog.LogAction("Created new email document")
'create the email fields and associated values
emailDoc.Form = "Memo"
emailDoc.SendTo = sendToName
emailDoc.Subject = "URGENT: HTTP Password Change Request"
emailDoc.Body = "Your HTTP Password was changed to: " + password
Call agentLog.LogAction("Set fields on email document")
'route the document to the end user
Call emailDoc.Send( False )
Call agentLog.LogAction("Sent the email to " + sendToName)
Else
'couldn't open the person document
errStr = "Could not get the person document in the Directory. Probably
need to use the Abbreviated name instead of Common Name."
Call agentLog.LogAction("Could not get the person document in the
Directory. Probably didn't use the Abbreviated name.")
Goto ErrorHandler
End If
Else
'couldn't open the view in the directory
errStr = "Could not get the view in the directory"
Call agentLog.LogAction("Could not get the view in the directory")
Goto ErrorHandler
End If
Else
'could not open the Domino Directory
errStr = "Could not open the Domino Directory"
Call agentLog.LogAction(errStr)
Goto ErrorHandler
End If
' Close out the Agent
Call agentLog.LogAction("Existing Intialize")
Call agentLog.Close
'Print out to the browser to notify the end user
Print "Password has been changed for " + UserName + ". Please check your
email via a Notes Client for the password."
Exit Sub
ErrorHandler:
If errStr = "" Then
errStr = "Error in Initialize: " & Err() & ": " & Error()
End If
Call agentLog.LogAction(errStr)
Call agentLog.Close
Print "An error occured please check the Agent Log for details.
<br><br> Description of what occured is: <br>" + errStr
End Sub
|
PwdQueryエージェント: createUniquePwdファンクション・コード
このLotusScript関するは、新規にユニークなパスワードを生成します。これには@Uniqueの@関数とLotusScriptのEvaluateを使用しています。
返り値は新規のユニークなパスワードであり、この関数を起動するサブルーチンを初期化します。リスト2を参照してください。
リスト2 createUniquePwdファンクション・コード
Function createUniquePwd(agentLog As NotesLog) As String
Call agentLog.LogAction("entering createUniquePwd function")
Dim pwdunique As Variant 'contains the new unique password to be created
from the @Unique @function
Dim password As String 'contains the string form of the unique password
Dim i As Integer 'counter
Dim r As String 'used for string parsing
Dim l As String 'used for string parsing
Dim errStr As String 'used for error handling
On Error Goto ErrorHandler
'create the unique password for the end user
pwdunique = Evaluate("@Unique")
password = pwdunique(0)
Call agentLog.LogAction(password)
'parse the password to remove the - character
i = Instr(password, "-")
Call agentLog.LogAction(i)
l = Left(password, i - 1)
r = Right(password, i + 1)
Call agentLog.LogAction("l = " + l )
Call agentLog.LogAction("r = " + r )
'return the new unique password back to the main function
createUniquePwd = l + r
Call agentLog.LogAction("exiting createUniquePwd function")
Exit Function
ErrorHandler:
errStr = "Error in createUniquePwd: " & Err() & ": " & Error()
Call agentLog.LogAction(errStr)
End Function
|
PwdQueryエージェント: getUserNameファンクション・コード
このLotusScript関数はエージェントのサブルーチンの初期化により実行されるもので、パスワードが変更されるユーザー名を返します。この例では、クエリー文字列は&QueryString=Scott%20 Rice/ibmで、出力はScott Rice/ibmです。リスト3を参照してください。
リスト3 getUserNameファンクション・コード
Function getUserName(agentLog As NotesLog, queryString As String) As String
Dim i As Integer 'used as a counter
Dim strTemp As String 'used to get the username as a string without %20
and replaced with blank spaces
Dim qStr As Variant 'used with the @ReplaceSubString @function to
replace any %20 's in the string with black spaces
Dim errStr As String 'used for error handling
On Error Goto ErrorHandler
'retrieve just the username from the QueryString
agentLog.LogAction(queryString + " - in getUserName function")
i = Instr(queryString, "=")
agentLog.LogAction("i = " + Str(i))
queryString = Right(queryString, Len(queryString) - i)
'used for testing the @function so that the agent log
agentLog.LogAction(queryString + " - In getUserName")
agentLog.LogAction("@ReplaceSubString(""" + queryString + """, ""%20"", "" "")")
'use the @ReplaceSubString @function to replace the %20 with black spaces
qStr = Evaluate("@ReplaceSubString(""" + queryString + """; ""%20""; "" "")" )
strTemp = qStr(0)
agentLog.LogAction(strTemp + " - after Evaluate")
'assign the name with appropriate blanks as a string
queryString = strTemp
'return the user name back to the main routine
getUserName = queryString
agentLog.LogAction("exiting getUserName function")
Exit Function
ErrorHandler:
errStr = "Error in getUserName: " & Err() & ": " & Error()
Call agentLog.LogAction(errStr)
End Function
|
PwdQueryエージェント: deleteLockoutRecordファンクション・コード
リスト4にあるように、今回のサンプルではLotusScriptのサブルーチンが入っています。しかしこれはサンプルでは実行されることはありません。ポリシーによる最大試行回数を超えてログインを試して、ロックアウトの記録が作成された場合でも、このコードにより、ロックアウトアプリケーション(interlockout.nsf)内の記録が削除されます。このルーチンは、エージェントでは今回実行されません。しかし、もし必要でしたらこのサブルーチンを初期化するようにすることも可能です。
リスト4 deleteLockoutRecordファンクション・コード
Sub deleteLockoutRecord(session As NotesSession, agentLog As NotesLog,
UserName As String)
%REM
This subroutine was included as a sample if someone wanted to delete the Locked Out
records. Just add this routine to the main
Initialize of this agent and pass in the appropriate parameters
%END REM
Dim db As NotesDatabase 'dabase object for the Internet Locked Out database
Dim view As NotesView 'view object to loop through the document in the
Locked Out database
Dim doc As NotesDocument 'document object for each document while looping
through the document of the view
Dim tmpdoc As NotesDocument 'temporary document set if there is a match so
it can be deleted after the next document has been retrieved
Dim item As NotesItem 'object for the ILUserName field on the document
which holds the users' name
Dim notesname As NotesName 'object to change the name to abbreviated
Dim abbrevName As String 'string that represents the appreviated user
name on the Locked Out document
Dim deleteDoc As Boolean 'boolean true or false to flag a document to
be deleted
Dim viewName As String 'variable that references the view name in the
Locked Out database
Dim dbFileName As String 'variable that references the file name of the
Locked Out database
Dim fieldName As String 'variable that references the field name
in the locked out document
Dim errStr As String 'used in error handling
On Error Goto ErrorHandler
'set the variables
dbFileName = "inetlockout.nsf"
viewName = "Locked Out Users"
fieldName = "ILUserName"
'set up the objects to be used in the subroutine
Set db = session.GetDatabase("", dbFileName)
agentLog.LogAction("opened the Locked Out database")
Set view = db.GetView(viewName)
agentLog.LogAction("opened the view " + viewName)
Set doc = view.GetFirstDocument
If doc Is Nothing Then
agentLog.LogAction("There are no Locked Out documents to be processed")
Else
agentLog.LogAction("opened the first document")
End If
deleteDoc = False
'loop through the view and delete any documents with the user name passed in
While Not( doc Is Nothing )
'get the user name on the Locked Out document
Set item = doc.GetFirstItem( fieldName )
'change it to an abbreviated form
Set notesname = session.CreateName(item.Text)
abbrevName = notesname.Abbreviated
agentLog.LogAction("processing for: " + abbrevName)
'check to see if there is a match and if true then save the document and flag
that this needs to be deleted
If Ucase(UserName) = Ucase(abbrevName) Then
agentLog.LogAction(Ucase(UserName) + " = " + Ucase(abbrevName))
Set tmpdoc = doc
deleteDoc = True
agentLog.LogAction("deteleDoc = " + Str(deleteDoc))
End If
'get the next document in the view
Set doc = view.GetNextDocument( doc )
'delete the document from the Locked Out database
If deleteDoc Then
Call tmpdoc.Remove(True)
Set tmpdoc = Nothing
deleteDoc = False
End If
Wend
Exit Sub
ErrorHandler:
errStr = "Error in deleteLockedOutRecord: " & Err() & ": " & Error()
Call agentLog.LogAction(errStr)
End Sub
|

 |
まとめ
今回の記事では、Lotus Domino 8サーバーのインターネット・パスワードのロックアウト機能について解説しました。その機能の評価および設定方法についても触れてきました。また、カスタム・ログイン・フォームの作成とパスワードリセットを行うサンプルコードについても説明しました。この記事ではWebインターフェースをカスタマイズしセキュアにする出発点を示しました。下記のリソース一覧にある以前の記事では、Lotus Domino Webサーバーのセキュリティおよび実装に関するケーススタディーを扱いました。今回は別な方法で、しかもこれまでのバージョンでは必須とされたカスタムDSAPIを使うことなくインターネット・セキュリティを強化する手法を提供しました。
ダウンロード | ファイル名 | サイズ | ダウンロード形式 |
|---|
| DomCfg.nsf | 922KB | HTTP | | PwdMgt.nsf | 648KB | HTTP |
参考文献 学ぶために
製品や技術を入手するために
議論するために
著者について  | |  | Scott Rice is a Senior I/T Specialist and has been with Lotus for approximately 15 years, mostly as an implementation and development Architect in the IBM Software Group and Lotus brand consulting services practice. Scott has extensive experience working with large numbers of clients creating and deploying solutions to real-world business problems. Scott has recently moved to the Senior I/T Specialist role in a Technical Sales role with Lotus product sales. You can reach him at scott_rice@us.ibm.com. |
 | |  | Matthew Milza is a Senior I/T Specialist. He is an experienced Lotus consultant specializing in administration, infrastructure, and security. Matthew has worked with numerous companies as a Lotus Software consultant and Lotus Tech Sales Specialist. He has co-authored an IBM Redbooks publication on Lotus security and an IBM Redpaper on Lotus Domino performance and has also published articles in Lotus Advisor. You can reach him at matthew_milza@us.ibm.com. |
記事の評価
|