Exception: WSDL::TimestampValidationError

Inherits:
SecurityError show all
Defined in:
lib/wsdl/errors.rb

Overview

Raised when response timestamp validation fails.

This error is raised when:

  • The response timestamp has expired (beyond clock skew tolerance)
  • The response Created time is too far in the future (clock skew exceeded)
  • A potential replay attack is detected

Timestamp validation helps prevent replay attacks where an attacker captures a valid signed response and replays it later.

Examples:

Catching timestamp validation errors

begin
  response.security.verify_timestamp!
rescue WSDL::TimestampValidationError => e
  log_security_event("Stale or replayed message: #{e.message}")
end

Distinguishing from signature errors

begin
  response.security.verify!
rescue WSDL::TimestampValidationError => e
  # Timestamp issue (expired, clock skew, replay)
  puts "Timestamp problem: #{e.message}"
rescue WSDL::SignatureVerificationError => e
  # Signature issue (tampered content, wrong key, etc.)
  puts "Signature problem: #{e.message}"
end