hi, i am having some problems setting kratos env v...
# talk-kratos
r
hi, i am having some problems setting kratos env variables that should map to array (version: v0.9.0-alpha.3) This variable bellow works fine:
SELFSERVICE_METHODS_OIDC_CONFIG_PROVIDERS='[{"id":"google","provider":"google","client_id":"*****","client_secret":"*****","mapper_url":"file:///etc/google.jsonnet","scope":["email","profile"],"requested_claims":{"id_token":{"email":{"essential":true},"email_verified":{"essential":true},"given_name":{"essential":true},"family_name":null,"hd":null}}}]'
But when i try with few others for example with these:
IDENTITY_SCHEMAS='[{"id":"customer","url":"file:///etc/config/kratos/schemas/customer.identity.schema.json"}]'
SELFSERVICE_FLOWS_REGISTRATION_AFTER_OIDC_HOOKS='[{"hook":"session"}]'
SELFSERVICE_FLOWS_LOGIN_AFTER_PASSWORD_HOOKS='[{"hook":"require_verified_address"}]'
SELFSERVICE_FLOWS_REGISTRATION_AFTER_PASSWORD_HOOKS='[{"hook":"web_hook","config":{"url":"<http://my-api:3001/api/v1/webhooks/kratos/registration/after/password>","method":"POST","body":"file:///etc/config/kratos/hooks/registration/after/password.jsonnet"}}]'
I get these errors:
The configuration contains values or keys which are invalid:
selfservice.flows.registration.after: map[default_browser_return_url:<http://127.0.0.1:5050/auth/login> oidc:map[default_browser_return_url:<http://127.0.0.1:5050> hooks:[{"hook":"session"}]] password:map[default_browser_return_url:<http://127.0.0.1:5050/auth/login> hooks:[{"hook":"web_hook","config":{"url":"<http://my-api:3001/api/v1/webhooks/kratos/registration/after/password>","method":"POST","body":"file:///etc/config/kratos/hooks/registration/after/password.jsonnet"}}]]]
^-- doesn't validate with "#/definitions/selfServiceAfterRegistration"
The configuration contains values or keys which are invalid:
selfservice.flows.registration.after: map[default_browser_return_url:<http://127.0.0.1:5050/auth/login> oidc:map[default_browser_return_url:<http://127.0.0.1:5050> hooks:[{"hook":"session"}]] password:map[default_browser_return_url:<http://127.0.0.1:5050/auth/login> hooks:[{"hook":"web_hook","config":{"url":"<http://my-api:3001/api/v1/webhooks/kratos/registration/after/password>","method":"POST","body":"file:///etc/config/kratos/hooks/registration/after/password.jsonnet"}}]]]
^-- validation failed
The configuration contains values or keys which are invalid:
selfservice.flows.registration.after.password: map[default_browser_return_url:<http://127.0.0.1:5050/auth/login> hooks:[{"hook":"web_hook","config":{"url":"<http://my-api:3001/api/v1/webhooks/kratos/registration/after/password>","method":"POST","body":"file:///etc/config/kratos/hooks/registration/after/password.jsonnet"}}]]
^-- doesn't validate with "#/definitions/selfServiceAfterRegistrationMethod"
The configuration contains values or keys which are invalid:
selfservice.flows.registration.after.password.hooks: [{"hook":"web_hook","config":{"url":"<http://my-api:3001/api/v1/webhooks/kratos/registration/after/password>","method":"POST","body":"file:///etc/config/kratos/hooks/registration/after/password.jsonnet"}}]
^-- expected array, but got string
The configuration contains values or keys which are invalid:
selfservice.flows.registration.after.oidc: map[default_browser_return_url:<http://127.0.0.1:5050> hooks:[{"hook":"session"}]]
^-- doesn't validate with "#/definitions/selfServiceAfterRegistrationMethod"
The configuration contains values or keys which are invalid:
selfservice.flows.registration.after.oidc.hooks: [{"hook":"session"}]
^-- expected array, but got string
The configuration contains values or keys which are invalid:
selfservice.flows.login.after: map[oidc:map[default_browser_return_url:<http://127.0.0.1:5050>] password:map[hooks:[{"hook":"require_verified_address"}]]]
^-- doesn't validate with "#/definitions/selfServiceAfterLogin"
The configuration contains values or keys which are invalid:
selfservice.flows.login.after.password: map[hooks:[{"hook":"require_verified_address"}]]
^-- doesn't validate with "#/definitions/selfServiceAfterDefaultLoginMethod"
The configuration contains values or keys which are invalid:
selfservice.flows.login.after.password.hooks: [{"hook":"require_verified_address"}]
^-- expected array, but got string
What am i doing wrong here? It's strange that it says: wants arr, got string when that 1st variable (SELFSERVICE_METHODS_OIDC_CONFIG_PROVIDERS) works fine and it is the same format
p
Hi @User hmm, this is odd. Maybe the code needs to be adjusted to support this as well somewhere. See this issue regarding oidc provider env support https://github.com/ory/kratos/issues/1535