We notice race conditions with some of our clients when CXF verifies if SecurityTokens cached locally are still valid or expired. One reason could be clock desynchronization, another reason is that while the token was still valid at the moment of request construction, it isn't when the SOAP message arrives on the server (1s difference suffices).
Is it possible to add a clock skew option to org.apache.cxf.ws.security.tokenstore.SecurityToken.isExpired() or org.apache.cxf.ws.security.trust.STSClient to compensate clock differences between client and server.
Our current workaround is to subclass the STSClient class.
A possible workaround is to handle this in the STS and set Lifetime>Expires in the RSTR response not equal but some time before the end of the SAML token, but most of the times the STS clients have no control over the STS service and cannot ask the service provider to make this change.