Skip to content

Commit

Permalink
thorough instructions for testing mTLS support in Python 🐍 (CFT-3328)
Browse files Browse the repository at this point in the history
  • Loading branch information
soustruh committed Feb 6, 2025
1 parent 48fae25 commit 3993967
Showing 1 changed file with 51 additions and 5 deletions.
56 changes: 51 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -1226,18 +1226,64 @@ 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/",
"caCertificate": "-- rootCA.crt --",
"#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.

0 comments on commit 3993967

Please sign in to comment.