-
Task
-
Resolution: Done
-
Normal
-
None
-
None
with SMTP implemetation
this curl is not falling
curl -X POST "http://localhost:8083/v1/sendEmails" \
-H "x-rh-insights-env:XXXX" \
-H "x-rh-clientid:super-client" \
-H "x-rh-apitoken:root1234" \
-H 'content-type: application/json' \
-d '{"emails":[
] }'
x-rh-insights-env is used to determine whether BOP should take stage or production IT service url.
Stage or Production host for SMTP environment variables are populated based on pipeline config files here:
stage
production
so previous mechanism is not needed.
We need to add new env variable into BOP which determines environment
ENVIRONMENT=stage or production
and add into v1/sendEmail check which will validate
whether
x-rh-insights-env header is set correctly (header['x-rh-insights-env'] == ENV['ENVIRONMENT'] )
it was falling previously because it was trying to connect for production email service with stage authentication.