-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
MySQL TLS #4642
Merged
Merged
MySQL TLS #4642
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
b062d2c
Wire MySQL TLS mode to SSL_MODE config option.
aunger 3671467
Update docs for database SSL_MODE option and MySQL.
aunger b06a324
Give SSL_MODE a default value to match the docs.
aunger 430e927
Merge branch 'master' into mysql-tls
techknowlogick File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is used to enable SSL encryption on MySQL? If
true
, do we also need to wrapenabled
totrue
?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I chose to consider SSL_MODE a simple pass-through to the driver, whether it's Postgres or Mysql. That's how it was before this PR (the string is just passed along to the driver). Unifying the configuration options of each of the underlying DBMSs is a challenge I'm not prepared to take on (mainly because I don't have the patience, MSSQL installation, or server certs to test all the possibilities).
So, for Postgres, you use the Postgres driver options (listed in the sample config file, also in this PR), and for Mysql, you use the Mysql driver options.
However, just leaving it at that could break installations that don't specify SSL_MODE in their config file (or who just hacked up the sample). These two lines of code in
models.go
are a special allowance so the app.ini default value ("disable") does the right thing in any circumstance.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@JonasFranzDEV What do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My opinion is that having disable change to false is ok because then it won't be a breaking change, and this is just protection so that it doesn't break any existing thing, but shouldn't handle the case for
enable
as users should use correct value in that case.