blob: ef3726e004fcf6e28c9b2406adafcdb655e2637d [file] [log] [blame]
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_22) on Thu Apr 26 14:22:13 IST 2012 -->
<TITLE>
UniqueMessageAttributeCache (Apache Rampart API)
</TITLE>
<META NAME="date" CONTENT="2012-04-26">
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
<SCRIPT type="text/javascript">
function windowTitle()
{
if (location.href.indexOf('is-external=true') == -1) {
parent.document.title="UniqueMessageAttributeCache (Apache Rampart API)";
}
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>
</HEAD>
<BODY BGCOLOR="white" onload="windowTitle();">
<HR>
<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/UniqueMessageAttributeCache.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../org/apache/rampart/TokenCallbackHandler.html" title="class in org.apache.rampart"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../org/apache/rampart/ValidatorData.html" title="class in org.apache.rampart"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?org/apache/rampart/UniqueMessageAttributeCache.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="UniqueMessageAttributeCache.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->
<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
org.apache.rampart</FONT>
<BR>
Interface UniqueMessageAttributeCache</H2>
<DL>
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../org/apache/rampart/AbstractUniqueMessageAttributeCache.html" title="class in org.apache.rampart">AbstractUniqueMessageAttributeCache</A>, <A HREF="../../../org/apache/rampart/NonceCache.html" title="class in org.apache.rampart">NonceCache</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <B>UniqueMessageAttributeCache</B></DL>
</PRE>
<P>
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.
<P>
<P>
<HR>
<P>
<!-- ========== METHOD SUMMARY =========== -->
<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/rampart/UniqueMessageAttributeCache.html#addToCache(java.lang.String, java.lang.String)">addToCache</A></B>(java.lang.String&nbsp;id,
java.lang.String&nbsp;userName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Add value to a cache.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/rampart/UniqueMessageAttributeCache.html#clearCache()">clearCache</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Clears all recorded nonce values/sequence numbers.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/rampart/UniqueMessageAttributeCache.html#getMaximumLifeTimeOfAnAttribute()">getMaximumLifeTimeOfAnAttribute</A></B>()</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets the maximum life time of a message id.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/rampart/UniqueMessageAttributeCache.html#setMaximumLifeTimeOfAnAttribute(int)">setMaximumLifeTimeOfAnAttribute</A></B>(int&nbsp;maxTime)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets the maximum life time of a message id.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../org/apache/rampart/UniqueMessageAttributeCache.html#valueExistsInCache(java.lang.String, java.lang.String)">valueExistsInCache</A></B>(java.lang.String&nbsp;id,
java.lang.String&nbsp;userName)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Checks whether value already exists in the cache for a given user name.</TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ METHOD DETAIL ========== -->
<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>
<A NAME="setMaximumLifeTimeOfAnAttribute(int)"><!-- --></A><H3>
setMaximumLifeTimeOfAnAttribute</H3>
<PRE>
void <B>setMaximumLifeTimeOfAnAttribute</B>(int&nbsp;maxTime)</PRE>
<DL>
<DD>Sets the maximum life time of a message id.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>maxTime</CODE> - Maximum life time in seconds.</DL>
</DD>
</DL>
<HR>
<A NAME="getMaximumLifeTimeOfAnAttribute()"><!-- --></A><H3>
getMaximumLifeTimeOfAnAttribute</H3>
<PRE>
int <B>getMaximumLifeTimeOfAnAttribute</B>()</PRE>
<DL>
<DD>Gets the maximum life time of a message id.
<P>
<DD><DL>
<DT><B>Returns:</B><DD>Gets message id life time in seconds.</DL>
</DD>
</DL>
<HR>
<A NAME="addToCache(java.lang.String, java.lang.String)"><!-- --></A><H3>
addToCache</H3>
<PRE>
void <B>addToCache</B>(java.lang.String&nbsp;id,
java.lang.String&nbsp;userName)</PRE>
<DL>
<DD>Add value to a cache. Value can be sequence or nonce value.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>id</CODE> - - Nonce value or sequence number.<DD><CODE>userName</CODE> - - User name parameter value of the UserNameToken.</DL>
</DD>
</DL>
<HR>
<A NAME="valueExistsInCache(java.lang.String, java.lang.String)"><!-- --></A><H3>
valueExistsInCache</H3>
<PRE>
boolean <B>valueExistsInCache</B>(java.lang.String&nbsp;id,
java.lang.String&nbsp;userName)</PRE>
<DL>
<DD>Checks whether value already exists in the cache for a given user name.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>id</CODE> - - Nonce or sequence id value of the newly received message.<DD><CODE>userName</CODE> - - User name parameter value of the UserName token.
<DT><B>Returns:</B><DD>Returns true if nonce or sequence id is already received for given user name. Else false.</DL>
</DD>
</DL>
<HR>
<A NAME="clearCache()"><!-- --></A><H3>
clearCache</H3>
<PRE>
void <B>clearCache</B>()</PRE>
<DL>
<DD>Clears all recorded nonce values/sequence numbers.
<P>
<DD><DL>
</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>
<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
<TR ALIGN="center" VALIGN="top">
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/UniqueMessageAttributeCache.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
</TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>
<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../org/apache/rampart/TokenCallbackHandler.html" title="class in org.apache.rampart"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../org/apache/rampart/ValidatorData.html" title="class in org.apache.rampart"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?org/apache/rampart/UniqueMessageAttributeCache.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="UniqueMessageAttributeCache.html" target="_top"><B>NO FRAMES</B></A> &nbsp;
&nbsp;<SCRIPT type="text/javascript">
<!--
if(window==top) {
document.writeln('<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>');
}
//-->
</SCRIPT>
<NOSCRIPT>
<A HREF="../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>
</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>