com.ibm.as400.access
Class SecureAS400
- java.lang.Object
-
- com.ibm.as400.access.AS400
-
- com.ibm.as400.access.SecureAS400
-
- All Implemented Interfaces:
- java.io.Serializable
public class SecureAS400 extends AS400
Represents a secure system sign-on. Secure Sockets Layer (SSL) connections are used to provide encrypted communications. This function requires an SSL capable system at release V4R4 or later.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field and Description static boolean
changeCipherSuites
Indicate whether the cipher suites changed by the caller.static int
CLIENT_TO_PROXY_SERVER
Constant indicating that encryption should only be done on the connection between the client and the proxy server.static int
CLIENT_TO_SERVER
Constant indicating that encryption should be done in both the connection between the client and the proxy server and the connection between the proxy server and the system.static int
CLINT_TO_SERVER
Deprecated.Use CLIENT_TO_SERVER instead.static java.lang.String[]
newCipherSuites
static int
PROXY_SERVER_TO_SERVER
Constant indicating that encryption should only be done on the connection between the proxy server and the system.-
Fields inherited from class com.ibm.as400.access.AS400
aspName, AUTHENTICATION_SCHEME_DDM_EUSERIDPWD, AUTHENTICATION_SCHEME_GSS_TOKEN, AUTHENTICATION_SCHEME_IDENTITY_TOKEN, AUTHENTICATION_SCHEME_PASSWORD, AUTHENTICATION_SCHEME_PROFILE_TOKEN, bidiAS400Text, bidiAS400Varchar, CENTRAL, COMMAND, currentLib_, DATABASE, DATAQUEUE, FILE, GSS_OPTION_FALLBACK, GSS_OPTION_MANDATORY, GSS_OPTION_NONE, librariesForThread_, PRINT, RECORDACCESS, SIGNON, USE_PORT_MAPPER
-
-
Constructor Summary
Constructors Constructor and Description SecureAS400()
Constructs a SecureAS400 object.SecureAS400(AS400 system)
Constructs a SecureAS400 object.SecureAS400(java.lang.String systemName)
Constructs a SecureAS400 object.SecureAS400(java.lang.String systemName, ProfileTokenCredential profileToken)
Constructs a SecureAS400 object.SecureAS400(java.lang.String systemName, java.lang.String userId)
Constructs a SecureAS400 object.SecureAS400(java.lang.String systemName, java.lang.String userId, java.lang.String password)
Constructs a SecureAS400 object.SecureAS400(java.lang.String systemName, java.lang.String userId, java.lang.String password, java.lang.String proxyServer)
Constructs a SecureAS400 object.
-
Method Summary
Methods Modifier and Type Method and Description static void
addPasswordCacheEntry(java.lang.String systemName, java.lang.String userId, java.lang.String password)
Validates the user ID and password against the system, and if successful, adds the information to the password cache.static void
addPasswordCacheEntry(java.lang.String systemName, java.lang.String userId, java.lang.String password, java.lang.String proxyServer)
Validates the user ID and password against the system, and if successful, adds the information to the password cache.java.lang.String
getKeyRingName()
Deprecated.int
getProxyEncryptionMode()
Returns the proxy encryption mode.void
setEnabledCipherSuites(java.lang.String[] suites)
void
setKeyRingName(java.lang.String keyRingName)
Sets the key ring class name used for SSL communications with the system.void
setKeyRingName(java.lang.String keyRingName, java.lang.String keyRingPassword)
Sets the key ring class name used for SSL communications with the system.void
setKeyRingPassword(java.lang.String keyRingPassword)
Deprecated.void
setProxyEncryptionMode(int proxyEncryptionMode)
Sets the proxy encryption mode.-
Methods inherited from class com.ibm.as400.access.AS400
addConnectionListener, addPropertyChangeListener, addVetoableChangeListener, arePropertiesFrozen, authenticate, canUseNativeOptimizations, changePassword, clearPasswordCache, clearPasswordCache, connectService, connectService, connectToPort, connectToPort, disconnectAllServices, disconnectService, generateProfileToken, generateVRM, getAuthenticationScheme, getBidiStringType, getCcsid, getDDMRDB, getDefaultSignonHandler, getDefaultTimeZone, getDefaultUser, getGSSName, getGSSOption, getImpl, getJobCCSIDEncoding, getJobs, getLocale, getModification, getNLV, getPasswordExpirationDate, getPasswordExpirationDays, getPasswordExpirationWarningDays, getPreviousSignonDate, getProfileToken, getProfileToken, getProfileToken, getProfileToken, getProxyServer, getRelease, getServerName, getServicePort, getSignonDate, getSignonHandler, getSocketProperties, getSystemName, getSystemPasswordExpirationWarningDays, getSystemTimeZone, getTimeZone, getUserId, getUserId, getvalidateSignonTimeOut, getVersion, getVRM, initializeConverter, isConnected, isConnected, isConnectionAlive, isConnectionAlive, isGuiAvailable, isInPasswordExpirationWarningDays, isLocal, isMustAddLanguageLibrary, isMustUseNetSockets, isMustUseSockets, isMustUseSuppliedProfile, isShowCheckboxes, isThreadUsed, isTurkish, isUseDefaultUser, isUsePassphrase, isUsePasswordCache, passwordLevel, removeConnectionListener, removeDefaultUser, removePasswordCacheEntry, removePropertyChangeListener, removeVetoableChangeListener, resetAllServices, setBidiStringType, setCcsid, setDDMRDB, setDefaultSignonHandler, setDefaultUser, setGSSCredential, setGSSManager, setGSSName, setGSSOption, setGuiAvailable, setIASPGroup, setIASPGroup, setIASPGroup, setIASPGroup, setIdentityToken, setLocale, setLocale, setMustAddLanguageLibrary, setMustUseNetSockets, setMustUseSockets, setMustUseSuppliedProfile, setPassword, setPasswordExpirationWarningDays, setProfileToken, setProxyServer, setServicePort, setServicePortsToDefault, setShowCheckboxes, setSignonHandler, setSocketProperties, setSystemName, setThreadUsed, setUseDefaultUser, setUsePasswordCache, setUserId, setUseSystemPasswordExpirationWarningDays, setvalidateSignonTimeOut, toString, validateSignon, validateSignon, validateSignon
-
-
-
-
Field Detail
-
CLIENT_TO_PROXY_SERVER
public static final int CLIENT_TO_PROXY_SERVER
Constant indicating that encryption should only be done on the connection between the client and the proxy server.- See Also:
- Constant Field Values
-
PROXY_SERVER_TO_SERVER
public static final int PROXY_SERVER_TO_SERVER
Constant indicating that encryption should only be done on the connection between the proxy server and the system.- See Also:
- Constant Field Values
-
CLINT_TO_SERVER
public static final int CLINT_TO_SERVER
Deprecated. Use CLIENT_TO_SERVER instead.- See Also:
- Constant Field Values
-
CLIENT_TO_SERVER
public static final int CLIENT_TO_SERVER
Constant indicating that encryption should be done in both the connection between the client and the proxy server and the connection between the proxy server and the system.- See Also:
- Constant Field Values
-
changeCipherSuites
public static boolean changeCipherSuites
Indicate whether the cipher suites changed by the caller. We add this for iNav.
-
newCipherSuites
public static java.lang.String[] newCipherSuites
-
-
Constructor Detail
-
SecureAS400
public SecureAS400()
Constructs a SecureAS400 object.
-
SecureAS400
public SecureAS400(java.lang.String systemName)
Constructs a SecureAS400 object. It uses the specified system name.- Parameters:
systemName
- The name of the system.
-
SecureAS400
public SecureAS400(java.lang.String systemName, java.lang.String userId)
Constructs a SecureAS400 object. It uses the specified system name and user ID. When the sign-on prompt is displayed, the user is able to specify the password. Note that the user ID may be overridden.- Parameters:
systemName
- The name of the system.userId
- The user profile name to use to authenticate to the system.
-
SecureAS400
public SecureAS400(java.lang.String systemName, ProfileTokenCredential profileToken)
Constructs a SecureAS400 object. It uses the specified system name and profile token.- Parameters:
systemName
- The name of the system. Use localhost to access data locally.profileToken
- The profile token to use to authenticate to the system.
-
SecureAS400
public SecureAS400(java.lang.String systemName, java.lang.String userId, java.lang.String password)
Constructs a SecureAS400 object. It uses the specified system name, user ID, and password. No sign-on prompt is displayed unless the sign-on fails.- Parameters:
systemName
- The name of the system.userId
- The user profile name to use to authenticate to the system.password
- The user profile password to use to authenticate to the system.
-
SecureAS400
public SecureAS400(java.lang.String systemName, java.lang.String userId, java.lang.String password, java.lang.String proxyServer)
Constructs a SecureAS400 object. It uses the specified system, user ID, and password. No sign-on prompt is displayed unless the sign-on fails.- Parameters:
systemName
- The name of the system.userId
- The user profile name to use to authenticate to the system.password
- The user profile password to use to authenticate to the system.proxyServer
- The name and port in the formatserverName[:port]
. If no port is specified, a default will be used.
-
SecureAS400
public SecureAS400(AS400 system)
Constructs a SecureAS400 object. It uses the same system name and user ID. This does not create a clone. The new SecureAS400 object has the same behavior, but results in a new set of socket connections.- Parameters:
system
- A previously instantiated AS400 or SecureAS400 object.
-
-
Method Detail
-
addPasswordCacheEntry
public static void addPasswordCacheEntry(java.lang.String systemName, java.lang.String userId, java.lang.String password) throws AS400SecurityException, java.io.IOException
Validates the user ID and password against the system, and if successful, adds the information to the password cache.- Parameters:
systemName
- The name of the system.userId
- The user profile name.password
- The user profile password.- Throws:
AS400SecurityException
- If a security or authority error occurs.java.io.IOException
- If an error occurs while communicating with the system.
-
addPasswordCacheEntry
public static void addPasswordCacheEntry(java.lang.String systemName, java.lang.String userId, java.lang.String password, java.lang.String proxyServer) throws AS400SecurityException, java.io.IOException
Validates the user ID and password against the system, and if successful, adds the information to the password cache.- Parameters:
systemName
- The name of the system.userId
- The user profile name.password
- The user profile password.proxyServer
- The name and port in the formatserverName[:port]
. If no port is specified, a default will be used.- Throws:
AS400SecurityException
- If a security or authority error occurs.java.io.IOException
- If an error occurs while communicating with the system.
-
getKeyRingName
public java.lang.String getKeyRingName()
Deprecated.Returns the key ring class name used for SSL communications with the system. The class com.ibm.as400.access.KeyRing is the default and will be returned if not overridden.- Returns:
- The key ring class name.
-
getProxyEncryptionMode
public int getProxyEncryptionMode()
Returns the proxy encryption mode. The proxy encryption mode specifies which portions of the communications between the client, proxy server, and IBM i system are encrypted.- Returns:
- The proxy encryption mode.
-
setKeyRingName
public void setKeyRingName(java.lang.String keyRingName) throws java.beans.PropertyVetoException
Sets the key ring class name used for SSL communications with the system. This method is no longer supported because sslight is not longer supported.- Parameters:
keyRingName
- The key ring class name.- Throws:
java.beans.PropertyVetoException
- If any of the registered listeners vetos the property change.
-
setKeyRingName
public void setKeyRingName(java.lang.String keyRingName, java.lang.String keyRingPassword) throws java.beans.PropertyVetoException
Sets the key ring class name used for SSL communications with the system. This method is no longer available since support for sslight has been removed.- Parameters:
keyRingName
- The key ring class name.keyRingPassword
- The password for the key ring class.- Throws:
java.beans.PropertyVetoException
- If any of the registered listeners vetos the property change.
-
setKeyRingPassword
public void setKeyRingPassword(java.lang.String keyRingPassword)
Deprecated.Sets the key ring password used for SSL communications with the system.- Parameters:
keyRingPassword
- The password for the key ring class.
-
setProxyEncryptionMode
public void setProxyEncryptionMode(int proxyEncryptionMode) throws java.beans.PropertyVetoException
Sets the proxy encryption mode. The proxy encryption mode specifies which portions of the communications between the client, proxy server, and IBM i system are encrypted. The default is to encrypt all communications. This value is ignored if a proxy server is not used.
Valid proxy encryption modes are:CLIENT_TO_PROXY_SERVER
- encrypt between client and proxy server.PROXY_SERVER_TO_SERVER
- encrypt between proxy server and IBM i system.CLIENT_TO_SERVER
- encrypt both portions of connection.- Parameters:
proxyEncryptionMode
- The proxy encryption mode.- Throws:
java.beans.PropertyVetoException
- If any of the registered listeners vetos the property change.
-
setEnabledCipherSuites
public void setEnabledCipherSuites(java.lang.String[] suites)
-
-