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

webhooks events can't POST for HTTPS servers using self-signed cert #852

Closed
ashvindersingh opened this issue May 13, 2015 · 2 comments
Closed
Labels
Milestone

Comments

@ashvindersingh
Copy link

Steps:

  • Generate a self signed ssl certificate following https://github.com/couchbase/sync_gateway/tree/master/examples/ssl
  • Using build 1.1.0-16 start sync gateway with the below mentioned config.json
  • launch a httpsserver on a different machine
  • Create a document on SG
  • Expected the newly created document to be posted on the httpsserver.
  • Found error on the SG console.

Error:

WARNING: Error attempting to post to url https://172.23.105.219:9071: Post https://172.23.105.219:9071: x509: cannot validate certificate for 172.23.105.219 because it doesn't contain any IP SANs -- %!v(MISSING) -- db.func·027() at event_handler.go:111
<<<<<<<<

Sync gateway config.json
{
"log":["REST", "REST+", "HTTP", "HTTP+", "Access", "Cache", "Shadow", "Shadow+", "CRUD", "CRUD+", "Changes", "Changes+", "JSON", "JSON+"],
"verbose":true,
"SSLCert": "/Users/ashvinder/myprojects/ssl_certs/cert.pem",
"SSLKey": "/Users/ashvinder/myprojects/ssl_certs/privkey.pem",
"facebook" : {
"register" : true
},
"databases": {
"db": {
"server": "walrus:",
"sync": function(doc){channel(doc.channels);},
"users": {"GUEST": {"disabled": false, "admin_channels": ["*"] }},
"event_handlers": {"document_changed":[{"handler":"webhook","max_processes" : 500,
"wait_for_process" : "600000",
"url":"https://172.23.105.219:9071",
"timeout":60,
"SSLKey": "/Users/ashvinder/myprojects/ssl_certs/privkey.pem",
"SSLCert": "/Users/ashvinder/myprojects/ssl_certs/cert.pem"}] }
}
}
}

@adamcfraser
Copy link
Collaborator

The issue seems to be with posting to https servers using self-signed certificates, not HTTPS in general.

@adamcfraser adamcfraser changed the title webhooks events can't POST for HTTPS servers webhooks events can't POST for HTTPS servers using self-signed cert May 13, 2015
@ashvindersingh
Copy link
Author

Was successfully able to test with HTTPS server. The error came due to faulty certificate and was a test setup issue.

@zgramana zgramana modified the milestone: 1.1.0 Jun 11, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants