Configure NO_OP configuration to redis-session profile #716
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Support to use secured Redis (e.g AWS ElesticCache)
In a secured Redis environment, the CONFIG command is disabled. This means that Spring Session cannot configure Redis Keyspace events for you. When Oskari is started environment where secured Redis is in use, application server cannot start because following error come:
redis.clients.jedis.exceptions.JedisDataException: ERR unknown command 'CONFIG'
.This PR adds new
redis-aws
profile whitch disables automatic configuration forredis-session
profile.Usage
Add
redis-aws
profile to oskari-ext.properties -file, alsoredis-session
session profile needed there.Testing
Securing Redis
You can test secured redis environment following way:
rename-command CONFIG ""
line there (disables CONFIG command in redis)redis-server <configuration-file>
Test without
redis-aws
profileStart application server without
oskari.profiles=redis-aws
configuration,error
ERR unknown command 'CONFIG'
appears in the log.Test within
redis-aws
profileStart application server within
oskari.profiles=redis-session, redis-aws
configuration,application server start correctly.