POST /admin/identities response fields unset
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 35/100
Línea de trabajo
Comienza reproduciendo POST /admin/identities con credenciales de contraseña y, después, compara su respuesta con GET /admin/identities/{id}. Inspecciona la respuesta de creación de la identidad de administrador y la ruta de serialización; se considera terminado cuando identifiers, created_at y updated_at contienen sus valores reales y el modelo Java de ory-client analiza la respuesta sin errores.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Preflight checklist
- I could not find a solution in the existing issues, docs, nor discussions.
- I agree to follow this project's Code of Conduct.
- I have read and am following this repository's Contribution Guidelines.
- I have joined the Ory Community Slack.
- I am signed up to the Ory Security Patch Newsletter.
Describe the bug
Hello,
We are using oryd/kratos:v1.0.0. When we create an identity with credentials, the response contains wrong values for credentials.identifiers, credentials.created_at and credentials.updated_at :
POST to /admin/identities payload
{
"credentials": {
"password": {
"config": {
"password": "HelloWorld"
}
}
},
"traits": {
"email": "[email protected]"
}
}
POST to /admin/identities partial response
"id": "0009e8ff-2665-49be-9c8a-351a42d949b8",
"credentials": {
"password": {
"type": "password",
"identifiers": null,
"version": 0,
"created_at": "0001-01-01T00:00:00Z",
"updated_at": "0001-01-01T00:00:00Z"
}
}
When we retrieve the same identity right after, the payload is correct with all the fields set
GET to /admin/identities/0009e8ff-2665-49be-9c8a-351a42d949b8 partial response
"id": "0009e8ff-2665-49be-9c8a-351a42d949b8",
"credentials": {
"password": {
"type": "password",
"identifiers": [],
"version": 0,
"created_at": "2023-09-11T17:47:59.111957Z",
"updated_at": "2023-09-11T17:47:59.111957Z"
}
}
I would expect to get credentials.created_at, credentials.updated_at and credentials.identifiers filled with their actual values on the POST.
Also because of that we face failure using JAR ory-client:1.1.45 when IdentityCredentials.java tries to validate the JSON payload:
java.lang.IllegalArgumentException: Expected the field `identifiers` to be an array in the JSON string but got `null`
at sh.ory.model.IdentityCredentials.validateJsonObject(IdentityCredentials.java:357)
at sh.ory.model.IdentityCredentials$CustomTypeAdapterFactory$1.read(IdentityCredentials.java:399)
at sh.ory.model.IdentityCredentials$CustomTypeAdapterFactory$1.read(IdentityCredentials.java:372)
Thanks
Reproducing the bug
- Start Kratos
- Create Identity with credentials using POST /admin/identities
Relevant log output
No response
Relevant configuration
No response
Version
oryd/kratos:v1.0.0
On which operating system are you observing this issue?
Linux
In which environment are you deploying?
Kubernetes
Additional Context
As a workaroound, in case that can help others, I have replaced the createIdentity by a call too batchPatchIdentities. As the response does not contain credentials it can be parsed probably by ory-client:1.1.45
- Lenguaje dominante
- Shell
- Estrellas
- 96
- Forks
- 8
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de ory/network
-
feat
Dificultad 4/5 3-5 días Aptitud para principiantes 55/100
-
bug
Dificultad 4/5 3-5 días Aptitud para principiantes 38/100
-
Updating native registration flow with OIDC ID token for existing identity returns breaking responseAbiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 35/100
-
Ory Account Experience (hosted UI) registration trait setup via creation of registration flowAbiertofeat
Dificultad 5/5 Más de una semana Aptitud para principiantes 25/100
-
selfservice.flows.login.style reverts to identifier_first despite explicitly setting passwordAbiertobug
Dificultad 4/5 3-5 días Aptitud para principiantes 30/100
Todos los issues de ory/network
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
azerothcore/azerothcore-wotlk#27903 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
obra/superpowers#2440 · 1 comentario ·
Los mantenedores suelen responder en 5 días
-
level/task type/bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 92/100
wazuh/wazuh-installation-assistant#1094 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
open-telemetry/opentelemetry-ecosystem-explorer#1208 · 1 reacción ·
Los mantenedores suelen responder en 1 día