|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Represents configuration of external security tokens
, incoming validator
and policies of certificate validation
, timestamp header expiration
and username token validation
.
In message processing all WSSEConf configurations are merged together. The priority of configurations is: runtime conf. in call context, runtime conf. in service client/endpoint context, persistent conf. in service client/endpoint descriptor and persistent global configuration.
Configurable
narrowed to this interface is stored in contextdata
of CallContext, ServiceEndpoint or ServiceClient under the key Constants.CD_SECURITY_CONFIGURATION
.
Configuration stored at CallContext has higher priority than configuration at service endpoint and service client.
Example:
Configurable configurable = Configurator.newRuntimeConfigurable(); WSSEConf securityConf = (WSSEConf)configurable.narrow(WSSEConf.class); ...setup configuration ServiceClient serviceClient = ServiceClient.create(...); MyService ref = (MyService)serviceClient.createProxy( MyService.class ); // set it on service client serviceClient.getContext().getContextData().put(Constants.CD_SECURITY_CONFIGURATION, securityConf); // set it on call context serviceClient.getCallContext().getContextData().put(Constants.CD_SECURITY_CONFIGURATION, securityConf);
Configurable configurable = Configurator.newRuntimeConfigurable(); WSSEConf securityConf = (WSSEConf)configurable.narrow(WSSEConf.class); ...setup configuration ServiceEndpointContext serviceEndpointContext = Current.getServiceEndpointContext(); // set it on the service endpoint serviceEndpointContext.getContextData().put(Constants.CD_SECURITY_CONFIGURATION, securityConf); // or set it on call context - this code must be called in processing (e.g., service's code, validator,...) Current.getCallContext().getContextData().put( Constants.CD_SECURITY_CONFIGURATION, securityConf);
WSSEProviderConf
and WSSEGlobalConf
have to be used (these interfaces inherit this interface).
Method Summary | |
java.lang.Integer |
getClockSkew()
Gets the clock skew. |
java.lang.Boolean |
getDisableCertCheck()
When a security token of type X509 is received, it's checked, whether it is 1) valid and 2) trusted. |
ExternalSecurityTokensConf |
getExternalSecurityTokens()
This method returns configuration of external security tokens. |
java.lang.Boolean |
getFaultStackTrace()
Gets "stacktrace-in-fault" flag. |
java.lang.Boolean |
getIgnoreTimestampHeaderExpiration()
When a timestamp header is received, it may contain the expires value. |
java.lang.Boolean |
getNoUsernameTokenValidation()
|
java.lang.Integer |
getTimestampHeaderExpiration()
Gets expiration time of timestamp header. |
java.lang.Integer |
getTimestampHeaderMaxAge()
Gets max age accepted of timestamp header. |
java.lang.Integer |
getTokenExpiration()
Gets expiration time of WS-Security unsigned tokens. |
java.lang.String |
getValidatorClassName()
Returns a class name of the validator class. |
ExternalSecurityTokensConf |
newExternalSecurityTokens()
Returns new instance of ExternalSecurityTokensConf . |
void |
setClockSkew(java.lang.Integer clockSkew)
Sets the clock skew. |
void |
setDisableCertCheck(java.lang.Boolean flag)
When a security token of type X509 is received, it's checked, whether it is 1) valid and 2) trusted. |
void |
setExternalSecurityTokens(ExternalSecurityTokensConf externalSecurityTokensConfs)
Sets configuration of external security tokens. |
void |
setFaultStackTrace(java.lang.Boolean flag)
Sets "stacktrace-in-fault" flag. |
void |
setIgnoreTimestampHeaderExpiration(java.lang.Boolean flag)
Sets timestamp expiration ignore flag. |
void |
setNoUsernameTokenValidation(java.lang.Boolean flag)
The UsernameToken may contain nonce and created values, which improve the security level. |
void |
setTimestampHeaderExpiration(java.lang.Integer millis)
Sets expiration time of timestamp header wsu:Timestamp . |
void |
setTimestampHeaderMaxAge(java.lang.Integer millis)
Sets max age accepted of timestamp header when wsu:Expires
is omitted, but wsu:Created is present. |
void |
setTokenExpiration(java.lang.Integer millis)
Sets expiration time of WS-Security tokens. |
void |
setValidatorClassName(java.lang.String className)
Sets a class name of the validator class. |
Method Detail |
public java.lang.Boolean getIgnoreTimestampHeaderExpiration()
setIgnoreTimestampHeaderExpiration(Boolean)
public void setIgnoreTimestampHeaderExpiration(java.lang.Boolean flag)
flag
- true
to ignore header expirationgetIgnoreTimestampHeaderExpiration()
public void setNoUsernameTokenValidation(java.lang.Boolean flag)
flag
- the valuesetTokenExpiration(java.lang.Integer)
,
getTokenExpiration()
,
getNoUsernameTokenValidation()
public java.lang.Boolean getNoUsernameTokenValidation()
setNoUsernameTokenValidation(java.lang.Boolean)
public java.lang.Boolean getDisableCertCheck()
setDisableCertCheck(java.lang.Boolean)
public void setDisableCertCheck(java.lang.Boolean flag)
flag
- Boolean.TRUE, if the check is to be disabled.getDisableCertCheck()
public ExternalSecurityTokensConf getExternalSecurityTokens()
ExternalSecurityTokensConf
.
By default, security tokens are generated into SOAP message. In some cases (i.e., due to security reasons)
it is not preferable to put security token into SOAP message. To avoid putting of security token into outgoing
SOAP message and to setup security tokens for incoming message these security tokens must be defined here. All
these security tokens are available to all SecuredMessage
configurations.
public void setExternalSecurityTokens(ExternalSecurityTokensConf externalSecurityTokensConfs)
externalSecurityTokensConfs
- getExternalSecurityTokens()
public ExternalSecurityTokensConf newExternalSecurityTokens()
ExternalSecurityTokensConf
.
ExternalSecurityTokensConf
.getExternalSecurityTokens()
public java.lang.String getValidatorClassName()
IncomingValidator
,
setValidatorClassName(String className)
public void setValidatorClassName(java.lang.String className)
Constants.CD_VALIDATOR_INSTANCE
.
className
- the class name or null, if no validator is to be usedIncomingValidator
,
getValidatorClassName()
public void setTokenExpiration(java.lang.Integer millis)
millis
- expiration time in millisecondsgetTokenExpiration()
public java.lang.Integer getTokenExpiration()
setTokenExpiration(Integer millis)
public java.lang.Integer getClockSkew()
setClockSkew(Integer clockSkew)
public void setClockSkew(java.lang.Integer clockSkew)
clockSkew
- clock skew in millisecondsgetClockSkew()
public void setTimestampHeaderExpiration(java.lang.Integer millis)
wsu:Timestamp
.
The value of wsu:Expires
is computed as
creation time + expiration time
millis
- expiration time in millisecondsgetTimestampHeaderExpiration()
public java.lang.Integer getTimestampHeaderExpiration()
setTimestampHeaderExpiration(Integer millis)
public void setTimestampHeaderMaxAge(java.lang.Integer millis)
wsu:Expires
is omitted, but wsu:Created
is present.
Message is rejected if
created + max age < current time
Default value is 5 minutes.
millis
- max age accepted in milliseconds; -1
for no limitgetTimestampHeaderMaxAge()
public java.lang.Integer getTimestampHeaderMaxAge()
setTimestampHeaderMaxAge(Integer millis)
public java.lang.Boolean getFaultStackTrace()
false
.
true
or false
setFaultStackTrace(Boolean)
public void setFaultStackTrace(java.lang.Boolean flag)
flag
- true
tells the server to render stacktrace into
SOAP fault when WSSecurityException
occurs during processing of Security
header; false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |