Implement AUTH. Closes #58
This change makes password authentication required for redis usage, and removes anonymous access. Users will need to change their underlying clients to enable writing the auth token for authenticating, otherwise requests will fail. This is a non-optional change, and improves security for users who wish to expose their redis installations outside of their network.
This commit is contained in:
@@ -40,7 +40,8 @@ teardown() {
|
||||
@test "($PLUGIN_COMMAND_PREFIX:link) exports REDIS_URL to app" {
|
||||
dokku "$PLUGIN_COMMAND_PREFIX:link" l my_app
|
||||
url=$(dokku config:get my_app REDIS_URL)
|
||||
assert_contains "$url" "redis://dokku-redis-l:6379"
|
||||
password="$(cat "$PLUGIN_DATA_ROOT/l/PASSWORD")"
|
||||
assert_contains "$url" "redis://l:$password@dokku-redis-l:6379"
|
||||
dokku "$PLUGIN_COMMAND_PREFIX:unlink" l my_app
|
||||
}
|
||||
|
||||
@@ -63,6 +64,7 @@ teardown() {
|
||||
dokku config:set my_app REDIS_DATABASE_SCHEME=redis2
|
||||
dokku "$PLUGIN_COMMAND_PREFIX:link" l my_app
|
||||
url=$(dokku config:get my_app REDIS_URL)
|
||||
assert_contains "$url" "redis2://dokku-redis-l:6379"
|
||||
password="$(cat "$PLUGIN_DATA_ROOT/l/PASSWORD")"
|
||||
assert_contains "$url" "redis2://l:$password@dokku-redis-l:6379"
|
||||
dokku "$PLUGIN_COMMAND_PREFIX:unlink" l my_app
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user