public interface ISecurityService
Modifier and Type | Field and Description |
---|---|
static String |
CERTIFICATE |
static String |
KEYPAIR |
static String |
PROPERTY_KEYSTOREENTRIES
The keystore entries property.
|
static String |
PROPERTY_KEYSTORESETTINGS
The keystore settings property.
|
static String |
PROPERTY_LOCALPASS
The localpass property.
|
static String |
PROPERTY_MECHANISMPARAMETER
A mechanism parameter changed.
|
static String |
PROPERTY_NETWORKPASS
The networkpass property.
|
static String |
PROPERTY_PLATFORMPASS
The platformpass property.
|
static String |
PROPERTY_SELECTEDMECHANISM
The acquisition mechanism.
|
static String |
PROPERTY_TRUSTEDLAN
The trusted lan property.
|
static String |
PROPERTY_USEPASS
The event types.
|
static String |
PROPERTY_VALIDITYDURATION
The validity duration changed.
|
static String |
TRUSTED_CERTIFICATE |
Modifier and Type | Method and Description |
---|---|
IFuture<Void> |
addPlatformCertificate(IComponentIdentifier cid,
Certificate cert)
Add a trusted certificate of a platform.
|
IFuture<Void> |
addVirtual(String virtual,
String name)
Add a name to the mappings of a virtual name.
|
IFuture<Void> |
checkVirtual(String[] virtuals,
String name)
Check if the name belongs to the mappings of one
of the virtual names.
|
IFuture<Void> |
createKeyPair(IComponentIdentifier cid,
String algorithm,
int keysize,
String password,
int validity)
Create a key pair entry.
|
IFuture<List<MechanismInfo>> |
getAcquisitionMechanisms()
Get the supported certificate acquisition mechanism infos.
|
IFuture<Map<String,KeyStoreEntry>> |
getKeystoreDetails()
Get info about the current keystore that is used.
|
IFuture<String[]> |
getKeystoreInfo()
Set the keystore info.
|
IFuture<String> |
getLocalPassword()
Get the local password.
|
IFuture<String> |
getNetworkPassword(String network)
Get the password for a network.
|
IFuture<Map<String,String>> |
getNetworkPasswords()
Get all stored network passwords.
|
IFuture<Certificate> |
getPlatformCertificate(IComponentIdentifier cid)
Get the certificate of a platform.
|
IFuture<String> |
getPlatformPassword(IComponentIdentifier target)
Get the password for a target component.
|
IFuture<Map<String,String>> |
getPlatformPasswords()
Get all stored platform passwords.
|
IFuture<Integer> |
getSelectedAcquisitionMechanism()
Get the active acquisition mechanism.
|
IFuture<Long> |
getValidityDuration()
Get the validity duration.
|
IFuture<Boolean> |
isTrustedLanMode()
Get the trusted lan mode.
|
IFuture<Boolean> |
isUsePassword()
Check if password protection is enabled.
|
IFuture<Void> |
preprocessRequest(IAuthorizable request,
IComponentIdentifier target)
Preprocess a request.
|
IFuture<Void> |
removeKeyStoreEntry(String alias)
Remove a key store entry.
|
IFuture<Void> |
removeVirtual(String virtual,
String name)
Remove a name from the mappings of a virtual name.
|
IFuture<Void> |
setAcquisitionMechanism(Class<?> type)
Set the acquisition mechanism.
|
IFuture<Void> |
setAcquisitionMechanismParameterValue(Class<?> type,
String name,
Object value)
Set a mechanism parameter.
|
IFuture<Void> |
setKeystoreInfo(String path,
String storepass,
String keypass)
Set the keystore info.
|
IFuture<Void> |
setLocalPassword(String password)
Set the local password.
|
IFuture<Void> |
setNetworkPassword(String network,
String password)
Set the password for a network.
|
IFuture<Void> |
setPlatformPassword(IComponentIdentifier target,
String password)
Set the password for a target component.
|
IFuture<Void> |
setTrustedLanMode(boolean allowed)
Set the trusted lan mode.
|
IFuture<Void> |
setUsePassword(boolean enable)
Enable / disable password protection.
|
IFuture<Void> |
setValidityDuration(long validityduration)
Set the validity duration.
|
IFuture<byte[]> |
signCall(byte[] content)
Sign a byte[] with the platform key that is stored in the
keystore under the platform prefix name.
|
ISubscriptionIntermediateFuture<ChangeEvent<Object>> |
subcribeToEvents()
Subscribe to changes.
|
IFuture<Void> |
validateRequest(IAuthorizable request)
Validate a request.
|
IFuture<Void> |
verifyCall(byte[] content,
byte[] signed,
String name)
Verify an authenticated service call.
|
static final String CERTIFICATE
static final String TRUSTED_CERTIFICATE
static final String KEYPAIR
static final String PROPERTY_USEPASS
static final String PROPERTY_TRUSTEDLAN
static final String PROPERTY_LOCALPASS
static final String PROPERTY_PLATFORMPASS
static final String PROPERTY_NETWORKPASS
static final String PROPERTY_KEYSTORESETTINGS
static final String PROPERTY_KEYSTOREENTRIES
static final String PROPERTY_SELECTEDMECHANISM
static final String PROPERTY_MECHANISMPARAMETER
static final String PROPERTY_VALIDITYDURATION
IFuture<Boolean> isUsePassword()
IFuture<Void> setUsePassword(boolean enable)
enable
- If true, password protection is enabled, otherwise disabled.Exception,
- when enable is true and no password is set.IFuture<String> getLocalPassword()
IFuture<Void> setLocalPassword(String password)
password
- The password of the local platform.Exception,
- when a null password is provided and use password is true.IFuture<String> getPlatformPassword(IComponentIdentifier target)
target
- The id of the target component.IFuture<Void> setPlatformPassword(IComponentIdentifier target, String password)
target
- The id of the target component.password
- The password or null if no password should be used.IFuture<String> getNetworkPassword(String network)
target
- The id of the target component.IFuture<Void> setNetworkPassword(String network, String password)
network
- The id of the network.password
- The password or null if no password should be used.IFuture<Map<String,String>> getPlatformPasswords()
IFuture<Map<String,String>> getNetworkPasswords()
IFuture<Long> getValidityDuration()
IFuture<Void> setValidityDuration(long validityduration)
validityduration
- The validityduration to set.IFuture<Void> setTrustedLanMode(boolean allowed)
allowed
- The flag if it is allowed.IFuture<Boolean> isTrustedLanMode()
IFuture<String[]> getKeystoreInfo()
IFuture<Void> setKeystoreInfo(String path, String storepass, String keypass)
path
- The path to the keystore.storepass
- The password of the store.keypass
- The password of the key.IFuture<Void> validateRequest(IAuthorizable request)
request
- The request to be validated.SecurityException,
- when request is not valid.IFuture<Void> preprocessRequest(IAuthorizable request, IComponentIdentifier target)
request
- The request to be preprocessed.target
- The target to which the request should be sent later.dur
- The request validity duration.IFuture<byte[]> signCall(byte[] content)
IFuture<Void> verifyCall(byte[] content, byte[] signed, String name)
content
- The content that should be checked.signed
- The desired output hash.name
- The callers name (used to find the certificate and public key).IFuture<Void> checkVirtual(String[] virtuals, String name)
virtuals
- The virtual names.name
- The name to check.IFuture<Void> addVirtual(String virtual, String name)
virtual
- The virtual name.name
- The name to add.IFuture<Void> removeVirtual(String virtual, String name)
virtual
- The virtual name.name
- The name to remove.IFuture<Certificate> getPlatformCertificate(IComponentIdentifier cid)
cid
- The platform component identifier (null for own certificate).IFuture<Void> addPlatformCertificate(IComponentIdentifier cid, Certificate cert)
name
- The entry name.cert
- The certificate.IFuture<Void> createKeyPair(IComponentIdentifier cid, String algorithm, int keysize, String password, int validity)
cid
- The entry name.algorithm
- The algorithm.keysize
- The key size (in bits).IFuture<Void> removeKeyStoreEntry(String alias)
String
- alias The alias name.IFuture<Map<String,KeyStoreEntry>> getKeystoreDetails()
IFuture<List<MechanismInfo>> getAcquisitionMechanisms()
IFuture<Void> setAcquisitionMechanismParameterValue(Class<?> type, String name, Object value)
type
- The mechanism identifier.name
- The parameter name.value
- The parameter value.IFuture<Void> setAcquisitionMechanism(Class<?> type)
type
- The acquisition mechanism class.IFuture<Integer> getSelectedAcquisitionMechanism()
ISubscriptionIntermediateFuture<ChangeEvent<Object>> subcribeToEvents()
Copyright © 2013. All Rights Reserved.