wso2-extensions / identity-outbound-auth-oidc

Apache License 2.0
6 stars 108 forks source link

Provide nonce protection for replay attacks #139

Closed sadilchamishka closed 1 year ago

sadilchamishka commented 1 year ago

Proposed changes in this pull request

The nonce based replay attack protection is provided from the OIDC federated authenticators.

The replay attack

The authorization code flow of the federated authentication flow is targeted in this attack. As shown in the below figure, the authorization code response which is redirected to the authorization server (highlighted in red) can be hijacked and even block the redirection. Then the potential attacker can continue complete authorization flow from the beginning but without completing step 5, and play a redirection to the authorization server including the hijacked auth code of the victim.

Screenshot 2023-04-25 at 13 10 43

jenkins-is-staging commented 1 year ago

PR builder started Link: https://github.com/wso2/product-is/actions/runs/4445972331

jenkins-is-staging commented 1 year ago

PR builder completed Link: https://github.com/wso2/product-is/actions/runs/4445972331 Status: failure

jenkins-is-staging commented 1 year ago

PR builder started Link: https://github.com/wso2/product-is/actions/runs/4447668103

jenkins-is-staging commented 1 year ago

PR builder completed Link: https://github.com/wso2/product-is/actions/runs/4447668103 Status: failure

jenkins-is-staging commented 1 year ago

PR builder started Link: https://github.com/wso2/product-is/actions/runs/4461168208

jenkins-is-staging commented 1 year ago

PR builder completed Link: https://github.com/wso2/product-is/actions/runs/4461168208 Status: success

sadilchamishka commented 1 year ago

PR is under review