Hey, I've set up kratos via docker image and confi...
# ory-selfhosting
Hey, I've set up kratos via docker image and configured webhooks for the registration and verification flow to communicate with our backend. Currently I run in to the problem that the api_key for authentication on the backend server is not set by kratos in the request header. There is also no indicator in the logs that the header is set. Below you can see my config for the registration flow
Copy code
registration: lifespan: 10m

      ui_url: <https://kratosexample.net/registration>


            - hook: web_hook
                url: <https://backend.net/api/orykratos/afterRegistration>
                method: POST
                body: file:////home/ory/config/hooks/identityId
                    type: api_key
                        name: api_key
                        value: XXXXXXXXXXXXXXXXXXXXXXXXXXXXX
                        in: header
The jsonnet file contains the identity.id, which gets to the backend server, but the api-key header is missing. Am I missing something in my configuration ?
Hm the configuration looks OK from my pov. I am also figuring out things with webhooks this week, I will do some testing of the auth / headers and let you know 🙏
Hi Vince, thanks for your reply. I look forward to hear from you 👍
Sorry for the late answer Simon, I am still not sure what the problem is here Can you maybe share the rest of your configuration maybe? On what path is kratos and your app running?
Hi Vincent, no need to be sorry, we found a flaw in our nginx configuration which caused this behavior. But one thing was strange regarding the logging behaviour of kratos. The header 'api-key' is still missing in the log entry of the processed request altough the log level is set to trace, which is strange because the other headers of the request are logged as they should be.