https://www.ory.sh/ logo
#contributors
Title
# contributors
e

early-fountain-60696

01/28/2022, 4:48 PM
Hello to all! I'm currently working on the implementation of SAML in Kratos and I'm encountering a small problem. I don't understand the use of this function at all: https://github.com/ovh/kratos/blob/saml/persistence/sql/persister_identity.go#L105. I'm trying to implement SAML in the same way as it already exists for OIDC. So I use this method when the SAML assertion received is about a user not yet registered to register him in the database. So, I use this method with CredentialsType = "saml". Except that this method returns an error but I don't understand. This method requests the database when the user I want to create is not in it. I don't understand it. Do I need to add something to the database that explains that a user can connect with SAML? If someone has any idea, it would help me a lot ! Thanks :)
h

high-optician-2097

01/30/2022, 5:35 PM
What error do you see?
e

early-fountain-60696

01/31/2022, 9:24 AM
@User I'm getting an SQL Error "Unable to locate the resource" which lead to a "panic serving 109.190.254.5923321 runtime error: invalid memory address or nil pointer dereference"
h

high-optician-2097

01/31/2022, 9:57 AM
Hm, hard to say without code context. But the panic indicates that an error is not properly handled somewhere in the code
e

early-fountain-60696

01/31/2022, 1:57 PM
Yes, I probably have a problem with the error handling. Can you explain to me what this method is for please? Concerning the issue, the error is "sqlite select one: sql: no rows in result set". Because p.GetConnection(ctx).Where("name = ?", ct) doesnt return any line.
h

high-optician-2097

01/31/2022, 4:31 PM
yes!
6 Views