Skip to content

Commit

Permalink
FEATURE: Add setting for encryption key
Browse files Browse the repository at this point in the history
With this the encryption key can be defined in a setting.
When defined it is not received from cache anymore.

Resolves: neos#3425
  • Loading branch information
Christoph Lehmann committed Dec 21, 2024
1 parent 70f54fd commit f26ad1a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Neos.Flow/Classes/Security/Cryptography/HashService.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ class HashService
public function injectSettings(array $settings)
{
$this->strategySettings = $settings['security']['cryptography']['hashingStrategies'];
if (!empty($settings['security']['cryptography']['encryptionKey'])) {
$this->encryptionKey = $settings['security']['cryptography']['encryptionKey'];
}
}

/**
Expand Down
4 changes: 4 additions & 0 deletions Neos.Flow/Configuration/Settings.Security.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,10 @@ Neos:

cryptography:

# A private, unique key used for encryption tasks. Normally 40 characters long and received from a persistent
# filesystem cache. If set to a non-empty string, the cache is not involved anymore.
encryptionKey: ''

hashingStrategies:

# The default strategy will be used to hash or validate passwords if no specific strategy is given
Expand Down

0 comments on commit f26ad1a

Please sign in to comment.