Skip to content

WIP: simple local mTLS setup#15

Draft
rkdefra wants to merge 18 commits into
mainfrom
test/mtls-support
Draft

WIP: simple local mTLS setup#15
rkdefra wants to merge 18 commits into
mainfrom
test/mtls-support

Conversation

@rkdefra

@rkdefra rkdefra commented Mar 28, 2025

Copy link
Copy Markdown
Contributor

TL;DR

Run the convenience script to launch a local docker compose environment similar to CDP:

test_scripts/emulate-cdp.sh

More details

  • create a docker compose setup to emulate the various infrastructure in the deployed CDP environments

  • add a proxy to mimic CDP squid proxy

  • make the mock mTLS capable

  • add convenience scripts to automate tasks

    test_scripts/emulate-cdp.sh help
  • create local testing SSL assets using the convenience script:

     test/acceptance/setup-mtls.sh

    Using common name: localhost
    This can be changed by passing a command line argument to the script:
    test/acceptance/setup-mtls.sh my-common-name

    Setting up mutual TLS assets...
    ✔ generate private key: ./mtls/ca.key
    ✔ generate certificate signing request: ./mtls/ca.csr
    ✔ sign certificate: ./mtls/ca.crt
    ✔ generate private key: ./mtls/server.key
    ✔ generate certificate signing request: ./mtls/server.csr
    ✔ sign certificate: ./mtls/server.crt
    ✔ generate private key: ./mtls/client.key
    ✔ generate certificate signing request: ./mtls/client.csr
    ✔ sign certificate: ./mtls/client.crt
    MTLS setup complete

  • start a simple Node server and make an mTLS request (using the generated assets)

    node test/acceptance/api.ruraldev-mock.js

    handling request...
    valid
    200
    { status: 'ok' }

@rkdefra rkdefra mentioned this pull request Mar 28, 2025
6 tasks
@rkdefra
rkdefra force-pushed the test/mtls-support branch from 0cba554 to 06c227b Compare March 28, 2025 22:14
@rkdefra
rkdefra force-pushed the test/mtls-support branch from 06c227b to 0a7dbd8 Compare April 11, 2025 14:37
@rkdefra
rkdefra force-pushed the test/mtls-support branch from 0a7dbd8 to 6f9daea Compare April 11, 2025 14:41
@rkdefra rkdefra changed the title test: simple local mTLS setup WIP: simple local mTLS setup Apr 11, 2025
@rkdefra
rkdefra marked this pull request as draft May 23, 2025 12:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant