-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[v9] Disallow malformed U2F facets #12208
Conversation
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.
Do we even need this code if we remove the last bits of U2F support?
(You'd still probably want this fix in v8/v9, but maybe in master we fix it by just removing what remains of U2F.
@zmb3 Unfortunately we do need this code now. Sunsetting U2F fully is scheduled for v11 due to compatibility reasons. So we still need to push this to master for v10. |
Thanks for taking care of this issue, @xacrimon.
Hey folks. I've kept the U2F configuration knobs around for v10 so we won't break teleport.yaml/cluster_auth_preference on updates, but the U2F subsystem never truly kicks in during v10, instead we bump it to Webauthn and issue a warning. Facets don't have an effect in master/v10+. I suggest we do this directly on branch/v9 and backport from there. References:
|
e675f9d
to
ec6bfef
Compare
@zmb3 @codingllama Thanks for the explanation! I've changed the base of this branch to branch/v9 and cherrypicked back the previous changes so that this will merge correctly to v9 now. Then I can proceed to backport to v8 etc. |
api/types/authentication.go
Outdated
// NOTE: We allow naked AppID's without a scheme for compatibility with WebAuthn | ||
// as we rely on that behaviour to derive WebAuthn configs on-the-fly. | ||
// This is only valid if all facets are also naked however. | ||
appIDUrl, err := url.Parse(u.AppID) |
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.
Acronyms are typically all caps in Go identifiers. How about appIDURL
or just u
?
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.
Changed to appIDURL.
Co-authored-by: Zac Bergquist <zmb3@users.noreply.github.com>
U2F has a specified format for facets and an algorithm to determine if they are valid or not. During an audit it was found that no place in our stack does proper facet validation for configuration. This PR hardens Teleport by rejecting invalid facets during validation of the
AuthPreferenceV2
resource.