https://www.ory.sh/ logo
#talk-kratos
Title
# talk-kratos
j

jolly-pencil-87491

04/05/2022, 1:33 PM
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

damp-sunset-69236

04/05/2022, 3:01 PM
Could you send your kratos config and identity schema? please remove sensitive information
j

jolly-pencil-87491

04/06/2022, 1:10 PM
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

magnificent-energy-493

04/08/2022, 2:33 PM
its hard to say with the slack formatting but this identity schema works for me: https://gist.github.com/vinckr/6343ac504f76204451cd308af2812fd4
👍 1
j

jolly-pencil-87491

04/11/2022, 6:26 AM
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

magnificent-energy-493

04/11/2022, 8:34 AM
How are you running Kratos?
j

jolly-pencil-87491

04/11/2022, 8:45 AM
I have installed Kratos using scoop in windows
m

magnificent-energy-493

04/11/2022, 9:00 AM
Other commands like
kratos help
work fine? Did you try out the configuration I linked above? What version of Kratos?
j

jolly-pencil-87491

04/11/2022, 9:40 AM
Yeah I've tried that. My version is v0.9.0-alpha.3 Without docker it is hard to config and run Kratos
m

magnificent-energy-493

04/11/2022, 9:48 AM
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

jolly-pencil-87491

04/11/2022, 11:45 AM
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

magnificent-energy-493

04/11/2022, 12:17 PM
Ok thanks, I will take some time later today to reproduce it.
👍 1
3 Views