diff --git a/CHANGELOG.md b/CHANGELOG.md index 31cd05d0..ce5b8204 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -13,6 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com), and this * Providing `excludeMaxVisitsReached=true` and/or `excludePastValidUntil=true` to the `GET /short-urls` endpoint. * Providing `--exclude-max-visits-reached` and/or `--exclude-past-valid-until` to the `short-urls:list` command. +* [#1599](https://github.com/shlinkio/shlink/issues/1599) Added support for credentials on redis DSNs, either only password, or both username and password. * [#1616](https://github.com/shlinkio/shlink/issues/1616) Added support to import orphan visits when importing short URLs from another Shlink instance. * [#1519](https://github.com/shlinkio/shlink/issues/1519) Allowing to search short URLs by default domain. * [#1555](https://github.com/shlinkio/shlink/issues/1555) Added full support for PHP 8.2, pdating the dockr image to this version. diff --git a/composer.json b/composer.json index 6a5bb317..5b58b62b 100644 --- a/composer.json +++ b/composer.json @@ -45,7 +45,7 @@ "php-middleware/request-id": "^4.1", "pugx/shortid-php": "^1.1", "ramsey/uuid": "^4.5", - "shlinkio/shlink-common": "dev-main#f4101bc as 5.2", + "shlinkio/shlink-common": "dev-main#8d06f0e as 5.2", "shlinkio/shlink-config": "dev-main#96c81fb as 2.3", "shlinkio/shlink-event-dispatcher": "^2.6", "shlinkio/shlink-importer": "dev-main#c97662b as 5.0", diff --git a/config/autoload/redis.local.php.local b/config/autoload/redis.local.php.local index 9bd8fea6..7fd57112 100644 --- a/config/autoload/redis.local.php.local +++ b/config/autoload/redis.local.php.local @@ -7,6 +7,8 @@ return [ 'cache' => [ 'redis' => [ 'servers' => 'tcp://shlink_redis:6379', +// 'servers' => 'tcp://barbar@shlink_redis_acl:6379', +// 'servers' => 'tcp://foo:bar@shlink_redis_acl:6379', ], ], diff --git a/data/infra/redis/redis-acl.conf b/data/infra/redis/redis-acl.conf new file mode 100644 index 00000000..44c26d66 --- /dev/null +++ b/data/infra/redis/redis-acl.conf @@ -0,0 +1,2 @@ +user foo allcommands allkeys on >bar +requirepass barbar diff --git a/docker-compose.yml b/docker-compose.yml index 8293ab03..f3affecb 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,6 +29,7 @@ services: - shlink_db_maria - shlink_db_ms - shlink_redis + - shlink_redis_acl - shlink_mercure - shlink_mercure_proxy - shlink_rabbitmq @@ -65,6 +66,7 @@ services: - shlink_db_maria - shlink_db_ms - shlink_redis + - shlink_redis_acl - shlink_mercure - shlink_mercure_proxy - shlink_rabbitmq @@ -89,6 +91,7 @@ services: - shlink_db_maria - shlink_db_ms - shlink_redis + - shlink_redis_acl - shlink_mercure - shlink_mercure_proxy - shlink_rabbitmq @@ -146,10 +149,19 @@ services: shlink_redis: container_name: shlink_redis - image: redis:6.0-alpine + image: redis:6.2-alpine ports: - "6380:6379" + shlink_redis_acl: + container_name: shlink_redis_acl + image: redis:6.2-alpine + command: ["redis-server", "/usr/local/etc/redis/redis.conf"] + ports: + - "6382:6379" + volumes: + - ./data/infra/redis/redis-acl.conf:/usr/local/etc/redis/redis.conf + shlink_mercure_proxy: container_name: shlink_mercure_proxy image: nginx:1.19.6-alpine