Skip to main content

[XWSS] RequireTimestamp Error: The creation time is ahead of the current time.

4 replies [Last post]
Anonymous

HI all,

I have i an exception using timestamp with Encryption.
If i configure the verification like this:

or this:

Everything works fine. If i try to require the timestamp it gives me this
exception.

com.sun.xml.wss.XWSSecurityException:
com.sun.xml.wss.impl.WssSoapFaultException: Failure in Timestamp validation.
Message is:
com.sun.xml.wss.impl.callback.TimestampValidationCallback$TimestampValidationException:
The creation time is ahead of the current time.
10:35:29,230 INFO [STDOUT] at
com.sun.xml.wss.impl.misc.XWSSProcessor2_0Impl.verifyInboundMessage(XWSSProcessor2_0Impl.java:138)
10:35:29,230 INFO [STDOUT] at
org.openspcoop.pdd.services.RicezioneContenutiApplicativiWS.invoke(RicezioneContenutiApplicativiWS.java:88)
10:35:29,230 INFO [STDOUT] at
sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
.....
.....
.....

I search for a sample, but i didn't find Stamp+Encrypt one..

This is my configs to secure the message:

I tryed also to first stamp then encrypt, with same results... where i make
error?

I have another question: it doesn't give me exception, but the timestamp is
checked also if it isn't requested by verification right?

Thx in advance,
/Lorenzo
--
View this message in context: http://www.nabble.com/-XWSS--RequireTimestamp-Error%3A-The-creation-time...
Sent from the Metro - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@metro.dev.java.net
For additional commands, e-mail: users-help@metro.dev.java.net

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
V B Kumar Jayanti

We allow and extra timestamp in the message even if the server policy
does not require it. This is added to make it interop with some other
vendors. However when you add RequireTimestamp then the Timestamp is
validated.

But generally when you have a Signature Policy we automatically add a
Timestamp and also Sign it and similarly when you have RequireSignature
on the Server Side then by default the requireTimestamp attribute of
RequireSignature policy is true.

So now coming back to the error "creation time is ahead of current time"
. Not sure which version of XWSS your are running. The timestamp
validation code in XWSS 3.0 is error free The 2.0 . You can also handle
the TimestampValidationCallback inside your CallbackHandler
(SecurityEnvironmentHandler) and validate the timestamp yourself.

regards.

Cencio wrote:

>HI all,
>
>I have i an exception using timestamp with Encryption.
>If i configure the verification like this:
>
> >xmlns:xwss="http://java.sun.com/xml/ns/xwss/config" dumpMessages="true">
>
>
>or this:
>
> >xmlns:xwss="http://java.sun.com/xml/ns/xwss/config" dumpMessages="true">
>
>
>
>Everything works fine. If i try to require the timestamp it gives me this
>exception.
>
>com.sun.xml.wss.XWSSecurityException:
>com.sun.xml.wss.impl.WssSoapFaultException: Failure in Timestamp validation.
>Message is:
>com.sun.xml.wss.impl.callback.TimestampValidationCallback$TimestampValidationException:
>The creation time is ahead of the current time.
>10:35:29,230 INFO [STDOUT] at
>com.sun.xml.wss.impl.misc.XWSSProcessor2_0Impl.verifyInboundMessage(XWSSProcessor2_0Impl.java:138)
>10:35:29,230 INFO [STDOUT] at
>org.openspcoop.pdd.services.RicezioneContenutiApplicativiWS.invoke(RicezioneContenutiApplicativiWS.java:88)
>10:35:29,230 INFO [STDOUT] at
>sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
>.....
>.....
>.....
>
>
>I search for a sample, but i didn't find Stamp+Encrypt one..
>
>This is my configs to secure the message:
>
> >xmlns:xwss="http://java.sun.com/xml/ns/xwss/config">
>
>
>

>
>

>
>
>I tryed also to first stamp then encrypt, with same results... where i make
>error?
>
>I have another question: it doesn't give me exception, but the timestamp is
>checked also if it isn't requested by verification right?
>
>Thx in advance,
>/Lorenzo
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@metro.dev.java.net
For additional commands, e-mail: users-help@metro.dev.java.net

Cencio

I found this little bug in the sample SecurityEnvironmentHandler (founded in
all xwss samples) that cause this problem:

replace:

SimpleDateFormat calendarFormatter2 = new
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'.'sss'Z'");

with

SimpleDateFormat calendarFormatter2 = new
SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'.'SSS'Z'");

Bye bye.
/Lorenzo

--
View this message in context: http://www.nabble.com/-XWSS--RequireTimestamp-Error%3A-The-creation-time...
Sent from the Metro - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@metro.dev.java.net
For additional commands, e-mail: users-help@metro.dev.java.net

V B Kumar Jayanti

Cencio wrote:

>I found this little bug in the sample SecurityEnvironmentHandler (founded in
>all xwss samples) that cause this problem:
>
>replace:
>
>SimpleDateFormat calendarFormatter2 = new
>SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'.'sss'Z'");
>
>with
>
>SimpleDateFormat calendarFormatter2 = new
>SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'.'SSS'Z'");
>
>
>
Yes, this was a bug and we had fixed this in our XWSS 2.0 Samples. From
where do you pick up samples (we will see if this fix is missing and
fix them).

Thanks,
kumar

>Bye bye.
>/Lorenzo
>
>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@metro.dev.java.net
For additional commands, e-mail: users-help@metro.dev.java.net

Cencio

V B Kumar Jayanti wrote:
>
>
> Yes, this was a bug and we had fixed this in our XWSS 2.0 Samples. From
> where do you pick up samples (we will see if this fix is missing and
> fix them).
>
> Thanks,
> kumar
>
>

>From jwsdp-2.0 pakage picked from website.
--
View this message in context: http://www.nabble.com/-XWSS--RequireTimestamp-Error%3A-The-creation-time...
Sent from the Metro - Users mailing list archive at Nabble.com.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@metro.dev.java.net
For additional commands, e-mail: users-help@metro.dev.java.net