I'm running into similar issue as <https://github....
# ory-selfhosting
h
I'm running into similar issue as https://github.com/ory/kratos/issues/3865 I have the env var
SELFSERVICE_FLOWS_REGISTRATION_AFTER_PASSWORD_HOOKS_1_CONFIG_AUTH_CONFIG_VALUE
that is not overriding whats in the config file, it errors out relevant config file part
Copy code
selfservice:
  flows:
    registration:
      after:
        password:
          hooks:
            - hook: session
            - hook: web_hook
              config:
                url: <https://nginx/api/users>
                method: POST
                auth:
                  type: api_key
                  config:
                    name: "Authorization"
                    value: "asdf"
                    in: header
part of the error
Copy code
kratos-1  | time=2024-06-06T12:36:19Z 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.614/configx/provider.go:144 audience=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.flows.registration.after: map[default_browser_return_url:/ password:map[hooks:[<nil> map[config:map[auth:map[config:map[in:header name:Authorization value:JSSXEwKTZlyHW7QUS2t3V2vucVwZwjWtfu2DMEMo2OmkluECiE93ua4A4AwG29Yt] type:api_key] body:<base64://ZnVuY3Rpb24oY3R4KSB7IHVzZXJfaWQ6IGN0eC5pZGVudGl0eS5pZCB9> method:POST response:map[ignore:false parse:false] url:<https://nginx/api/users>] hook:web_hook]]]]
kratos-1  |                                       ^-- doesn't validate with "#/definitions/selfServiceAfterRegistration"
kratos-1  | 
kratos-1  | The configuration contains values or keys which are invalid:
kratos-1  | selfservice.flows.registration.after.password: map[hooks:[<nil> map[config:map[auth:map[config:map[in:header name:Authorization value:JSSXEwKTZlyHW7QUS2t3V2vucVwZwjWtfu2DMEMo2OmkluECiE93ua4A4AwG29Yt] type:api_key] body:<base64://ZnVuY3Rpb24oY3R4KSB7IHVzZXJfaWQ6IGN0eC5pZGVudGl0eS5pZCB9> method:POST response:map[ignore:false parse:false] url:<https://nginx/api/users>] hook:web_hook]]]
kratos-1  |                                                ^-- doesn't validate with "#/definitions/selfServiceAfterRegistrationMethod"
kratos-1  | 
kratos-1  | The configuration contains values or keys which are invalid:
kratos-1  | selfservice.flows.registration.after.password.hooks.0: <nil>
kratos-1  |                                                        ^-- anyOf failed
kratos-1  | 
kratos-1  | The configuration contains values or keys which are invalid:
kratos-1  | selfservice.flows.registration.after.password.hooks.0: <nil>
kratos-1  |                                                        ^-- doesn't validate with "#/definitions/selfServiceSessionIssuerHook"
kratos-1  | 
kratos-1  | The configuration contains values or keys which are invalid:
kratos-1  | selfservice.flows.registration.after.password.hooks.0: <nil>
kratos-1  |                                                        ^-- expected object, but got null
kratos-1  | 
kratos-1  | The configuration contains values or keys which are invalid:
kratos-1  | selfservice.flows.registration.after.password.hooks.0: <nil>
kratos-1  |                                                        ^-- doesn't validate with "#/definitions/selfServiceWebHook"
kratos-1  | 
kratos-1  | The configuration contains values or keys which are invalid:
kratos-1  | selfservice.flows.registration.after.password.hooks.0: <nil>
kratos-1  |                                                        ^-- expected object, but got null
kratos-1  | 
kratos-1  | The configuration contains values or keys which are invalid:
kratos-1  | selfservice.flows.registration.after.password.hooks.0: <nil>
kratos-1  |                                                        ^-- doesn't validate with "#/definitions/selfServiceShowVerificationUIHook"
kratos-1  | 
kratos-1  | The configuration contains values or keys which are invalid:
kratos-1  | selfservice.flows.registration.after.password.hooks.0: <nil>
kratos-1  |                                                        ^-- expected object, but got null
kratos-1  | 
kratos-1  | The configuration contains values or keys which are invalid:
kratos-1  | selfservice.flows.registration.after.password.hooks.0: <nil>
kratos-1  |                                                        ^-- doesn't validate with "#/definitions/b2bSSOHook"
kratos-1  | 
kratos-1  | The configuration contains values or keys which are invalid:
kratos-1  | selfservice.flows.registration.after.password.hooks.0: <nil>
kratos-1  |                                                        ^-- expected object, but got null
kratos-1  | 
kratos-1  | time=2024-06-06T12:36:19Z 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/flows/registration/after] S[#/properties/selfservice/properties/flows/properties/registration/properties/after/$ref] doesn't validate with "#/definitions/selfServiceAfterRegistration"
kratos-1  |   I[#/selfservice/flows/registration/after/password] S[#/definitions/selfServiceAfterRegistration/properties/password/$ref] doesn't validate with "#/definitions/selfServiceAfterRegistrationMethod"
kratos-1  |     I[#/selfservice/flows/registration/after/password/hooks/0] S[#/definitions/selfServiceAfterRegistrationMethod/properties/hooks/items/anyOf] anyOf failed
kratos-1  |       I[#/selfservice/flows/registration/after/password/hooks/0] S[#/definitions/selfServiceAfterRegistrationMethod/properties/hooks/items/anyOf/0/$ref] doesn't validate with "#/definitions/selfServiceSessionIssuerHook"
kratos-1  |         I[#/selfservice/flows/registration/after/password/hooks/0] S[#/definitions/selfServiceSessionIssuerHook/type] expected object, but got null
kratos-1  |       I[#/selfservice/flows/registration/after/password/hooks/0] S[#/definitions/selfServiceAfterRegistrationMethod/properties/hooks/items/anyOf/1/$ref] doesn't validate with "#/definitions/selfServiceWebHook"
kratos-1  |         I[#/selfservice/flows/registration/after/password/hooks/0] S[#/definitions/selfServiceWebHook/type] expected object, but got null
kratos-1  |       I[#/selfservice/flows/registration/after/password/hooks/0] S[#/definitions/selfServiceAfterRegistrationMethod/properties/hooks/items/anyOf/2/$ref] doesn't validate with "#/definitions/selfServiceShowVerificationUIHook"
kratos-1  |         I[#/selfservice/flows/registration/after/password/hooks/0] S[#/definitions/selfServiceShowVerificationUIHook/type] expected object, but got null
kratos-1  |       I[#/selfservice/flows/registration/after/password/hooks/0] S[#/definitions/selfServiceAfterRegistrationMethod/properties/hooks/items/anyOf/3/$ref] doesn't validate with "#/definitions/b2bSSOHook"
kratos-1  |         I[#/selfservice/flows/registration/after/password/hooks/0] S[#/definitions/b2bSSOHook/type] expected object, but got null 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/flows/registration/after] S[#/properties/selfservice/properties/flows/properties/registration/properties/after/$ref] doesn't validate with "#/definitions/selfServiceAfterRegistration"
kratos-1  |   I[#/selfservice/flows/registration/after/password] S[#/definitions/selfServiceAfterRegistration/properties/password/$ref] doesn't validate with "#/definitions/selfServiceAfterRegistrationMethod"
kratos-1  |     I[#/selfservice/flows/registration/after/password/hooks/0] S[#/definitions/selfServiceAfterRegistrationMethod/properties/hooks/items/anyOf] anyOf failed
kratos-1  |       I[#/selfservice/flows/registration/after/password/hooks/0] S[#/definitions/selfServiceAfterRegistrationMethod/properties/hooks/items/anyOf/0/$ref] doesn't validate with "#/definitions/selfServiceSessionIssuerHook"
kratos-1  |         I[#/selfservice/flows/registration/after/password/hooks/0] S[#/definitions/selfServiceSessionIssuerHook/type] expected object, but got null
kratos-1  |       I[#/selfservice/flows/registration/after/password/hooks/0] S[#/definitions/selfServiceAfterRegistrationMethod/properties/hooks/items/anyOf/1/$ref] doesn't validate with "#/definitions/selfServiceWebHook"
kratos-1  |         I[#/selfservice/flows/registration/after/password/hooks/0] S[#/definitions/selfServiceWebHook/type] expected object, but got null
kratos-1  |       I[#/selfservice/flows/registration/after/password/hooks/0] S[#/definitions/selfServiceAfterRegistrationMethod/properties/hooks/items/anyOf/2/$ref] doesn't validate with "#/definitions/selfServiceShowVerificationUIHook"
kratos-1  |         I[#/selfservice/flows/registration/after/password/hooks/0] S[#/definitions/selfServiceShowVerificationUIHook/type] expected object, but got null
kratos-1  |       I[#/selfservice/flows/registration/after/password/hooks/0] S[#/definitions/selfServiceAfterRegistrationMethod/properties/hooks/items/anyOf/3/$ref] doesn't validate with "#/definitions/b2bSSOHook"
kratos-1  |         I[#/selfservice/flows/registration/after/password/hooks/0] S[#/definitions/b2bSSOHook/type] expected object, but got null
kratos-1  | Usage:
kratos-1  |   kratos serve [flags]
kratos-1  |
if the bug is confirmed, i can work on a fix