shy-kangaroo-28202
09/26/2024, 7:24 AMmigrate_hook
feature, but kratos says it doesn't recognize this key.
I apply the following changes
diff --git a/contrib/quickstart/kratos/email-password/kratos.yml b/contrib/quickstart/kratos/email-password/kratos.yml
index 5597a1adc..21bc55e97 100644
--- a/contrib/quickstart/kratos/email-password/kratos.yml
+++ b/contrib/quickstart/kratos/email-password/kratos.yml
@@ -20,6 +20,18 @@ selfservice:
methods:
password:
enabled: true
+ config:
+ migrate_hook:
+ enabled: true
+ config:
+ url: <http://localhost:3000/migrate-password>
+ method: POST
+ auth:
+ type: api_key
+ config:
+ name: "Authorization"
+ value: ""
+ in: header
totp:
config:
issuer: Kratos
and run the set up using the command suggested in the quickstart guide
docker-compose -f quickstart.yml -f quickstart-standalone.yml up --build --force-recreate
I am getting the following logs implying there is an error in the configuration
kratos-1 | time=2024-09-26T07:21:38Z level=debug msg=Adding config files. func=<http://github.com/ory/x/configx.(*Provider).createProviders|github.com/ory/x/configx.(*Provider).createProviders> file=/go/pkg/mod/github.com/ory/x@v0.0.623/configx/provider.go:144 audience=application files=[/etc/config/kratos/kratos.yml] service_name=Ory Kratos service_version=v1.2.0
kratos-1 |
kratos-1 | The configuration contains values or keys which are invalid:
kratos-1 | selfservice.methods.password.config: map[haveibeenpwned_enabled:true haveibeenpwned_host:<http://api.pwnedpasswords.com|api.pwnedpasswords.com> identifier_similarity_check_enabled:true ignore_network_errors:true max_breaches:0 migrate_hook:map[config:map[auth:map[config:map[in:header name:Authorization value:] type:api_key] method:POST url:<http://localhost:3000/migrate-password>] enabled:true] min_password_length:8]
kratos-1 | ^-- additionalProperties "migrate_hook" not allowed
kratos-1 |
kratos-1 | time=2024-09-26T07:21:38Z level=error msg=Unable to instantiate configuration. func=<http://github.com/ory/kratos/driver.NewWithoutInit|github.com/ory/kratos/driver.NewWithoutInit> file=/project/driver/factory.go:43 audience=application error=map[message:I[#/selfservice/methods/password/config] S[#/properties/selfservice/properties/methods/properties/password/properties/config/additionalProperties] additionalProperties "migrate_hook" not allowed stack_trace:stack trace could not be recovered from error type *jsonschema.ValidationError] service_name=Ory Kratos service_version=v1.2.0
kratos-1 | Error: I[#/selfservice/methods/password/config] S[#/properties/selfservice/properties/methods/properties/password/properties/config/additionalProperties] additionalProperties "migrate_hook" not allowed
Is there anything I am doing wrong?enough-yak-81379
09/27/2024, 6:20 AMshy-kangaroo-28202
09/27/2024, 3:55 PMmigrate_hook
on it and it worked. I didn't know that feature did not exist in 1.2 and that the documentation is ahead of the latest stable version.