Package com.ibm.mq
Class MQConnectionSecurityParameters
java.lang.Object
com.ibm.mq.jmqi.JmqiObject
com.ibm.mq.MQConnectionSecurityParameters
public class MQConnectionSecurityParameters
extends com.ibm.mq.jmqi.JmqiObject
This class is a representation of the MQCSP structure. It is used to enable the Object Authority
Manager (OAM) to authenticate a user and change appropriate identity context fields.
In the IBM MQ Java client, this field can be set only from within a Security channel exit.
When the exit is invoked, the reference to this class in
MQChannelExit will
be null. The exit can replace this with an MQConnectionSecurityParameters object defined by the
exit. For example:
public byte[] securityExit(MQChannelExit channelExitParms, MQChannelDefinition channelDefinition,
byte[] agentBuffer) {
// ... other code ...
MQConnectionSecurityParameters csp = new MQConnectionSecurityParameters();
csp.setCSPUserId("myID");
csp.setCSPPassword("myPassword");
csp.setAuthenticationType(MQC.MQCSP_AUTH_USER_ID_AND_PWD);
channelExitParms.setMQCSP(csp);
}
If the reference is not null when the exit completes, then the information in the MQConnectionSecurityParameters object created by the Exit will be sent to the queue manager.
Data must be in the character set and encoding of the local queue manager; these are given by the CodedCharSetId queue-manager attribute and MQENC_NATIVE, respectively.
-
Field Summary
Fields inherited from class com.ibm.mq.jmqi.JmqiObject
COMP_JM, COMP_JN, COMP_JO -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintThis method returns the authentication method to be used by the Object Authority Manager (OAM).It will be eitherMQCSP_AUTH_NONEorMQCSP_AUTH_USER_ID_AND_PWD.This method returns the defined MQCSP password.This method returns the defined MQCSP user ID.This method returns the defined Initial Key.voidsetAuthenticationType(int i) Sets the authentication method to be used by the Object Authority Manager (OAM).voidsetCSPPassword(String password) Sets a String to be used as the MQCSP password.voidsetCSPUserId(String id) Sets a String to be used as the MQCSP user ID.voidsetInitialKey(String initialKey) Sets a String to be used as the Initial Key.Methods inherited from class com.ibm.mq.jmqi.JmqiObject
getJmqiEnvironment
-
Constructor Details
-
MQConnectionSecurityParameters
public MQConnectionSecurityParameters()
-
-
Method Details
-
setAuthenticationType
public void setAuthenticationType(int i) Sets the authentication method to be used by the Object Authority Manager (OAM). It can be eitherMQCSP_AUTH_NONEorMQCSP_AUTH_USER_ID_AND_PWD. Any other value is interpreted as MQCSP_AUTH_NONE.The initial value of this field is MQCSP_AUTH_NONE.
- Parameters:
i- The authentication type to set
-
getAuthenticationType
public int getAuthenticationType()This method returns the authentication method to be used by the Object Authority Manager (OAM).It will be eitherMQCSP_AUTH_NONEorMQCSP_AUTH_USER_ID_AND_PWD.The initial value of this field is MQCSP_AUTH_NONE
- Returns:
- the current authenticationType
-
setCSPUserId
Sets a String to be used as the MQCSP user ID. If the authentication type is set toMQCSP_AUTH_USER_ID_AND_PWDthen this will be passed to the Object Authority Manager (OAM) for authentication.The initial value of this field is null.
- Parameters:
id- the user ID
-
getCSPUserId
This method returns the defined MQCSP user ID.- Returns:
- the MQCSP user ID
-
setCSPPassword
Sets a String to be used as the MQCSP password. If the authentication type is set toMQCSP_AUTH_USER_ID_AND_PWDthen this will be passed to the Object Authority Manager (OAM) for authentication.The initial value of this field is null.
- Parameters:
password- The MQCSP password
-
getCSPPassword
This method returns the defined MQCSP password.- Returns:
- the MQCSP password
-
setInitialKey
Sets a String to be used as the Initial Key.The initial value of this field is null.
- Parameters:
initialKey- password The Initial Key
-
getInitialKey
This method returns the defined Initial Key.- Returns:
- the Initial Key
-