クラス MiniKdc
java.lang.ObjectSE
org.springframework.security.kerberos.test.MiniKdc
Apache Directory サーバーに基づくミニ KDC。テストケースに埋め込むことも、スタンドアロン KDC としてコマンドラインから使用することもできます。
テストケース内から:
MiniKdc は起動時に 1 つのシステムプロパティを設定し、停止時に設定を解除します。
- sun.security.krb5.debug: 構成で指定されたデバッグ値に設定します
MiniKdc のデフォルト設定値は次のとおりです。
- org.name= 例 (used to create the REALM)
- org.domain=COM (used to create the REALM)
- kdc.bind.address= ローカルホスト
- kdc. ポート =0 (ephemeral port)
- インスタンス =DefaultKrbServer
- チケットの有効期間最大 8640 万 (1 日)
- 最大再生可能寿命 =604800000 (7 日)
- トランスポート =TCP
- デバッグ = 偽
フィールドのサマリー
フィールドコンストラクターの概要
コンストラクター方法の概要
修飾子と型メソッド説明static PropertiesSEMiniKdc のデフォルト設定を返す便利なメソッド。voidcreatePrincipal(FileSE keytabFile, StringSE... principals) KDC に複数のプリンシパルを作成し、キータブファイルに追加します。voidcreatePrincipal(StringSE principal, StringSE password) 指定されたユーザーとパスワードを使用して、KDC にプリンシパルを作成します。getHost()MiniKdc のホストを返します。intgetPort()MiniKdc のポートを返します。getRealm()MiniKdc の領域を返します。static voidvoidsetTransport(StringSE transport) voidstart()MiniKdc を起動します。voidstop()MiniKdc を停止します
フィールドの詳細
JAVA_SECURITY_KRB5_CONF
- 関連事項:
SUN_SECURITY_KRB5_DEBUG
- 関連事項:
ORG_NAME
- 関連事項:
ORG_DOMAIN
- 関連事項:
KDC_BIND_ADDRESS
- 関連事項:
KDC_PORT
- 関連事項:
INSTANCE
- 関連事項:
MAX_TICKET_LIFETIME
- 関連事項:
MIN_TICKET_LIFETIME
- 関連事項:
MAX_RENEWABLE_LIFETIME
- 関連事項:
TRANSPORT
- 関連事項:
DEBUG
- 関連事項:
コンストラクターの詳細
MiniKdc
MiniKdc を作成します。- パラメーター:
conf- MiniKdc 構成。workDir- 作業ディレクトリはビルドディレクトリである必要があります。このディレクトリに ApacheDS の作業ディレクトリが作成されます。このディレクトリは MiniKdc が停止すると削除されます。- 例外:
ExceptionSE- thrown if the MiniKdc could not be created.
メソッドの詳細
main
- 例外:
ExceptionSE
createConf
MiniKdc のデフォルト設定を返す便利なメソッド。The returned configuration is a copy, it can be customized before using it to create a MiniKdc.
- 戻り値:
- a MiniKdc default configuration.
setTransport
getPort
public int getPort()MiniKdc のポートを返します。- 戻り値:
- the port of the MiniKdc.
getHost
MiniKdc のホストを返します。- 戻り値:
- the host of the MiniKdc.
getRealm
MiniKdc の領域を返します。- 戻り値:
- the realm of the MiniKdc.
getKrb5conf
start
MiniKdc を起動します。- 例外:
ExceptionSE- thrown if the MiniKdc could not be started.
stop
public void stop()MiniKdc を停止しますcreatePrincipal
指定されたユーザーとパスワードを使用して、KDC にプリンシパルを作成します。- パラメーター:
principal- principal name, do not include the domain.password- パスワード。- 例外:
ExceptionSE- thrown if the principal could not be created.
createPrincipal
KDC に複数のプリンシパルを作成し、キータブファイルに追加します。- パラメーター:
keytabFile- keytab file to add the created principals.principals- principals to add to the KDC, do not include the domain.- 例外:
ExceptionSE- thrown if the principals or the keytab file could not be created.