Open
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds optional TLS/SSL configuration for MariaDB/MySQL connections in the Docker iTop environment, wiring certificate mounts into the DB/client containers and documenting how to enable secure transport.
Changes:
- Add database TLS configuration (cert paths, TLS versions/ciphers,
require_secure_transport) for MySQL/MariaDB. - Mount DB/webserver certificate directories into services (PHP, DBs, Adminer) and add a PHP client config (
client.cnf). - Extend documentation to describe TLS enablement and Adminer SSL usage.
Reviewed changes
Copilot reviewed 16 out of 19 changed files in this pull request and generated 18 comments.
Show a summary per file
| File | Description |
|---|---|
| readme.md | Updates container descriptions and mentions DB TLS/cert availability. |
| docker-compose.yml | Mounts certs into PHP/DB/Adminer and adds Adminer SSL env vars/plugins mount. |
| build/default_configuration/php/client.cnf | Adds MySQL/MariaDB client TLS configuration. |
| build/default_configuration/mysql/my.cnf | Adds MySQL server TLS settings and require_secure_transport. |
| build/default_configuration/mariadb/my.cnf | Adds MariaDB server TLS settings and require_secure_transport. |
| build/default_configuration/certs/webserver/certificate.key | Adds bundled webserver private key (sensitive). |
| build/default_configuration/certs/webserver/certificate.crt | Adds bundled webserver certificate. |
| build/default_configuration/certs/database/* | Adds CA/client/server certs and private keys for DB TLS. |
| build/default_configuration/adminer/plugins-enabled/enable-ssl;php.php | Adds Adminer plugin to enable SSL connections. |
| addons/documentation/how_to.md | Adds/updates TLS and dump import/export guidance. |
| addons/docker_scripts/down_and_up.sh | Adds helper script to restart compose with .env.local. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1
to
+28
| -----BEGIN PRIVATE KEY----- | ||
| MIIEvQIBADANBgkqhkiG9w0BAQEFAASCBKcwggSjAgEAAoIBAQCg8bWnm5ld3N9P | ||
| bYg00E4Z5KCtUz5FBBBJo6UTUO7rRufkOnLeB7RFwk9bzjnhciGvE25q/ggU8Iyq | ||
| qK+otNGSrKYd7EGjAmMZsd6mMD56/kECriK9hWmH2FAKbA0GiTDhsw1T7FgpHMMP | ||
| n1EP5IP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EFhEaYqxOwuqiUxw5h7Fn5/gYqDp | ||
| 2/c+Q6kZvjxZlGJ7thaqHNKhKy/HW10+YI8AWnMj7GMEJfIcl2o7sjwZIwKBgEG5 | ||
| diCOpj440ubLJJAEdSeEwqJiITLXPdyABO+nfVHMrkKRRubMtcXJ9p6TmoLRC1jA | ||
| Tq3qCGyRZ909p8LbGlwbx3l3YEWR11dAw92rZcnrhhhzjXdPorRPdBBpRF0cSc4s | ||
| sOABD8UIs5WdP/ihsHVnwoVH6/AbJA5xC1b80MYJAoGAQ8/Cx4ylHJFjJjv4BWJb | ||
| 5Pu0CVyEvDR+ADY4+Dcfx6h43nJ8kfhIUtUCVNfvttNoJsCbPx4mwhYjRbWcCaEm | ||
| r3N4P6TUwvBw4D1ZFTwcZ0fM6Y9huw34KaTxePlRhNrz7IgbXqspkH4NzIT6wzdB | ||
| 57pufY7n+6Fwfh6UBSpAjl4= | ||
| -----END PRIVATE KEY----- |
| volumes: | ||
| - ${CONF_FOLDER}/php/php.ini:/usr/local/etc/php/conf.d/php.ini | ||
| - ${CONF_FOLDER}/php/xdebug.ini:/usr/local/etc/php/conf.d/xdebug.ini | ||
| - ${CONF_FOLDER}/php/client.cnf:/etc/mysql/conf.d/client.cnf |
| - ${HTML_FOLDER}:/var/www/html/ | ||
| - ${DATA_FOLDER}/php/coverage:${PHP_COVERAGE_OUTPUT_FOLDER} | ||
| - ${DATA_FOLDER}/php/profile:${PHP_PROFILE_OUTPUT_FOLDER} | ||
| - ${CONF_FOLDER}/certs/database:/etc/database/certs |
| - ${CONF_FOLDER}/mariadb:/etc/mysql/conf.d | ||
| - ${DATA_FOLDER}/mariadb/:/var/lib/mysql | ||
| - ${DATA_FOLDER}/dbdump/:/tmp/dbdump | ||
| - ${CONF_FOLDER}/certs/database:/etc/mariadb/certs |
Comment on lines
+11
to
+17
| return new AdminerLoginSsl( | ||
| $ssl = [ | ||
| 'key' => $key, | ||
| 'cert' => $cert, | ||
| 'ca' => $ca, | ||
| 'verify' => false, | ||
| ] |
Comment on lines
+1
to
+28
| -----BEGIN PRIVATE KEY----- | ||
| MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQCpHm2Aeb4Rn8ke | ||
| X4JSL+inGCVdLoDc9Ssy/qK7xTYqV5iscR1R07ZCHk/+r9icXY2I3HqxW64wAlCH | ||
| /hHGMmF/dbN8CrNsB0GGU7mne2G+dHpYUKcjbP7jv8+RcCczRG3xz2t5WWaM0KmF | ||
| DuJdBWVt/NMWAFD9ghMt0PThNOkHCYyg6z+cbkXypKJuQzi6Evpm3otH1k45PnAr | ||
| fQgvHrYJVf1JqzOydzPwy5h8JSLIrf/EYgcddHVeRzI6SO+OJNvI76h1QO7pbgcn | ||
| c1rqFJTcsPlrj59JZsmq6twbbtd1JYnRy6BpunSxUS0yMiBeHRSJK//Q23Cc37K0 | ||
| P2BT1rcPAgMBAAECggEACLbhq5oaWiwin+cJ/xQq59lNq5SG3VvgwvruBcDuvpXO | ||
| 7yvQ9/Nx08xeEOCcx8nmTiQWSmdP/XdREQDdh5n2/itheUXP4wQoszRDP8cSzU6R | ||
| M1XMlv250KCEoJjn3DNteuVWQ2WA7EagRZPzxBlQFa/ObLbNdZKrTFQVGjmwvEUD | ||
| KMrGicCoSZ4TP9tt+cnB3e2K7qOlH2C+6lCkaC/Z6Ee/T+F2prmD4xVX459H9/dU | ||
| /4g/20BFOKQYR7Yijf4VyZew+5B2Xj69VEbJKk/2VM/dM4vNnJNZTaccuqIo9Wl2 | ||
| zAo1Qe5JWGFvn0d6ydWtMbIjjE6BL61x39twhAkPkQKBgQDkyHbal9dtw3+8Z4zI | ||
| 1RWhoAsKXtsAwzstU7WInYLLsrq31PQ/5BhmYBxzR4YkiTcUFzZNliWKpMC9phXA | ||
| t5G8xgwc3+a6H6vV5pMy6TKm3h0Mn0mw9vL9cDgEtE0+Rkz0Tx/J45Ij5jC4/xF8 | ||
| k8sc2kOeHUXhaBIMPllEwDeOmQKBgQC9POdeYffzOfT/p3KaQQobxqS9xO36hsar | ||
| TNvV7QM7q08dwuN8jC2iO+ogDaS1rpMfnU7yCuZEfKDXmPG9zOYSEp7SEIFAfAxd | ||
| JPhOIHv/EXBe2zTwMEQzQDN08u15YGRHxSdOD6FIVAz4p/AxrVOiEaivchVBt7/2 | ||
| kMlZP1tD5wKBgQDj9KoYXDsW7ziTbUnlwgtvo5vclW75b43DOCklGmx8snVBPjqw | ||
| foGhYBp48sdCGEZ9CjPdUsHNRyOU06vQ/heEVIE1NBMdWPlKhBgfHiSOB7pCHWS7 | ||
| oxOyWuI2LcDZUArVUxGFg+7VPkNF0UCHNGupMAE3xksesSdqc6VWz3+L4QKBgHvN | ||
| 6KC6/3jFJiBL8JIykuZxIz50JC2PF1LiycA/e6oB/ZS++A13uDM3d4jY5DVorSA1 | ||
| znxT3SpZTvE+QommD68rN3S/D5Ccl4oosbqLThQl2Jp2Vz/8k+Hj0sZkWDDcez7p | ||
| ITnUx/OF6aaUWHRnrRuO6gk+XeHM0W4Cc3hMFu1pAoGBAORT+sBVRK82krDC3S2f | ||
| 5f+CzCIAku0tx1wiRcJk9TMQwqlDSb5DgfqyrnvXQNz5afkOnYt3j3naQdDS8qux | ||
| gWEjxFhNK6K9C3J+YuzqaXaMEH6qxIhxrpYATGWSJBtXldytOAc8vEIhqSf3gFH9 | ||
| kJZUFZgmTlYoHLV40JEYeB8d | ||
| -----END PRIVATE KEY----- |
| DB_SSL_CERT: '/etc/database/certs/client-cert.pem' | ||
| DB_SSL_CA: '/etc/database/certs/ca.pem' | ||
| volumes: | ||
| - ${CONF_FOLDER}/certs/database:/etc/database/certs |
Comment on lines
+4
to
+7
| $key = $_ENV['DB_SSL_KEY']; | ||
| $cert = $_ENV['DB_SSL_CERT']; | ||
| $ca = $_ENV['DB_SSL_CA']; | ||
|
|
| 🐳 [Docker official image page](https://hub.docker.com/_/mysql) | ||
| > [!IMPORTANT] | ||
| > `require_secure_transport` flag is set to `OFF` in the default configuration of the database.\ | ||
| If you want to enable it, you can change the `my.cnf` file included in the database conf directory. [How To...](./addons/documentation/how_to.md#edit-configuration-2)\ |
| > [!IMPORTANT] | ||
| > `require_secure_transport` flag is set to `OFF` in the default configuration of the database.\ | ||
| If you want to enable it, you can change the `my.cnf` file included in the database conf directory. [How To...](./addons/documentation/how_to.md#edit-configuration-2)\ | ||
| You also need to set `db_tls.enabled' => true` in iTop configurations. |
Molkobain
reviewed
May 4, 2026
| - [PHP](#php) | ||
| - [Change PHP settings](#change-php-settings) | ||
| - [Change XDebug settings](#change-xdebug-settings) | ||
| - [Change MariaDB client settings](#change-mariadb-client-settings) |
Contributor
There was a problem hiding this comment.
Should we say "MariaDB / MySQL" as it impacts MySQL as well?
| > [!NOTE] | ||
| > Browse [XDebug settings](https://xdebug.org/docs/all_settings) for more information. | ||
|
|
||
| ### Change MariaDB client settings |
Contributor
There was a problem hiding this comment.
Isn't there a typo in the file's name?
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.
Base information
Symptom (bug) / Objective (enhancement)
Add configuration for secured connection between database server and client