-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #228 from Kuadrant/sandbox-redis-tls-requirepass
new sandbox: secured redis
- Loading branch information
Showing
14 changed files
with
169 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
*.crt | ||
*.key | ||
*.pem | ||
*.csr |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
version: '2.2' | ||
version: '3.8' | ||
services: | ||
envoy: | ||
image: envoyproxy/envoy:v1.20-latest | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
version: '2.2' | ||
version: '3.8' | ||
services: | ||
limitador: | ||
image: ${LIMITADOR_IMAGE:-limitador-testing} | ||
|
2 changes: 1 addition & 1 deletion
2
limitador-server/sandbox/docker-compose-limitador-infinispan.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
version: '2.2' | ||
version: '3.8' | ||
services: | ||
limitador: | ||
image: ${LIMITADOR_IMAGE:-limitador-testing} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
version: '2.2' | ||
version: '3.8' | ||
services: | ||
limitador: | ||
image: ${LIMITADOR_IMAGE:-limitador-testing} | ||
|
2 changes: 1 addition & 1 deletion
2
limitador-server/sandbox/docker-compose-limitador-redis-cached.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
version: '2.2' | ||
version: '3.8' | ||
services: | ||
limitador: | ||
image: ${LIMITADOR_IMAGE:-limitador-testing} | ||
|
42 changes: 42 additions & 0 deletions
42
limitador-server/sandbox/docker-compose-limitador-redis-tls.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
--- | ||
version: '3.8' | ||
services: | ||
limitador: | ||
image: ${LIMITADOR_IMAGE:-limitador-testing} | ||
depends_on: | ||
- envoy | ||
- redis | ||
command: | ||
- limitador-server | ||
- --rls-ip | ||
- 0.0.0.0 | ||
- --rls-port | ||
- "8081" | ||
- --http-ip | ||
- 0.0.0.0 | ||
- --http-port | ||
- "8080" | ||
- -vvv | ||
- /opt/kuadrant/limits/limits.yaml | ||
- redis | ||
- rediss://:foobared@redis:6379/#insecure | ||
expose: | ||
- "8080" | ||
- "8081" | ||
ports: | ||
- "18080:8080" | ||
volumes: | ||
- ./limits.yaml:/opt/kuadrant/limits/limits.yaml | ||
redis: | ||
image: redis:6.2 | ||
restart: always | ||
ports: | ||
- '6379:6379' | ||
command: | ||
- redis-server | ||
- /usr/local/etc/redis/redis.conf | ||
volumes: | ||
- ./redis-tls/redis-config.conf:/usr/local/etc/redis/redis.conf | ||
- ./redis.crt:/usr/local/etc/redis/certs/redis.crt | ||
- ./redis.key:/usr/local/etc/redis/certs/redis.key | ||
- ./ca.crt:/usr/local/etc/redis/certs/ca.crt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
--- | ||
version: '2.2' | ||
version: '3.8' | ||
services: | ||
limitador: | ||
image: ${LIMITADOR_IMAGE:-limitador-testing} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
### Testing redis security | ||
|
||
Execute bash shell in redis pod | ||
|
||
``` | ||
docker compose -p sandbox exec redis /bin/bash | ||
``` | ||
|
||
Connect to this Redis server with redis-cli: | ||
|
||
``` | ||
root@e024a29b74ba:/data# redis-cli --tls --cacert /usr/local/etc/redis/certs/ca.crt -a foobared | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
requirepass foobared | ||
port 0 | ||
tls-port 6379 | ||
tls-cert-file /usr/local/etc/redis/certs/redis.crt | ||
tls-key-file /usr/local/etc/redis/certs/redis.key | ||
tls-ca-cert-file /usr/local/etc/redis/certs/ca.crt | ||
tls-auth-clients no |