[4.0] No TLS transfer encryption for database connections if localhost#26889
Merged
HLeithner merged 8 commits intojoomla:4.0-devfrom Nov 28, 2019
Merged
Conversation
…ction-encryptions-not-localhost
This was referenced Nov 1, 2019
Member
Author
|
Potential testers please wait with testing until title does not contain "[WiP]" anymore and status on GitHub is not draft anymore. |
Reset db encryption fields in global config server section if db host is localhost
Contributor
|
I have tested this item ✅ successfully on 6f293c0 This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/26889. |
Contributor
|
I have tested this item ✅ successfully on ed138ce This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/26889. |
Member
Author
Contributor
|
RTC. This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/26889. |
Member
Member
Author
|
Thanks. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Pull Request for Issue # .
Follow-up to PR #26375 .
Summary of Changes
With PR #26375 the possibility to use encrypted database connections was added to the CMS, and with PR #26888 it would be added to the installation process, too, if that is accepted.
Again thanks to @andrepereiradasilva for the implementation of these new features.
Because database connections default to socket connections in case if the database server is 'localhost' (which is of course more performant that a TCP/IP connection like e.g. to '127.0.0.1' or '::1'), and encryption is not possible with socket connections, this PR here changes the showon condition for the related fields in the server section of the Global Configuration form so that they are hidden when database server is 'localhost', and it adds an onchange JS to clear the fields when changing database server from something else to 'localhost'.
The JS added by this PR has the advantage that it can be used in future for other onchange events, too, e.g. if we want to clear the FTP related fields when disabling the FTP layer.
Testing Instructions
Result: See section "Actual result" below.
Run
npm run build:js.Result: See screenshot 1 in section "Expected result" below.
Result: See screenshot 2 in section "Expected result" below.
Result: See screenshot 3 in section "Expected result" below.
Result: The options for database connection encryption are hidden again.
Result: See screenshot 4 in section "Expected result" below.
Expected result
Actual result
When the database host (field "Host") is "localhost", fields related to database connection encryption are shown depending on the value selected in field "Connection Envrytion". If "Two-way encryption" is selected, you can enter values in the text fields shown in this case.
Documentation Changes Required
See PR #26375 .