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

lively-soccer-24145

01/17/2022, 11:21 AM
Hello 👋. New to Ory but I really start enjoying more and more the stack. Just a question - can we use kratos without a SMTP server ? We would like to get the recovery link via API and then send them using our own microservices. Is this possible right now ? Trying to deploy Kratos via Helm but struggeling to get pass stmp requirements
m

magnificent-energy-493

01/17/2022, 12:23 PM
Yes, you should be able to use Kratos without an SMTP server. I am not sure how to configure Helm or the dockerfile for this however. Also getting recovery via API should not be a problem. If you dont find a resolution, feel free to open a discussion.
s

steep-lamp-91158

01/17/2022, 1:24 PM
l

lively-soccer-24145

01/17/2022, 1:37 PM
Hey @User, thanks for that. It still a bit confusing for me as i would like to say I don’t need SMTP at all. If i don’t provide any connection details, I get
Copy code
Error: couldn't find key smtpConnectionURI in Secret ory/kratos-helm
s

steep-lamp-91158

01/17/2022, 2:09 PM
You might try to just put a dummy value, there might be too strict validation in the helm chart @User
w

worried-kitchen-94392

01/18/2022, 7:52 AM
Hey there, i have checked that this parameter is setup as required in kratos itself. That means you need to provide… something there, please check our charts repository for a sample: https://github.com/ory/k8s/blob/master/.circleci/values/kratos.yaml#L73 🙂
l

lively-soccer-24145

01/18/2022, 8:27 AM
@User hello, thanks for that. I’ve tried that and still getting 503 on the health endpoint -
Copy code
time=2022-01-18T08:27:17Z level=info msg=completed handling request http_request=map[headers:map[accept:*/* connection:close user-agent:kube-probe/1.21] host:10.1.1.73:4434 method:GET path:/health/read │
│ y query:<nil> remote:10.1.0.1:61886 scheme:http] http_response=map[headers:map[content-type:application/json; charset=utf-8] size:78 status:503 text_status:Service Unavailable took:1.000923368s]
w

worried-kitchen-94392

01/18/2022, 8:47 AM
503 on healthchecks is another issue entirely, With the missing config value the app wouldn’t start and the pod would be in a crashloop.
In your case it looks like the pods i running, but healthchecks are not passing for some reason
l

lively-soccer-24145

01/18/2022, 8:56 AM
Hmm, I think you are right. will keep investigating
w

worried-kitchen-94392

01/18/2022, 8:59 AM
something you can try is to execute into the container and run
netstal -lptnu
to check if the used port/connection is opened
l

lively-soccer-24145

01/18/2022, 10:24 AM
Hmm you are right, if i port-forward i can use the public apis. Will do some more investigation around that
m

magnificent-energy-493

01/18/2022, 10:59 AM
Hey Cristi, if everything goes smooth, can we write a small guide here https://www.ory.sh/kratos/docs/next/debug/troubleshooting/ or here https://www.ory.sh/kratos/docs/next/guides/account-activation-email-verification/ ? e.g.
How to use Ory Kratos without SMTP server
would like to support you with that, if you are up to it 🙌
l

lively-soccer-24145

01/18/2022, 11:24 AM
It doesn’t seem to work without providing a SMTP connection, you need to provide
smtp://
at least. The issue seems to be with the readinessProbe, it keeps getting 503. If i remove it from the deployment, it goes to running 1/1. I am testing now if email validation / recovery is working without properly smtp connection.
s

steep-lamp-91158

01/18/2022, 11:25 AM
how should that work without smtp? I cannot send emails in that case?
l

lively-soccer-24145

01/18/2022, 11:27 AM
So for example what I am trying to do is I don’t want Ory to send emails. I have an email microservice which is using Sendgrid to send emails so in another microservice i want to call Kratos and say hey give me the link the user should click and then i will pass the request to the email microservice and say send this email with this link
s

steep-lamp-91158

01/18/2022, 11:57 AM
So you will poll the admin API?
l

lively-soccer-24145

01/18/2022, 11:58 AM
this was what I was thinking about. You see any issues with that ? 😄
s

steep-lamp-91158

01/18/2022, 12:25 PM
Seems fine as a workaround until we implement that issue I send before
l

lively-soccer-24145

01/18/2022, 1:24 PM
I can see there is a Create Recovery link but nothing for activation link. Isn’t this allowed via admin ? https://www.ory.sh/kratos/docs/reference/api/#operation/adminCreateSelfServiceRecoveryLink
Btw it seemed like the ready api was failing because it took too much time to ping the database even if the app was connected to it and it was able to write in the db. So now that one is working as well 🙂
m

magnificent-energy-493

01/18/2022, 2:20 PM
You can use the recovery link as activation as well AFAIK.
l

lively-soccer-24145

01/18/2022, 2:23 PM
Hmm, ok, let me test. If this is working then i’m gonna have a huge 🍺 this night !
🍺 1
It doesn’t seem to work 😞 but anyhow I am happy that i get it working via helm. @User should i ping you in private to discuss if you want me to write any guide ? I can explain what i did and you can see if it’s worth adding it
m

magnificent-energy-493

01/18/2022, 4:11 PM
Sure! that would be marvellous, just jot down some notes. The email verification is not working through the recovery link? I hope you can still enjoy a 🍺 tonight.
5 Views