Skip to content
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

Configure NO_OP configuration to redis-session profile #716

Merged
merged 1 commit into from
Apr 29, 2021
Merged

Configure NO_OP configuration to redis-session profile #716

merged 1 commit into from
Apr 29, 2021

Conversation

kuosman
Copy link
Contributor

@kuosman kuosman commented Apr 29, 2021

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 for redis-session profile.

Usage

Add redis-aws profile to oskari-ext.properties -file, also redis-session session profile needed there.

oskari.profiles=redis-session, redis-aws

Testing

Securing Redis

You can test secured redis environment following way:

  • locate your redis configuration file, edit it or make new copy
  • add rename-command CONFIG "" line there (disables CONFIG command in redis)
  • run redis-server: redis-server <configuration-file>

Test without redis-aws profile

Start application server without oskari.profiles=redis-aws configuration,
error ERR unknown command 'CONFIG' appears in the log.

Test within redis-aws profile

Start application server within oskari.profiles=redis-session, redis-aws configuration,
application server start correctly.

@sonarcloud
Copy link

sonarcloud bot commented Apr 29, 2021

Kudos, SonarCloud Quality Gate passed!

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

No Coverage information No Coverage information
No Duplication information No Duplication information

@ZakarFin ZakarFin added this to the 2.3.0 milestone Apr 29, 2021
@ZakarFin
Copy link
Member

Thanks!

@ZakarFin ZakarFin merged commit 556c69d into oskariorg:develop Apr 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants