-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make sys/wrapping/lookup unauthenticated. #3084
Conversation
We still perform validation on the token, so if the call makes it through to this endpoint it's got a valid token (either explicitly specified in data or as the request token). But this allows introspection for sanity/safety checking without revoking the token in the process.
// wrapping can always succeed. Note that sys/wrapping/lookup isn't | ||
// contained here because using it would revoke the token anyways, so there | ||
// isn't much point. | ||
// wrapping can always succeed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we add sys/wrapping/lookup to this policy now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You don't need it! Because it's unauthenticated.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doh!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The wrapping validation function tests the validity of the token itself, but we then bypass the policy checks because it's an unauth endpoint. That's how we get around the use count decrementing.
We could make it an auth endpoint and add that policy but then we need to hard code exclusions from use count decrementing. Which doesn't seem great either.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
We still perform validation on the token, so if the call makes it
through to this endpoint it's got a valid token (either explicitly
specified in data or as the request token). But this allows
introspection for sanity/safety checking without revoking the token in
the process.