Skip to content

[Chrome] Requested protection policy is inconsistent or incongruent with other requested parameters #490

@huy-yearnings

Description

@huy-yearnings

I did this

// Rust code

let url = Url::parse("http://localhost:3000").unwrap();
let webauthn = WebauthnBuilder::new("localhost", &url)
            .unwrap()
            .rp_name("Acme")
            .build()
            .unwrap;
let (challenge_response, _) = webauthn.start_securitykey_registration(
    user_unique_id,
    "foo@example.com",
    "Chrome",
    /*exclude_credentials=*/ None,
    /*attestation_ca_list=*/ None,
    /*ui_hint_authenticator_attachment=*/ Some(AuthenticatorAttachment::CrossPlatform),
).unwrap()
// Resulting challenge response JSON

{
    "publicKey": {
        "rp": {
            "name": "Acme",
            "id": "localhost"
        },
        "user": {
            "id": "-Hf8EiJFSJCSXz4mtlTchQ",
            "name": "foo@example.com",
            "displayName": "Chrome"
        },
        "challenge": "FlP_qkvpRuAXqREykLjJCYTzdIV93OSUf1nS02d-djM",
        "pubKeyCredParams": [
            {
                "type": "public-key",
                "alg": -7
            },
            {
                "type": "public-key",
                "alg": -257
            }
        ],
        "timeout": 300000,
        "authenticatorSelection": {
            "authenticatorAttachment": "cross-platform",
            "residentKey": "discouraged",
            "requireResidentKey": false,
            "userVerification": "preferred"
        },
        "hints": [
            "securitykey"
        ],
        "attestation": "none",
        "extensions": {
            "credentialProtectionPolicy": "userVerificationRequired",
            "enforceCredentialProtectionPolicy": false,
            "uvm": true,
            "credProps": true
        }
    }
}

I expected the following

  • The challenge JSON is valid argument when for navigator.credentials.create(...), and Chrome must allow user select physical security key for registration.

What actually happened (with Chrome, no error with Firefox)

  • Got error from navigator.credentials.create(...): NotSupportedError: Requested protection policy is inconsistent or incongruent with other requested parameters.

Version (and git commit)

webauthn-rs = "0.5.1"

Operating System / Version

Mac

Any other comments

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions