|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface UniqueMessageAttributeCache
An interface to cache nonce/sequence number values coming with messages. This mainly helps to prevent replay attacks. There are few different ways to handle replay attacks. 1. Cache nonce values. 2. Use a sequence number. "Web Services Security UsernameToken Profile 1.1 OASIS Standard Specification, 1 February 2006" specification only recommends to cache nonce for a period. But there can be other mechanisms like using sequence number. Therefore cache is implemented as an interface and later if we need to support sequence number scenario we can easily extend this. User: aj Date: Apr 30, 2010 Time: 12:15:52 PM To change this template use File | Settings | File Templates.
Method Summary | |
---|---|
void |
addToCache(java.lang.String id,
java.lang.String userName)
Add value to a cache. |
void |
clearCache()
Clears all recorded nonce values/sequence numbers. |
int |
getMaximumLifeTimeOfAnAttribute()
Gets the maximum life time of a message id. |
void |
setMaximumLifeTimeOfAnAttribute(int maxTime)
Sets the maximum life time of a message id. |
boolean |
valueExistsInCache(java.lang.String id,
java.lang.String userName)
Checks whether value already exists in the cache for a given user name. |
Method Detail |
---|
void setMaximumLifeTimeOfAnAttribute(int maxTime)
maxTime
- Maximum life time in seconds.int getMaximumLifeTimeOfAnAttribute()
void addToCache(java.lang.String id, java.lang.String userName)
id
- - Nonce value or sequence number.userName
- - User name parameter value of the UserNameToken.boolean valueExistsInCache(java.lang.String id, java.lang.String userName)
id
- - Nonce or sequence id value of the newly received message.userName
- - User name parameter value of the UserName token.
void clearCache()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |