Skip to content
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

Webauthn HID client #12

Open
wants to merge 34 commits into
base: master
Choose a base branch
from
Open

Webauthn HID client #12

wants to merge 34 commits into from

Conversation

daeMOn63
Copy link

No description provided.

@daeMOn63 daeMOn63 changed the base branch from ctap2 to master September 28, 2020 12:40
pin input now use golang.org/x/crypto/ssh/terminal to not be
echoed on stdout anymore. The library is expected to work on *any* go
supported OS terminals, but only tested on linux.
u2ftoken/token.go Outdated Show resolved Hide resolved
u2ftoken/example/main.go Outdated Show resolved Hide resolved
Copy link
Contributor

@titanous titanous left a comment

Choose a reason for hiding this comment

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

Posting my incomplete review from a few months ago. Will do another pass later.

crypto/cose.go Outdated Show resolved Hide resolved
webauthn/types.go Outdated Show resolved Hide resolved
ctap2token/example/main.go Outdated Show resolved Hide resolved
BaseIV []byte `cbor:"5,keyasint,omitempty"`
}

func (k *COSEKey) CBOREncode() ([]byte, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
func (k *COSEKey) CBOREncode() ([]byte, error) {
func (k *COSEKey) MarshalCBOR() ([]byte, error) {

Copy link
Author

Choose a reason for hiding this comment

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

crypto/cose.go Outdated Show resolved Hide resolved
return getpasswd(h.Stdin)
}

func (h *InteractiveHandler) SetPIN(token *ctap2token.Token) ([]byte, error) {
Copy link
Contributor

Choose a reason for hiding this comment

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

It seems like most of this handler should be abstracted out into a helper that other handlers can use? I'd expect it to only do the collection from stdin and then call a shared function that does all the work.

Copy link
Author

Choose a reason for hiding this comment

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

Yes, done.

ctap2token/pin/pin.go Outdated Show resolved Hide resolved
ctap2token/pin/pin.go Outdated Show resolved Hide resolved
ctap2token/token.go Outdated Show resolved Hide resolved
doc/WEBAUTHN_DEVICE_SELECTION.md Outdated Show resolved Hide resolved
ctap2token/token.go Outdated Show resolved Hide resolved
ctap2token/token.go Outdated Show resolved Hide resolved
}

// MakeCredentialResponse
// TODO: structure may be different with different kind of attestations.
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this TODO still pending?

Copy link
Author

Choose a reason for hiding this comment

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

Hmm no. The MakeCredentialResponse structure is fixed and only the content of AttSmt may vary, but since it's a map[string]interface{} we should be good to store anything. Thanks, removed.

ctap2token/token.go Outdated Show resolved Hide resolved
ctap2token/token.go Outdated Show resolved Hide resolved
webauthn/token.go Outdated Show resolved Hide resolved
webauthn/token.go Outdated Show resolved Hide resolved
webauthn/types.go Outdated Show resolved Hide resolved
webauthn/types.go Outdated Show resolved Hide resolved
webauthn/types.go Outdated Show resolved Hide resolved
HyperSecu Mini tokens are reporting errors when calling GetAssertion.
It seems these tokens don't support the transports field being set on
the CredentialDescriptor. Luckily it's optionnal so we can safely remove
it.
HyperSecu mini tokens returns wrong error on timeout
that we can catch in order to avoid asking for user pin
when it's not set
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants