public class SomManagementWs extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SomManagementWs.BatchInfo |
static class |
SomManagementWs.ErrorCodes |
static class |
SomManagementWs.ManagementWSFault |
static class |
SomManagementWs.SessionCleanUp |
Constructor and Description |
---|
SomManagementWs() |
Modifier and Type | Method and Description |
---|---|
void |
addActivationData(String userID,
Date validUntil)
Sets activation data for the referenced user with the validity
until @param validUntil.
|
boolean |
addUser(String userID)
Adds the user with @param userID to the database.
|
boolean |
deleteActivationData(String userID)
Deletes the activation data of the referenced user.
|
boolean |
deleteToken(String tokenSnr)
Deletes the referenced token from the SOM token table.
|
boolean |
deregisterToken(String tokenSnr)
Deregisters a user from a token.
|
List<ImpexToken> |
exportTokens(String sessionID)
This function allows device export.
|
SomManagementWs.BatchInfo |
getBatchInfo(String sessionID,
byte[] masterTransportCertificate)
Returns an object with information about current exported token batch.
|
String[] |
getLockReasons()
Retrieves the configured (hard coded) lock reasons.
|
Token |
getToken(String tokenSnr)
Gets token information.
|
Token |
getTokenByUserID(String userID)
Gets token information by @param userID.
|
List<Token> |
getTokens(com.kobil.ssms.kernel.presentation.b2b.RangeInput rangeInput,
com.kobil.ssms.kernel.logic.pagination.OrderInput orderInput,
Holder<com.kobil.ssms.kernel.presentation.b2b.Pagination> pagination)
Returns a list of all token that are stored in the database without secret information.
|
SOMUserInfo |
getUser(String userID)
Returns the requested user info object, if it exists in the database.
|
void |
importToken(String sessionID,
ImpexToken token)
Inserts a single token with the token data stored in @param token.
|
void |
initTokenImportBatch(String sessionID,
String batchID,
byte[] encryptedTransportKey,
byte[] encryptionCertificate)
Sets the batch header information for a certain session
defined by @param sessionID.
|
boolean |
lockToken(String tokenSnr,
String lockReason)
Sets the state of the referenced token from unlocked to locked
with the specified lock reason.
|
boolean |
registerToken(String tokenSnr,
String userID)
Registers a user to a token.
|
void |
releaseSession(String sessionID)
Releases a session referenced by sessionID, so no further
requests with this sessionID are accepted.
|
boolean |
removeUser(String userID)
Removes the user with @param userID from the database.
|
String |
startTokenExportSession()
Starts the export session.
|
String |
startTokenImportSession(byte[] masterTransportKeyPassword)
Opens the master transport encryption key using the submitted pass phrase.
|
boolean |
unlockToken(String tokenSnr)
Sets the state of the referenced token from locked to unlocked.
|
public String startTokenImportSession(byte[] masterTransportKeyPassword) throws SomManagementWs.ManagementWSFault
masterTransportKeyPassword
- The password of the masterTransportKey.SomManagementWs.ManagementWSFault
- SomManagementWs.ErrorCodes.PERMISSION_DENIED
if the permission is denied.
SomManagementWs.ErrorCodes.INTERNAL_SERVER_ERROR
if an internal error occurred.
SomManagementWs.ErrorCodes.INVALID_MASTERTRANSPORTKEYPASSWORD
if masterTransportKeyPassword is not set.public void initTokenImportBatch(String sessionID, String batchID, byte[] encryptedTransportKey, byte[] encryptionCertificate) throws SomManagementWs.ManagementWSFault
sessionID
- The ID of the associated session.batchID
- The ID of the batch operation.encryptedTransportKey
- The encrypted transport key.encryptionCertificate
- The encrypted certificate.SomManagementWs.ManagementWSFault
- SomManagementWs.ErrorCodes.PERMISSION_DENIED
if the permission is denied.
SomManagementWs.ErrorCodes.INTERNAL_SERVER_ERROR
if an internal error occurred.
SomManagementWs.ErrorCodes.INVALID_BATCHID
if batchID is not set.
SomManagementWs.ErrorCodes.SESSION_ID_UNKNOWN
if no according session does exist.
SomManagementWs.ErrorCodes.INVALID_ENCRYPTED_TRANSPORT_KEY
if encryptedTransportKey is not set.
SomManagementWs.ErrorCodes.ERROR_DECRYPTING_TRANSPORT_KEY
if encryptedTransportKey cannot be decrypted.public void importToken(String sessionID, ImpexToken token) throws SomManagementWs.ManagementWSFault
sessionID
- The ID of the associated session.token
- The token you are importing.SomManagementWs.ManagementWSFault
- SomManagementWs.ErrorCodes.PERMISSION_DENIED
if the permission is denied.
SomManagementWs.ErrorCodes.INTERNAL_SERVER_ERROR
if an internal error occurred.
SomManagementWs.ErrorCodes.INCOMPLETE_TOKENDATA
if the token does not contain all mandatory values.
SomManagementWs.ErrorCodes.SESSION_ID_UNKNOWN
if no according session does exist.
SomManagementWs.ErrorCodes.INVALID_BATCHID
if batchID is not set.
SomManagementWs.ErrorCodes.TOKEN_HEADER_BATCHID_MISMATCH
if the batch id does not match the current session.
SomManagementWs.ErrorCodes.INVALID_ENCRYPTED_TRANSPORT_KEY
if the encryption transport key is not set.
SomManagementWs.ErrorCodes.ERROR_DECRYPTING_MASTER_SECRET_KEY
if the decryption of the master secret key fails.
SomManagementWs.ErrorCodes.TOKEN_IMPORT_MASTERKEY_CHECKSUM_INVALID_ERROR
if calculated DeviceUniqueKeyChecksum is not equal to imported DeviceUniqueKeyChecksum.
SomManagementWs.ErrorCodes.TOKEN_IMPORT_MASTERKEY_CHECKSUM_PARAMETER_ERROR
if CipherType or DeviceUniqueKeyChecksum are invalid.
SomManagementWs.ErrorCodes.TOKEN_ALREADY_EXISTS
if the token exists already.public void releaseSession(String sessionID) throws SomManagementWs.ManagementWSFault
sessionID
- The ID of the associated session.SomManagementWs.ManagementWSFault
- SomManagementWs.ErrorCodes.PERMISSION_DENIED
if the permission is denied.
SomManagementWs.ErrorCodes.INTERNAL_SERVER_ERROR
if an internal error occurred.public boolean registerToken(String tokenSnr, String userID) throws SomManagementWs.ManagementWSFault
tokenSnr
- The unique serial number of the token.userID
- The unique userID for the user.true
if the assignment was successful. false
if the token was already assigned to this user.SomManagementWs.ManagementWSFault
- SomManagementWs.ErrorCodes.PERMISSION_DENIED
if the permission is denied.
SomManagementWs.ErrorCodes.INTERNAL_SERVER_ERROR
if an internal error occurred.
SomManagementWs.ErrorCodes.INVALID_TOKENSNR
if the format of the token serial number is invalid.
SomManagementWs.ErrorCodes.INVALID_USERID
if the format of the user id is invalid.
SomManagementWs.ErrorCodes.INCOMPLETE_TOKENDATA
if the token contains inconsistent data.
SomManagementWs.ErrorCodes.TOKEN_DOES_NOT_EXIST
if the token does not exist.
SomManagementWs.ErrorCodes.USER_DOES_NOT_EXIST
if the user does not exist.
SomManagementWs.ErrorCodes.TOKEN_ALREADY_ASSIGNED_TO_USER
if the token is already assigned to another user.
SomManagementWs.ErrorCodes.USER_ALREADY_HAS_MAX_NUMBER_OF_TOKENS
if the user already has reached the maximum number of token.public boolean deregisterToken(String tokenSnr) throws SomManagementWs.ManagementWSFault
tokenSnr
- The unique serial number of the token.true
if user and token are not assigned anymore. false
if token and user were not assigned before.SomManagementWs.ManagementWSFault
- SomManagementWs.ErrorCodes.PERMISSION_DENIED
if the permission is denied.
SomManagementWs.ErrorCodes.INTERNAL_SERVER_ERROR
if an internal error occurred.
SomManagementWs.ErrorCodes.INVALID_TOKENSNR
if the format of the token serial number is invalid.
SomManagementWs.ErrorCodes.INCOMPLETE_TOKENDATA
if the token contains inconsistent data.
SomManagementWs.ErrorCodes.TOKEN_DOES_NOT_EXIST
if the token does not exist.public boolean lockToken(String tokenSnr, String lockReason) throws SomManagementWs.ManagementWSFault
tokenSnr
- The unique serial number of the token.lockReason
- The reason for locking the token.true
if the token was set from unlocked to locked. false
if the token was already in state locked.SomManagementWs.ManagementWSFault
- SomManagementWs.ErrorCodes.PERMISSION_DENIED
if the permission is denied.
SomManagementWs.ErrorCodes.INTERNAL_SERVER_ERROR
if an internal error occurred.
SomManagementWs.ErrorCodes.INVALID_TOKENSNR
if the format of the token serial number is invalid.
SomManagementWs.ErrorCodes.INVALID_LOCK_REASON
if the lock reason is null, empty, unknown or one of the system defined lock reason.
SomManagementWs.ErrorCodes.INCOMPLETE_TOKENDATA
if the token contains inconsistent data.
SomManagementWs.ErrorCodes.TOKEN_DOES_NOT_EXIST
if the token does not exist.public boolean unlockToken(String tokenSnr) throws SomManagementWs.ManagementWSFault
tokenSnr
- The unique serial number of the token.true
if the token was set from locked to unlocked. false
if the token was already in state unlocked.SomManagementWs.ManagementWSFault
- SomManagementWs.ErrorCodes.PERMISSION_DENIED
if the permission is denied.
SomManagementWs.ErrorCodes.INTERNAL_SERVER_ERROR
if an internal error occurred.
SomManagementWs.ErrorCodes.INVALID_TOKENSNR
if the format of the token serial number is invalid.
SomManagementWs.ErrorCodes.INCOMPLETE_TOKENDATA
if the token contains inconsistent data.
SomManagementWs.ErrorCodes.TOKEN_DOES_NOT_EXIST
if the token does not exist.public String[] getLockReasons() throws SomManagementWs.ManagementWSFault
SomManagementWs.ManagementWSFault
- SomManagementWs.ErrorCodes.PERMISSION_DENIED
if the permission is denied.
SomManagementWs.ErrorCodes.INTERNAL_SERVER_ERROR
if an internal error occurred.public boolean deleteToken(String tokenSnr) throws SomManagementWs.ManagementWSFault
tokenSnr
- The unique serial number of the token.true
if the token was successfully deleted. false
if no deletion took place (no such token found to delete).SomManagementWs.ManagementWSFault
- SomManagementWs.ErrorCodes.PERMISSION_DENIED
if the permission is denied.
SomManagementWs.ErrorCodes.INTERNAL_SERVER_ERROR
if an internal error occurred.
SomManagementWs.ErrorCodes.INVALID_TOKENSNR
if the format of the token serial number is invalid.
SomManagementWs.ErrorCodes.INCOMPLETE_TOKENDATA
if the token contains inconsistent data.public List<Token> getTokens(com.kobil.ssms.kernel.presentation.b2b.RangeInput rangeInput, com.kobil.ssms.kernel.logic.pagination.OrderInput orderInput, Holder<com.kobil.ssms.kernel.presentation.b2b.Pagination> pagination) throws SomManagementWs.ManagementWSFault
rangeInput
- - RangeInput object with information about range with "from" and "limit" values orderInput
- - OrderInput object with information about sorting field name and direction pagination
- - Holder for Pagination with information about range and order.
range is an object with "from", "limit" and "moreExist" values Token
objects.SomManagementWs.ManagementWSFault
- SomManagementWs.ErrorCodes.PERMISSION_DENIED
if the permission is denied.
SomManagementWs.ErrorCodes.INTERNAL_SERVER_ERROR
if an internal error occurred.
SomManagementWs.ErrorCodes.INCOMPLETE_TOKENDATA
if one of the token contains inconsistent data.public Token getToken(String tokenSnr) throws SomManagementWs.ManagementWSFault
tokenSnr
- The unique serial number of the token.Token
object with the specified token serial number.SomManagementWs.ManagementWSFault
- SomManagementWs.ErrorCodes.PERMISSION_DENIED
if the permission is denied.
SomManagementWs.ErrorCodes.INTERNAL_SERVER_ERROR
if an internal error occurred.
SomManagementWs.ErrorCodes.INCOMPLETE_TOKENDATA
if one of the token contains inconsistent data.
SomManagementWs.ErrorCodes.TOKEN_DOES_NOT_EXIST
if the format of the token serial number is invalid.
public Token getTokenByUserID(String userID) throws SomManagementWs.ManagementWSFault
userID
- The unique userID for the user.Token
object assigned to the specified user.SomManagementWs.ManagementWSFault
- SomManagementWs.ErrorCodes.PERMISSION_DENIED
if the permission is denied.
SomManagementWs.ErrorCodes.INTERNAL_SERVER_ERROR
if an internal error occurred.
SomManagementWs.ErrorCodes.USER_HAS_NO_TOKEN_ASSIGNED
if no token is assigned to user or if the user does not exist.
SomManagementWs.ErrorCodes.INVALID_USERID
if the format of the user id is invalid.
SomManagementWs.ErrorCodes.INCOMPLETE_TOKENDATA
if one of the token contains inconsistent data.public String startTokenExportSession() throws SomManagementWs.ManagementWSFault
SomManagementWs.ManagementWSFault
- SomManagementWs.ErrorCodes.PERMISSION_DENIED
if the permission is denied.
SomManagementWs.ErrorCodes.INTERNAL_SERVER_ERROR
if an internal error occurred.public SomManagementWs.BatchInfo getBatchInfo(String sessionID, byte[] masterTransportCertificate) throws SomManagementWs.ManagementWSFault
sessionID
- A String with the sessionID.masterTransportCertificate
- The TransportCertificate.SomManagementWs.BatchInfo
object that contains information on the current export operation.SomManagementWs.ManagementWSFault
- SomManagementWs.ErrorCodes.PERMISSION_DENIED
if the permission is denied.
SomManagementWs.ErrorCodes.INTERNAL_SERVER_ERROR
if an internal error occurred.
SomManagementWs.ErrorCodes.SESSION_ID_UNKNOWN
if no according session does exist.
SomManagementWs.ErrorCodes.INVALID_CERTIFICATE
if masterTransportCertificate is not set or invalid.public List<ImpexToken> exportTokens(String sessionID) throws SomManagementWs.ManagementWSFault
sessionID
- ID of the associated session.ImpexToken
objects, that are stored in the database.SomManagementWs.ManagementWSFault
- SomManagementWs.ErrorCodes.PERMISSION_DENIED
if the permission is denied.
SomManagementWs.ErrorCodes.INTERNAL_SERVER_ERROR
if an internal error occurred.
SomManagementWs.ErrorCodes.SESSION_ID_UNKNOWN
if no according session does exist.
SomManagementWs.ErrorCodes.INCOMPLETE_TOKENDATA
if one of the token contains inconsistent data.public void addActivationData(String userID, Date validUntil) throws SomManagementWs.ManagementWSFault
userID
- The unique userID for the user.validUntil
- The date gives information until when the activation code is valid.SomManagementWs.ManagementWSFault
- SomManagementWs.ErrorCodes.PERMISSION_DENIED
if the permission is denied.
SomManagementWs.ErrorCodes.INTERNAL_SERVER_ERROR
if an internal error occurred.
SomManagementWs.ErrorCodes.INVALID_USERID
if the format of the user id is invalid.
SomManagementWs.ErrorCodes.INVALID_VALID_UNTIL
if the activation date format is invalid.
SomManagementWs.ErrorCodes.ACTIVATION_NOT_AFTER_HAS_EXPIRED
if the activation date has expired.
SomManagementWs.ErrorCodes.USER_DOES_NOT_EXIST
if the user does not exist.
SomManagementWs.ErrorCodes.USER_ALREADY_HAS_MAX_NUMBER_OF_ACTIVATIONDATA
if the user has the maximum number of activation data objects already.public boolean deleteActivationData(String userID) throws SomManagementWs.ManagementWSFault
userID
- The unique userID for the user.true
if the activation data were deleted. false
if the user had no activation data.SomManagementWs.ManagementWSFault
- SomManagementWs.ErrorCodes.PERMISSION_DENIED
if the permission is denied.
SomManagementWs.ErrorCodes.INTERNAL_SERVER_ERROR
if an internal error occurred.
SomManagementWs.ErrorCodes.INVALID_USERID
if the format of the user id is invalid.
SomManagementWs.ErrorCodes.USER_DOES_NOT_EXIST
if the user does not exist.public boolean addUser(String userID) throws SomManagementWs.ManagementWSFault
userID
- The unique userID for the user.true
if the user was added to the database. SomManagementWs.ManagementWSFault
- SomManagementWs.ErrorCodes.PERMISSION_DENIED
if the permission is denied.
SomManagementWs.ErrorCodes.INTERNAL_SERVER_ERROR
if an internal error occurred.
SomManagementWs.ErrorCodes.INVALID_USERID
if the format of the user id is invalid.
SomManagementWs.ErrorCodes.USER_ALREADY_EXISTS
if the user does already exist.public boolean removeUser(String userID) throws SomManagementWs.ManagementWSFault
userID
- The unique userID for the user.true
if the user was removed. false
if the user does not exist.SomManagementWs.ManagementWSFault
- SomManagementWs.ErrorCodes.PERMISSION_DENIED
if the permission is denied.
SomManagementWs.ErrorCodes.INTERNAL_SERVER_ERROR
if an internal error occurred.
SomManagementWs.ErrorCodes.INVALID_USERID
if the format of the user id is invalid.public SOMUserInfo getUser(String userID) throws SomManagementWs.ManagementWSFault
userID
- The unique userID for the user.SOMUserInfo
object, containing all user data (including activation data) if the user exists.SomManagementWs.ManagementWSFault
- SomManagementWs.ErrorCodes.PERMISSION_DENIED
if the permission is denied.
SomManagementWs.ErrorCodes.INTERNAL_SERVER_ERROR
if an internal error occurred.
SomManagementWs.ErrorCodes.INVALID_USERID
if the format of the user id is invalid.
SomManagementWs.ErrorCodes.USER_DOES_NOT_EXIST
if the user does not exist.Copyright © 2022 KOBIL Systems GmbH. All rights reserved.