From 399396781566e3e6943c023472b7ba899babe996 Mon Sep 17 00:00:00 2001 From: soustruh Date: Thu, 6 Feb 2025 17:03:20 +0100 Subject: [PATCH] =?UTF-8?q?thorough=20instructions=20for=20testing=20mTLS?= =?UTF-8?q?=20support=20in=20Python=20=F0=9F=90=8D=20(CFT-3328)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 51 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 9955548..a18f052 100644 --- a/README.md +++ b/README.md @@ -1226,9 +1226,16 @@ or (with local source code and vendor copy) docker compose run --rm tests-local ``` -# mTLS -1. Run `cd docker/keys` and then `./genkeys.sh`. The script generates CA, server and client certificates - and also a config.json file with the following structure to be pasted into your own config.json: +# Debugging mTLS support + +## Generate certificates and run mTLS nginx server + +1. Generate CA, server and client certificates: + ``` + cd docker/keys + ./genkeys.sh + ``` + The script also creates a `config.json` file with the following structure to be pasted into your own `config.json`: ``` "api": { "baseUrl": "https://server.local/", @@ -1236,8 +1243,47 @@ docker compose run --rm tests-local "#clientCertificate": "-- client.crt bundled with client.key --", } ``` -1. Restart nginx +1. Run nginx: + ``` + cd ../.. + docker compose up server.local + ``` + +## Testing in PHP + +``` +to be written… +``` + +## Testing in Python + +1. Create a `config.json` file in `python-sync-actions/data` with the following content: + ``` + { + "parameters": { + "__SELECTED_JOB": "0", + "config": { + "jobs": [ + { + "__NAME": "mTLS check", + "endpoint": "", + "method": "GET" + } + ] + }, + "api": { + } + } + } + ``` +1. Paste the `"api"` section generated in the 1st step into the newly created config file. +1. Run the python-sync-actions component: + ``` + cd python-sync-actions + docker compose up dev + ``` + -## License +# License MIT licensed, see [LICENSE](./LICENSE) file.