Package com.isode.dsapi.profile
Class SASLParametersProfile
java.lang.Object
com.isode.dsapi.SASLParameters
com.isode.dsapi.profile.SASLParametersProfile
When stored in a BindProfile file, callback parameters will only be written in encrypted form. If no passphrase is associated with the file, then no callback parameters will be written at all.
If a BindProfile file is loaded without a passphrase having been specified (e.g. a "read-only" BindProfileList), then any callback parameters that happen to be stored in the file will not be loaded from it (since it will not be possible to decrypt them).
- Since:
- 16.1 (extracted from SASLPArameters 14.6 internal)
- Author:
- mst
-
Nested Class Summary
Nested classes/interfaces inherited from class com.isode.dsapi.SASLParameters
SASLParameters.SSF
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
The tag that is used to bracket SASLParameters when they're stored as XML.Fields inherited from class com.isode.dsapi.SASLParameters
BEST_SSF, callbackParams, mechanisms, properties, SASL_AUTHNAME, SASL_OAUTHBEARER, SASL_REALM, SASL_SECRET
-
Constructor Summary
ConstructorsConstructorDescriptionConstruct a new object by copying another (so that subsequent changes to the original object won't affect this one).Construct a new object by copying another (so that subsequent changes to the original object won't affect this one).SASLParametersProfile
(com.isode.util.XMLInput xmlInput) Create a SASLParameters object from an XML input stream.SASLParametersProfile
(String saslMechs) Create a new SASLParametersProfile object specifying nothing but one or more mechanism names. -
Method Summary
Modifier and TypeMethodDescriptionvoid
decryptSensitiveData
(String passphrase, String encryptionAlgorithm, String hashAlgorithm) This method will decrypt any sensitive data in the object.void
encryptSensitiveData
(String passphrase, String encryptionAlgorithm, String hashAlgorithm) This method will encrypt any sensitive data in the object.void
writeXML
(com.isode.util.XMLOutput xmlOutput) Write information about a this object to an XMLOutput stream.Methods inherited from class com.isode.dsapi.SASLParameters
deleteOAuth2AuthorizePort, deleteOAuth2ClientId, deleteOAuth2ClientRedirect, deleteOAuth2ClientSecret, deleteOAuth2Server, deleteOAuth2TokenPort, equals, getActualSSF, getADCompatibility, getCallbackParameter, getForwardSecrecy, getMaxBufferSize, getMechanismsSet, getMechanismsString, getNoActive, getNoAnonymous, getNoDictionary, getNoPlaintext, getOAuth2AuthorizePort, getOAuth2ClientId, getOAuth2ClientRedirect, getOAuth2ClientSecret, getOAuth2RefreshToken, getOAuth2Server, getOAuth2TokenPort, getPassCredentials, getSSF, hashCode, removeCallbackParameter, setADCompatibility, setCallbackParameter, setForwardSecrecy, setMaxBufferSize, setMechanisms, setNoActive, setNoAnonymous, setNoDictionary, setNoPlaintext, setOAuth2AuthorizePort, setOAuth2ClientId, setOAuth2ClientRedirect, setOAuth2ClientSecret, setOAuth2RefreshToken, setOAuth2Server, setOAuth2TokenPort, setPassCredentials, setSSF, toString
-
Field Details
-
xmlTag
The tag that is used to bracket SASLParameters when they're stored as XML.- See Also:
-
-
Constructor Details
-
SASLParametersProfile
Create a new SASLParametersProfile object specifying nothing but one or more mechanism names.- Parameters:
saslMechs
- must not benull
. If more than one mechanism is specified, the names should be space separated, e.g."GSSAPI NTLM"
- Throws:
BadValueException
- when mechanisms string doesn't contain at least one correct SASL mechanism name or there are unknown names.
-
SASLParametersProfile
Construct a new object by copying another (so that subsequent changes to the original object won't affect this one).- Parameters:
other
- another object (notnull
)
-
SASLParametersProfile
Construct a new object by copying another (so that subsequent changes to the original object won't affect this one).- Parameters:
other
- another object (notnull
)
-
SASLParametersProfile
Create a SASLParameters object from an XML input stream. It is assumed that xmlInput is positioned at the start of the data for the SASLParameters.This method must work in a consistent way to
writeXML(XMLOutput)
- Parameters:
xmlInput
- an XMLInput object that is positioned at the start of data for a SASLParameters.- Throws:
SAXException
- if an error occurs when attempting to parse the SASLParameters from the XML- See Also:
-
-
Method Details
-
writeXML
Write information about a this object to an XMLOutput stream. The way this method works must be consistent withSASLParametersProfile(XMLInput)
.- Parameters:
xmlOutput
- XMLOutput stream- Throws:
IOException
- if an error occurred when writing to the fileNativeLibraryException
-
encryptSensitiveData
public void encryptSensitiveData(String passphrase, String encryptionAlgorithm, String hashAlgorithm) throws NativeLibraryException This method will encrypt any sensitive data in the object. Specifically, it encrypts all values in the "callbackParams" and puts the encrypted values in "encryptedCallbackParams".This method is called by the BindProfileList when it is about to save data to disk.
- Parameters:
passphrase
- passphrase to use for encryption. Must not benull
.encryptionAlgorithm
- encryption algorithmhashAlgorithm
- hash algorithm- Throws:
NativeLibraryException
- if an unrecoverable error occurs in the native library
-
decryptSensitiveData
public void decryptSensitiveData(String passphrase, String encryptionAlgorithm, String hashAlgorithm) throws NativeLibraryException This method will decrypt any sensitive data in the object. Specifically, it decrypts all values in the "toBeDecryptedCallbackParams" and puts the decrypted values in "callbackParams".This method is called by the BindProfileList after it's read a BindProfile file and knows what the encryption algorithms etc. are.
- Parameters:
passphrase
- passphrase for decryption. Must not benull
.encryptionAlgorithm
- encryption algorithm to usehashAlgorithm
- hash algorithm to use- Throws:
NativeLibraryException
- if an unrecoverable error occurs in the native library.
-