Hi, I am getting the following error The configura...
# talk-kratos
j
Hi, I am getting the following error The configuration contains values or keys which are invalid: (root) ^-- additionalProperties "properties", "$schema", "type", "$id", "title" not allowed
d
Could you send your kratos config and identity schema? please remove sensitive information
j
Kratos config is as follows version: v0.7.1-alpha.1 dsn: ask me if required serve: public: base_url: http://127.0.0.1:4433/ cors: enabled: true admin: base_url: http://127.0.0.1:4434/ selfservice: default_browser_return_url: http://127.0.0.1:4455/ allowed_return_urls: - http://127.0.0.1:4455 methods: password: enabled: true flows: error: ui_url: http://127.0.0.1:4455/error settings: ui_url: http://127.0.0.1:4455/settings privileged_session_max_age: 15m recovery: enabled: true ui_url: http://127.0.0.1:4455/recovery verification: enabled: true ui_url: http://127.0.0.1:4455/verification after: default_browser_return_url: http://127.0.0.1:4455/ logout: after: default_browser_return_url: http://127.0.0.1:4455/login login: ui_url: http://127.0.0.1:4455/login lifespan: 10m registration: lifespan: 10m ui_url: http://127.0.0.1:4455/registration after: password: hooks: - hook: session log: level: debug format: text leak_sensitive_values: true secrets: cookie: - PLEASE-CHANGE-ME-I-AM-VERY-INSECURE cipher: - 32-LONG-SECRET-NOT-SECURE-AT-ALL ciphers: algorithm: xchacha20-poly1305 hashers: algorithm: bcrypt bcrypt: cost: 8 identity: default_schema_id: default schemas: - id: default url: file:///etc/config/kratos/identity.schema.json courier: smtp: connection_uri: smtps://test:test@mailslurper:1025/?skip_ssl_verify=true
scehma is as follows { "$id": "http://identity.schema.json", "$schema": "http://json-schema.org/draft-07/schema#", "title": "Person", "type": "object", "properties": { "traits": { "type": "object", "properties": { "email": { "type": "string", "format": "email", "title": "E-Mail", "minLength": 3, "ory.sh/kratos": { "credentials": { "password": { "identifier": true } } } }, "name": { "type": "object", "properties": { "first": { "title": "First Name", "type": "string" }, "last": { "title": "Last Name", "type": "string" } } } }, "required": [ "email" ] } } }
Hi, Can you please check my files above and help me to resolve the issue Thanks
m
its hard to say with the slack formatting but this identity schema works for me: https://gist.github.com/vinckr/6343ac504f76204451cd308af2812fd4
👍 1
j
Hi, When I am running the following command kratos serve -c .\config\kratos.yml -c .\config\identity.schema.json I am getting the following error The configuration contains values or keys which are invalid: (root) ^-- additionalProperties "$id", "type", "title", "properties" not allowed time=2022-04-11T062436Z level=fatal msg=Unable to instantiate configuration. audience=application error=map[message:I[#] S[#/additionalProperties] additionalProperties "$id", "type", "title", "properties" not allowed] service_name=Ory Kratos service_version=v0.9.0-alpha.3
m
How are you running Kratos?
j
I have installed Kratos using scoop in windows
m
Other commands like
kratos help
work fine? Did you try out the configuration I linked above? What version of Kratos?
j
Yeah I've tried that. My version is v0.9.0-alpha.3 Without docker it is hard to config and run Kratos
m
Yea especially on Windows it is not always easy 🤔 I want to reproduce your issue on my personal machine running Windows. Can you please provide the steps I need to take to reproduce this?
j
My steps are as follows: 1- First I install Kratos using scoop in windows 2- Then I clone git repos using git clone https://github.com/ory/kratos.git in power shell 3- Then I install postgre SQL and created a database using name kratos 4- After that I ran the following command in sequence $env:DSN="postgres://127.0.0.1:5432/kratos?user=postgres&password=*****&sslmode=disable" in power shell kratos migrate sql -e kratos serve -c .\config\kratos.yml
m
Ok thanks, I will take some time later today to reproduce it.
👍 1