8000 Cache: RedisAdapter doesn't support AWS ElastiCache with secure connection · Issue #30573 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

Cache: RedisAdapter doesn't support AWS ElastiCache with secure connection #30573

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

Closed
alex-vasilchenko-md opened this issue Mar 14, 2019 · 3 comments

Comments

@alex-vasilchenko-md
Copy link
Contributor

Symfony version(s) affected: 4.2

Description
It's impossible to connect to AWS Elasticache using https://github.com/nrk/predis that supports rediss schema: http://www.iana.org/assignments/uri-schemes/prov/rediss
As a result you get an exception "Unsupported DSN: rediss://{aws-elasticache-uri}"

How to reproduce
You need to set up cache in framework.yml like this:

cache:
        app: cache.adapter.redis
        default_redis_provider: 'rediss://{aws-elasticache-uri}'

As client you need to set up Predis\Client

On init app will throw InvalidArgumentException.

Possible Solution
Add rediss dsn support here: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Cache/Adapter/AbstractAdapter.php#L135

And here: https://github.com/symfony/symfony/blob/master/src/Symfony/Component/Cache/Traits/RedisTrait.php#L83

@nicolas-grekas
Copy link
Member

@alex-vasilchenko-md would you be able to submit a PR to add support for this?

@a-deeb
Copy link
a-deeb commented Mar 19, 2019

Hi, can I help out and add the DNS support in those files?

@alex-vasilchenko-md
Copy link
Contributor Author

hi! @nicolas-grekas! sure I will submit PR. Thanks, @a-deeb , I can do it. If for some reason I don't put my hands on it I will comment here.

@fabpot fabpot closed this as completed Mar 20, 2019
fabpot added a commit that referenced this issue Mar 20, 2019
…r and RedisTrait (alex-vasilchenko-md)

This PR was squashed before being merged into the 4.3-dev branch (closes #30605).

Discussion
----------

[Cache] added DSN support for rediss in AbstractAdapter and RedisTrait

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| BC breaks?    | no
| Deprecations? | no
| Tests pass?   | yes
| Fixed tickets | #30573
| License       | MIT

A fix for this issue: #30573
Support for "rediss:" in DSN added.

Commits
-------

7e2852d [Cache] added DSN support for rediss in AbstractAdapter and RedisTrait
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants
0