Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

x509: certificate signed by unknown authority error while sending notification to Teams #247

Closed
SachinKut opened this issue Sep 21, 2021 · 2 comments · Fixed by #257
Closed
Assignees
Labels
area/alerting Alerting related issues and PRs bug Something isn't working

Comments

@SachinKut
Copy link

Hi,
We are expecting the notification controller to send notification to Teams. But we are getting the following error:

{
"level": "error",
"ts": "2021-09-18T13:52:06.784Z",
"logger": "event-server",
"msg": "failed to send notification",
"reconciler kind": "Kustomization",
"name": "xxxx-service-dev",
"namespace": "flux-system",
"error": "postMessage failed: failed to execute request: POST https://xxxxx.webhook.office.com/webhookb2/12345-12345-xxxxx/IncomingWebhook/xxxxx/xxxx-xxxx giving up after 1 attempt(s): Post "https://xxxxx.webhook.office.com/webhookb2/12345-12345-xxxxx/IncomingWebhook/xxxxx/xxxx-xxxx\": x509: certificate signed by unknown authority"
}
{
"level": "info",
"ts": "2021-09-18T13:52:07.840Z",
"logger": "event-server",
"msg": "Dispatching event: kustomize create failed: failed to decode Kubernetes YAML from /tmp/xxxxx/Charts/Chart.yaml: error unmarshaling JSON: while decoding JSON: Object 'Kind' is missing in '{"apiVersion":"v2","appVersion":"0.0.36","description":"A Helm chart for Kubernetes","name":"xxxx-service","type":"application","version":"0.1.32"}'",
"reconciler kind": "Kustomization",
"name": "xxxx-service-dev",
"namespace": "flux-system"
}

We added a configmap with the root CA and the intermediate of https://xxxxx.webhook.office.com and mounted it at /etc/ssl/certs. But continue to get the same error.
Are we mounting the certs at the right location?
Is this similar to issue #203 ? @phillebaba @stefanprodan

Appreciate all the help to resolve this issue.

Thanks
Sachin

@stefanprodan stefanprodan added the bug Something isn't working label Sep 30, 2021
@stefanprodan stefanprodan added the area/alerting Alerting related issues and PRs label Sep 30, 2021
@SachinKut
Copy link
Author

Thank you @phillebaba for creating the PR to fix this issue. I saw that a test is failing.
Could this be because of the line 42 in the file internal/notifier/teams_test.go is missing the new parameter of type x509.CertPool, that you just added?

@phillebaba
Copy link
Member

Sorry forgot to check back on the PR, will fix it 😅

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/alerting Alerting related issues and PRs bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants