クラス DPoPProofReplayValidator

java.lang.ObjectSE
org.springframework.security.oauth2.jwt.DPoPProofReplayValidator
実装済みのインターフェース一覧:
OAuth2TokenValidator<Jwt>

public final class DPoPProofReplayValidator extends ObjectSE implements OAuth2TokenValidator<Jwt>
DPoP プルーフリプレイ攻撃を軽減する OAuth2TokenValidator

This validator mitigates DPoP Proof Replay by ensuring the DPoP Proof:

  • iat (発行日)クレームが含まれており、許容時間枠内です。(configured via setClockSkew(Duration) )
  • contains the jti (JWT ID) claim, and it has not been used previously

This implementation uses a Cache to store the jti claim (along with other information in CacheValue ) to enforce single-use. The jti is retained in the cache until the DPoP Proof expires, which is calculated as iat + clockSkew.

導入:
6.5.12
関連事項:
  • コンストラクターの詳細

    • DPoPProofReplayValidator

      public DPoPProofReplayValidator(org.springframework.cache.Cache cache)
      指定されたパラメーターを使用して DPoPProofReplayValidator を構築します。
      パラメーター:
      cache - the Cache used to store DPoPProofReplayValidator.CacheValue which contains information of the used DPoP Proof Jwt 's
  • 方法の詳細

    • validate

      public OAuth2TokenValidatorResult validate(Jwt jwt)
      インターフェースからコピーされた説明: OAuth2TokenValidator
      提供された OAuth 2.0 トークンの有効性および / または制約を確認します。
      次で指定:
      インターフェース OAuth2TokenValidator<Jwt> 内の validate 
      パラメーター:
      jwt - OAuth 2.0 トークン
      戻り値:
      OAuth2TokenValidationResult 検証の成功または失敗の詳細
    • setClockSkew

      public void setClockSkew(DurationSE clockSkew)
      Sets the clock skew. The default is 30 seconds.
      パラメーター:
      clockSkew - 監視の歪み
    • setClock

      public void setClock(ClockSE clock)
      Instant.now(Clock)SE で使用される ClockSE を設定します。
      パラメーター:
      clock - 監視