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

pkp/pkp-lib#9895 app key and encryption service integration #1575

Merged
merged 4 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 12 additions & 5 deletions config.TEMPLATE.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@

[general]

; An application specific key that is required for the app to run
; Internally this is used for any encryption (specifically cookie encryption if enabled)
app_key =

; Set this to On once the system has been installed
; (This is generally done automatically by the installer)
installed = Off
Expand All @@ -50,11 +54,6 @@
; To set the "Secure" attribute for the cookie see the setting force_ssl at the [security] group
session_samesite = Lax

; Enable this if want to enable cookie encryption
; The length of the cookie encryption key must be 16 characters
; Note that updating or removing cookie encryption key will result in logout from all devices
; session_cookie_encryption_key = ''

; Enable support for running scheduled tasks
; Set this to On if you have set up the scheduled tasks script to
; execute periodically
Expand Down Expand Up @@ -252,6 +251,14 @@

[security]

; Specific cipher algorithm used to generate app key and encryption purpose
; Valid and available algorithms are `aes-128-cbc`, `aes-256-cbc`, `aes-128-gcm` and `aes-256-gcm`
; cipher = 'aes-256-cbc'

; Define should the cookie at user's end need to be encrypted
; Enabling/Disabling will force all user to re-login
; cookie_encryption = On

; Force SSL connections site-wide and also sets the "Secure" flag for session cookies
; See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Set-Cookie#secure
force_ssl = Off
Expand Down
1 change: 1 addition & 0 deletions dbscripts/xml/upgrade.xml
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@

<upgrade minversion="3.1.0.0" maxversion="3.4.9.9">
<migration class="PKP\migration\upgrade\v3_5_0\PreflightCheckMigration" fallback="3.4.9.9" />
<migration class="PKP\migration\upgrade\v3_5_0\I9895_AddAppKeyToConfigFile"/>
<migration class="PKP\migration\upgrade\v3_5_0\InstallEmailTemplates"/>
<migration class="PKP\migration\upgrade\v3_5_0\I9197_MigrateAccessKeys"/>
<migration class="PKP\migration\upgrade\v3_5_0\I9253_SiteAnnouncements"/>
Expand Down
8 changes: 7 additions & 1 deletion docs/release-notes/README-3.5.0
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,15 @@ See config.TEMPLATE.inc.php for a description and examples of all supported
configuration parameters.

New config.inc.php parameters added for general:
- session_cookie_enctyption_key (default value: ''), allow cookie encryption when set
- app_key (default value: ''), application specific key will used internally for encryption/decryption. This will be automatically added at upgrade.

New config.inc.php parameters added for security:
- cipher (default value: ''), cipher algorithm used to generate app key and encryption purpose
- cookie_encryption (default value: ''), allow cookie encryption when set


New Features
------------
#9566 : Convert session and cookie management to Laravel
#9895 : Introduce APP KEY feature of Laravel
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't worry about adding these as we go -- I generate the new features list (and bug fix list) from Github as part of the release process.