クラス 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) Creates a principal in the KDC with the specified user and password.getHost()Returns the host of the MiniKdc.intgetPort()Returns the port of the MiniKdc.getRealm()Returns the realm of the MiniKdc.static voidvoidsetTransport(StringSE transport) voidstart()Starts the MiniKdc.voidstop()Stops the 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- working directory, it should be the build directory. Under this directory an ApacheDS working directory will be created, this directory will be deleted when the MiniKdc stops.- 例外:
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()Returns the port of the MiniKdc.- 戻り値:
- the port of the MiniKdc.
getHost
Returns the host of the MiniKdc.- 戻り値:
- the host of the MiniKdc.
getRealm
Returns the realm of the MiniKdc.- 戻り値:
- the realm of the MiniKdc.
getKrb5conf
start
Starts the MiniKdc.- 例外:
ExceptionSE- thrown if the MiniKdc could not be started.
stop
public void stop()Stops the MiniKdccreatePrincipal
Creates a principal in the KDC with the specified user and password.- パラメーター:
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.