kratos icon indicating copy to clipboard operation
kratos copied to clipboard

Unable to enable passkey method

Open akhayyat opened this issue 10 months ago • 1 comments

Preflight checklist

Ory Network Project

No response

Describe the bug

Enabling passkeys as documented in https://www.ory.sh/docs/kratos/passwordless/passkeys#passkeys-with-the-dedicated-passkey-strategy results in the following error:

The configuration contains values or keys which are invalid:
additionalProperties "passkey" not allowed

Reproducing the bug

  1. Enable passkey in configuration as documented in https://www.ory.sh/docs/kratos/passwordless/passkeys#passkeys-with-the-dedicated-passkey-strategy
  2. Start Kratos

Relevant log output

kratos-1  | time=2024-04-20T18:03:35Z level=error msg=Unable to instantiate configuration. func=github.com/ory/kratos/driver.NewWithoutInit file=/project/driver/factory.go:43 audience=application error=map[m
essage:I[#/selfservice/methods] S[#/properties/selfservice/properties/methods/additionalProperties] additionalProperties "passkey" not allowed stack_trace:stack trace could not be recovered from error type *
jsonschema.ValidationError] service_name=Ory Kratos service_version=v1.1.0
kratos-1  | Error: I[#/selfservice/methods] S[#/properties/selfservice/properties/methods/additionalProperties] additionalProperties "passkey" not allowed
kratos-1  | Usage:
kratos-1  |   kratos serve [flags]
kratos-1  | 
kratos-1  | Flags:
kratos-1  |   -c, --config strings   Path to one or more .json, .yaml, .yml, .toml config files. Values are loaded in the order provided, meaning that the last config file overwrites values from the previous
 config file.
kratos-1  |       --dev              Disables critical security features to make development easier
kratos-1  |   -h, --help             help for serve
kratos-1  |       --sqa-opt-out      Disable anonymized telemetry reports - for more information please visit https://www.ory.sh/docs/ecosystem/sqa
kratos-1  |       --watch-courier    Run the message courier as a background task, to simplify single-instance setup
kratos-1  | 
kratos-1  | I[#/selfservice/methods] S[#/properties/selfservice/properties/methods/additionalProperties] additionalProperties "passkey" not allowed
kratos-1  | time=2024-04-20T18:03:36Z level=debug msg=Adding config files. func=github.com/ory/x/configx.(*Provider).createProviders file=/go/pkg/mod/github.com/ory/[email protected]/configx/provider.go:144 audienc
e=application files=[/etc/config/kratos/kratos.yml] service_name=Ory Kratos service_version=v1.1.0
kratos-1  | 
kratos-1  | The configuration contains values or keys which are invalid:
kratos-1  | selfservice.methods: map[code:map[config:map[lifespan:1h] enabled:true mfa_enabled:false passwordless_enabled:true passwordless_login_fallback_enabled:false] link:map[config:map[lifespan:1h] enab
led:false] lookup_secret:map[enabled:true] oidc:map[enabled:false] passkey:map[config:map[display_name:Me]] password:map[config:map[haveibeenpwned_enabled:true haveibeenpwned_host:api.pwnedpasswords.com
 identifier_similarity_check_enabled:true ignore_network_errors:true max_breaches:0 min_password_length:8] enabled:true] profile:map[enabled:true] totp:map[config:map[issuer:Me] enabled:true] webauthn:m
ap[enabled:false]]
kratos-1  |                      ^-- additionalProperties "passkey" not allowed

Relevant configuration

methods:
    password:
      enabled: true
    totp:
      config:
        issuer: Me
      enabled: true
    lookup_secret:
      enabled: true
    code:
      enabled: true
      passwordless_enabled: true
    passkey:
      enabled: true
      config:
        display_name: Me

Version

1.1.0

On which operating system are you observing this issue?

Linux

In which environment are you deploying?

Docker Compose

Additional Context

No response

akhayyat avatar Apr 20 '24 18:04 akhayyat

I am experiencing the same issues, and can attest that all configuration options from contrib/quickstart/kratos fail with multiple error lines, so reproducing the new configuration files in the source and in the docs should be your priority right now.

cerealkill avatar May 14 '24 08:05 cerealkill

Passkey supported is not included in the 1.1.0 release of Kratos. So for the time being, please compile Kratos from master. It will be included in the next release.

jonas-jonas avatar May 30 '24 08:05 jonas-jonas