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

Allow SSL connection to https://api.piwik.org #1867

Closed
mattab opened this issue Dec 5, 2010 · 9 comments
Closed

Allow SSL connection to https://api.piwik.org #1867

mattab opened this issue Dec 5, 2010 · 9 comments
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. worksforme The issue cannot be reproduced and things work as intended.

Comments

@mattab
Copy link
Member

mattab commented Dec 5, 2010

For update checks, add a config file setting allowing connection to https://api.piwik.org

We have booked the SSL certificate for api.piwik.org.

To do:

  • sysadmin configuration of the SSL on api.piwik.org
  • add a config file setting, similar to force_ssl_login that would force ssl connection to the host: force_ssl_update_check
@robocoder
Copy link
Contributor

The second part should probably be to override api_service_url (which is already defined in global.ini.php.

@robocoder
Copy link
Contributor

Piwik_Http supports http over curl, stream (allow_url_fopen=On), and sockets.

However, for https, we have some inconsistency in behaviour:

  • curl - supports https, but verifies the host and peer, by default (i.e., CURLOPT_SSL_VERIFYHOST => 2, CURLOPT_SSL_VERIFYPEER => true)
  • stream - supports https, but does not verify the peer
  • sockets - no support for https

I recommend the SSL option only be offered if Piwik_Http::getTransportMethod() == 'curl'.

@robocoder
Copy link
Contributor

Hmm... just noticed that my php 5.2.13 build for Windows doesn't have any CA's configured, so it's failing on the Feedburner stats.

@robocoder
Copy link
Contributor

Replying to vipsoft:

Hmm... just noticed that my php 5.2.13 build for Windows doesn't have any CA's configured, so it's failing on the Feedburner stats.

Correction: doesn't have the latest CAs.

The workaround would be to download the CA certs from http://curl.haxx.se/docs/caextract.html, and add a curl opt:

    CURLOPT_CAINFO => PIWIK_INCLUDE_PATH . '/core/DataFiles/cacert.pem',

Not sure how we could detect this at runtime.

@robocoder
Copy link
Contributor

(In [3725]) refs #1867 - add curl support for local cacert.pem, if available

@mattab
Copy link
Member Author

mattab commented May 31, 2012

As part of this ticket, the download of latest.zip should also happen over HTTPs

  • The update functionality needs a digital signature check.
  • Only valid downloads should be unpackable and installable.
  • All communication with the Piwik.org server should be over SSL

@mattab
Copy link
Member Author

mattab commented Aug 16, 2012

Note: https://api.piwik.org now work!

as well as https://demo.piwik.org https://piwik.org and others :)

@mattab
Copy link
Member Author

mattab commented Dec 14, 2012

To be done after: #728 which will help test the change.

Add a FAQ explaining how to change to https://api.piwik.org in config file.

@mattab
Copy link
Member Author

mattab commented Jan 13, 2014

https://api.piwik.org can be set in the config file

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement For new feature suggestions that enhance Matomo's capabilities or add a new report, new API etc. worksforme The issue cannot be reproduced and things work as intended.
Projects
None yet
Development

No branches or pull requests

2 participants