Package net.sf.michaelo.tomcat.pac
Class Pac
java.lang.Object
net.sf.michaelo.tomcat.pac.Pac
A class representing the
PAC
Data structure from MS-PAC. This implementation only parses the embedded structures which are required for the
purpose of this component, everything else is skipped.
Important: It is imperative to pass a suitable signature verifier implementation and the long
term Kerberos keys for the principal from the keytab which were used to establish the security context. The simplest
implementation is the PrivateSunPacSignatureVerifier which uses private Sun classes to perform the
calculation.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionPac(byte[] pacDataBytes, PacSignatureVerifier signatureVerifier) Parses a PAC data object from a byte array. -
Method Summary
Modifier and TypeMethodDescriptionvoidverifySignature(Key[] keys) Verifies the server signature of this PAC data structure with zeroed server and KDC signature values with the supplied long term Kerberos keys.
-
Field Details
-
logger
-
-
Constructor Details
-
Pac
Parses a PAC data object from a byte array.- Parameters:
pacDataBytes- PAC data structure encoded as bytessignatureVerifier- a signature verifier implementation- Throws:
NullPointerException- ifinfoBytesis nullIllegalArgumentException- ifinfoBytesis emptyNullPointerException- ifsignatureVerifieris nullIllegalArgumentException- if PAC version is not 0IllegalArgumentException- if an embeddedPAC_INFO_BUFFERstructure offset is not a multiple of 8IllegalArgumentException- if any embedded structure is invalidIllegalArgumentException- if any of the required embedded structures (KERB_VALIDATION_INFO,PAC_CLIENT_INFO,PAC_SIGNATURE_DATA(Server Signature),PAC_SIGNATURE_DATA(KDC Signature)) is not present
-
-
Method Details
-
getKerbValidationInfo
-
getUpnDnsInfo
-
getPacClientInfo
-
getServerSignature
-
getKdcSignature
-
verifySignature
Verifies the server signature of this PAC data structure with zeroed server and KDC signature values with the supplied long term Kerberos keys.- Parameters:
keys- an array of long term Kerberos keys for the principal from the keytab which was used to establish the security context- Throws:
SignatureException- if the signature validation fails with all supplied keys- See Also:
-