Package net.sf.michaelo.tomcat.pac
Class Pac
- java.lang.Object
- 
- net.sf.michaelo.tomcat.pac.Pac
 
- 
 public class Pac extends Object A class representing thePAC Datastructure 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 PrivateSunPacSignatureVerifierwhich uses private Sun classes to perform the calculation.
- 
- 
Constructor SummaryConstructors Constructor Description Pac(byte[] pacDataBytes, PacSignatureVerifier signatureVerifier)Parses a PAC data object from a byte array.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description PacSignatureDatagetKdcSignature()KerbValidationInfogetKerbValidationInfo()PacClientInfogetPacClientInfo()PacSignatureDatagetServerSignature()UpnDnsInfogetUpnDnsInfo()voidverifySignature(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 Detail- 
loggerprotected final Log logger 
 
- 
 - 
Constructor Detail- 
Pacpublic Pac(byte[] pacDataBytes, PacSignatureVerifier signatureVerifier)Parses a PAC data object from a byte array.- Parameters:
- pacDataBytes- PAC data structure encoded as bytes
- signatureVerifier- a signature verifier implementation
- Throws:
- NullPointerException- if- infoBytesis null
- IllegalArgumentException- if- infoBytesis empty
- NullPointerException- if- signatureVerifieris null
- IllegalArgumentException- if PAC version is not 0
- IllegalArgumentException- if an embedded- PAC_INFO_BUFFERstructure offset is not a multiple of 8
- IllegalArgumentException- if any embedded structure is invalid
- IllegalArgumentException- 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 Detail- 
getKerbValidationInfopublic KerbValidationInfo getKerbValidationInfo() 
 - 
getUpnDnsInfopublic UpnDnsInfo getUpnDnsInfo() 
 - 
getPacClientInfopublic PacClientInfo getPacClientInfo() 
 - 
getServerSignaturepublic PacSignatureData getServerSignature() 
 - 
getKdcSignaturepublic PacSignatureData getKdcSignature() 
 - 
verifySignaturepublic void verifySignature(Key[] keys) throws SignatureException 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:
- PacSignatureVerifier
 
 
- 
 
-