|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Represents security token defined by WS-Security specification. This configuration interface is generic for all
security tokens. Configuration contains type
of security token and its properties
that closely defines tokens.
If security token configuration is a part of MessageConf
then it is placed at outgoing message.
If security token configuration is placed in ExternalSecurityTokensConf
then security token is never
placed in outgoing message (e.g., if you do not want disclose your symmetric key or certificate).
The sender and receiver must be able to (de)reference token, thus the correct reference in KeyInfo
must be used.
Types of Security tokens
X509v3 Binary Security Token
X509v3 certificate
which keys can be used
in encryption and signature. Generally, certificate's public key is directly accessible using X509Certificate.getPublicKey
, but
to retrieve private key, password is required.
PublicKey
is used, for decryption corresponding
PrivateKey
stored in WSO2 SOA Enablement Server's KeyStore
is used.
PrivateKey
stored in WSO2 SOA Enablement Server's KeyStore
is used,
for signature verifying certificate's PublicKey
is used.
type
must be set to ST_VALUE_TYPE_X509V3
.
Certificate and private key are identified as follows:
ST_PROPERTY_NAME_BASE64_CERT
is set, then the property value is
Base64
string of X509Certificate.getEncoded
. This certificate will be used. If there is
a PrivateKeyCertsCredential
with the same certificate, then credential's private key is used.
ST_PROPERTY_NAME_ALIAS
is set, then the property value is
certificate's alias to KeyStore
. If ST_PROPERTY_NAME_PASSWORD
is set, then the private key is retrieved from WSO2 SOA Enablement Server KeyStore
, otherwise there is no private key.
PrivateKeyCertsCredential
available, then
it is used - it holds both Certificate and private key.
NamePasswordCredential
available,
then credential's name
and password
are used in the same way like properties ST_PROPERTY_NAME_ALIAS
and
ST_PROPERTY_NAME_PASSWORD
are used.
KeyInfo
's reference modes are Constants.STM_KEYIDENTIFIER
, Constants.STM_REFERENCE
and Constants.STM_KEYNAME
.
Value of key identifier reference (Constants.STM_KEYIDENTIFIER
) is SHA-1
value of public key
.
Username Security Token
claim
that a user
sent message. The claim must be validated by receiver
. It is usually encrypted using EncryptedData
to protect
sensitive data (e.g., password) used for token validation. The token contains following properties used to
help to validate the claim:
Constants.ST_PROPERTY_NAME_ALIAS
it contains alias (username) of user
in WSO2 SOA Enablement Server's KeyStore
. If the property
is not specified, then alias is taken from current NamePasswordCredential
.
Constants.ST_PROPERTY_NAME_PASSWORD
it contains alias' password
. If alias was taken from NamePasswordCredential
,
then this property is ignored and password is taken from the credential too.
Constants.ST_PROPERTY_NAME_PASSWORD_TYPE
. It describes
what type of password is used - Constants.PT_TEXT_VALUE
for plain text or Constants.PT_DIGEST_VALUE
for digest.
Constants.ST_PROPERTY_NAME_NO_NONCE_CREATED
if set to true
then nonce
is not created into message.
Constants.ST_PROPERTY_NAME_NONCE_BASE_64
if set, then it contains Base64
of nonce
that will be passed into message.
Constants.ST_PROPERTY_NAME_CREATED
if set then it contains the date for created
part of the token. If not set, current time is used. created
is generated only if nonce
is present.
KeyInfo
's reference modes are Constants.STM_REFERENCE
and Constants.STM_KEYNAME
.
NamePasswordAN
(plain text password) or NameDigestAN
(digested password).
Symmetric key Security Token
ExternalSecurityTokens
.
Constants.ST_PROPERTY_NAME_ENCODED_KEY
- it
holds Base64
string of SecretKey.getEncoded
.
Constants.ST_PROPERTY_NAME_KEY_ALGORITHM
- it
contains JCE
algorithm name of the symmetric key. If not specified, empty string (no algorithm name) is assumed.
KeyInfo
's reference modes are Constants.STM_REFERENCE
and Constants.STM_KEYNAME
,
but preferred mode is Constants.STM_KEYNAME
because it
represents key in KeyInfo
under KeyName
instead of SecurityTokenReference
- this
provides interoperability with non WSO2 SOA Enablement Server implementation of WS-Security.
Configuration
MessageConf
. Configuration of externals security token is described in ExternalSecurityTokens
.
WSSEProviderConf
. Configuration of externals security token is described in ExternalSecurityTokens
.
Schema is described in WSSEGlobalConf
.
Method Summary | |
PropertyConf[] |
getProperties()
Gets security token properties. |
java.lang.String |
getType()
Gets the type of the security token. |
PropertyConf |
newProperty()
Creates new instance of PropertyConf . |
void |
setProperties(PropertyConf[] propertyConfs)
Sets properties specific for security token type. |
void |
setType(java.lang.String type)
Sets the type of represented token. |
Methods inherited from interface org.systinet.wasp.security.ws.conf.OrderedElementConf |
getOrder, setOrder |
Methods inherited from interface org.systinet.wasp.security.ws.conf.ElementConf |
getWsuId, setWsuId |
Method Detail |
public void setType(java.lang.String type)
SecurityTokenConf
.
type
- security token type.getType()
public java.lang.String getType()
setType(java.lang.String)
public void setProperties(PropertyConf[] propertyConfs)
type
of security token
are described in SecurityTokenConf
.
propertyConfs
- propertiesgetProperties()
public PropertyConf[] getProperties()
setProperties(org.systinet.wasp.security.ws.conf.PropertyConf[])
public PropertyConf newProperty()
PropertyConf
.
setProperties(org.systinet.wasp.security.ws.conf.PropertyConf[])
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |