mirror of
https://github.com/gravitational/teleport.git
synced 2026-10-24 02:25:42 +08:00
Implements CLI login and registration using go-libfido2. Covers both MFA and passwordless use cases. The FIDO2 implementation is akin to the existing U2F Login / Registration logic, including a similar "device detection" loop. A few notable differences are: A filtered "device search" step that ends as soon a suitable device is found A more explicit "device selection" step, which makes it easier to implement PIN flows The MFA UX for end-users should remain mostly unaltered. There are no separate methods for MFA and passwordless, as much of the logic would be the same. Instead, the methods react to the assertion/credential parameters accordingly. At this moment this code is isolated from other callers, as well as from our build processes via the libfido2 tag. This is to avoid impact to other developers, as go-libfido2 has a few requirements before it can be downloaded or executed. #9160 * Import github.com/keys-pub/go-libfido2 * Implement FIDO2 login * Add login tests * Implement FIDO2 registration * Add registration tests
24 lines
748 B
Go
24 lines
748 B
Go
//go:build libfido2
|
|
// +build libfido2
|
|
|
|
// Copyright 2022 Gravitational, Inc
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// http://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
|
|
package webauthncli
|
|
|
|
var (
|
|
FIDODeviceLocations = &fidoDeviceLocations
|
|
FIDONewDevice = &fidoNewDevice
|
|
)
|