KeyTab
KeyTab (키탭 파일)
키탭(keytab) 파일을 캡슐화하는 클래스입니다.
본문
키탭 파일에서 장기 비밀 키를 얻는 Kerberos JAAS 로그인 모듈은 이 클래스를 사용해야 합니다. 로그인 모듈은 인증 과정의 커밋 단계에서 이 클래스의 인스턴스를 Subject의 비밀 자격증명 집합에 저장해요.
getUnboundInstance()나 getUnboundInstance(File)로 얻은 KeyTab 객체는 비결속(unbound) 상태라서 어떤 서비스 프린시펄이든 사용할 수 있습니다. 반면 getInstance(KerberosPrincipal)이나 getInstance(KerberosPrincipal, File)로 얻은 객체는 특정 서비스 프린시펄에 결속되어 그 주체만 사용할 수 있어요.
getInstance()와 getInstance(File) 생성자는 비결속 키탭을 지원하지 않던 시절에 만들어진 것으로 더 이상 사용하면 안 됩니다. 이 두 메서드로 만든 객체는 알 수 없는 주체에 결속된 것으로 간주되어 isBound()는 true를, getPrincipal()은 null을 반환해요.
애플리케이션이 Subject에서 KeyTab 인스턴스에 접근하려면 PrivateCredentialPermission이 필요할 수 있고, 기본 JGSS Kerberos 메커니즘으로 접근할 때는 적절한 ServicePermission이 필요합니다. 키탭 파일 형식은 http://www.ioplex.com/utilities/keytab.txt 에 설명되어 있어요.
public static KeyTab getInstance(KerberosPrincipal principal)
public static KeyTab getInstance(KerberosPrincipal principal, File file)
public static KeyTab getUnboundInstance()
public static KeyTab getUnboundInstance(File file)
public KerberosPrincipal getPrincipal()
public boolean isBound()
public EncryptionKey[] getKeys(KerberosPrincipal principal)
public EncryptionKey[] getKeys(KerberosPrincipal principal, int version)
public boolean isKrb5()
public void close()