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

SSL error thrown when using rackspace storage driver #24660

Closed
icheko opened this issue Jun 21, 2018 · 3 comments
Closed

SSL error thrown when using rackspace storage driver #24660

icheko opened this issue Jun 21, 2018 · 3 comments

Comments

@icheko
Copy link

icheko commented Jun 21, 2018

  • Laravel Version: 5.6.19
  • PHP Version: 7.1.17

Description:

Guzzle\Http\Exception\CurlException : [curl] 60: SSL certificate problem: unable to get local issuer certificate [url] https://indentity.api.rackspacecloud.com/v2.0/tokens

at ...CurlMulti.php:338

Looks like league/flysystem-rackspace depends on "rackspace/php-opencloud": "~1.16" and the SSL certs bundled are throwing this error (rackspace/php-opencloud#727). My temporary fix is to override the rackspace driver and include the option to use the system root ca certs (https://gist.github.com/icheko/6c404e80ac509012b8706bfb6111851b).

Steps To Reproduce:

  1. Use rackspace as the storage driver
  2. Attempt to save a file
  3. Error is thrown
@laurencei
Copy link
Contributor

Would that mean the problem is in the league/flysystem-rackspace package? Should the ticket go there perhaps?

@icheko
Copy link
Author

icheko commented Jun 22, 2018

They are not planning on upgrading (thephpleague/flysystem-rackspace#23) and doesn't look like its in active development anymore.

@kmuenkel
Copy link

kmuenkel commented Aug 14, 2018

I haven't tested this fix, but based on the earlier conversation, I think this would permit you to to add such configurations to the actual filesystem config file:

  1. Create child of \Illuminate\Filesystem\FilesystemManager and make it override its createRackspaceDriver(array $config) method
  2. Replicate the existing content of createRackspaceDriver(), except make it apply the third parameter to the new Rackspace() instantiation, and send to it a nested array within $config, under whatever key-name you intend to use in filesystem.php.
  3. Create a child class for \Illuminate\Filesystem\FilesystemServiceProvider, and make it override the registerManager() method where it sets up the 'filesystem' singleton. Make it instantiate your new child of \Illuminate\Filesystem\FilesystemManager instead.
  4. Replace the app.php config line referencing Illuminate\Filesystem\FilesystemServiceProvider with its new child class.
  5. Apply your custom SSL configurations to filesystem.php under the individual Rackspace driver potion, set to whatever keys you have createRackspaceDriver() ready to receive. Include '\Guzzle\Http\Client::SSL_CERT_AUTHORITY' => 'system' in it. You could even make this contingent on an environment variable, to only take effect when APP_ENV=local.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants