Skip to content

Update envoy to jwt clock_skew change#420

Merged
qiwzhang merged 2 commits intoGoogleCloudPlatform:masterfrom
qiwzhang:jwt-clock-skew
Nov 18, 2020
Merged

Update envoy to jwt clock_skew change#420
qiwzhang merged 2 commits intoGoogleCloudPlatform:masterfrom
qiwzhang:jwt-clock-skew

Conversation

@qiwzhang
Copy link
Copy Markdown
Contributor

Signed-off-by: Wayne Zhang qiwzhang@google.com

It is to fix: #369

Signed-off-by: Wayne Zhang <qiwzhang@google.com>
@google-oss-robot
Copy link
Copy Markdown
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: qiwzhang, TAOXUY

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@qiwzhang
Copy link
Copy Markdown
Contributor Author

/retest

Signed-off-by: Wayne Zhang <qiwzhang@google.com>
@google-oss-robot
Copy link
Copy Markdown
Collaborator

New changes are detected. LGTM label has been removed.

@qiwzhang
Copy link
Copy Markdown
Contributor Author

/test ESPv2-presubmit-asan

1 similar comment
@qiwzhang
Copy link
Copy Markdown
Contributor Author

/test ESPv2-presubmit-asan

@qiwzhang qiwzhang merged commit feaf9ab into GoogleCloudPlatform:master Nov 18, 2020
},
{
desc: "Failed, token with wrong issuer",
desc: "Successed, token with wrong issuer is considered as missing",
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @qiwzhang, was there a change in upstream envoy that changes this test? Just curious why it changed, it's not obvious.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is due to my recently submitted pr envoyproxy/envoy#13839
If a Jwt has "iss" and "iss" doesn't matched the one specified in the provider, it will return JwtUnknownIssuer.
In this PR, JwtUnkownIssuer is treated as JwtMissing.

This is the part I am debating, if the spec wants to verify JWT with "iss1" and allow_missing. But a JWT with "iss2" comes, should we reject it? Is this consider as "missing"?

For now, it is considered as "missing" and it is accepted.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, that is interesting. JWT requirement config allows both allow_missing and allow_missing_or_failed. Wouldn't the issuer mismatch be a verification failure? Then allow_missing should reject it, but allow_missing_or_failed should pass through.

https://www.envoyproxy.io/docs/envoy/latest/api-v2/config/filter/http/jwt_authn/v2alpha/config.proto#config-filter-http-jwt-authn-v2alpha-jwtrequirement

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, maybe you could clarify what the term "verification" means in this documentation. Verifying the entire token (including the issuer), or just verifying the signature matches?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We verify signature, "aud" and "iss".

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Allow for some clock skew in JWT Validation

4 participants