Secure HTTP Communication with mTLS
Configure HTTP provider with TLS/SSL for mutual TLS (mTLS) authentication. Securely connect services using certificate-based security.
Why it matters
Establish secure, authenticated communication channels for your applications using mutual TLS (mTLS) authentication with the HTTP provider.
Outcomes
What it gets done
Configure HTTP provider for TLS/SSL certificates.
Implement mutual TLS (mTLS) authentication.
Secure API endpoints and data transfer.
Install
Add it to your toolbox
Run in your project directory:
curl -fsSL https://spark.entire.vc/get/pfoo-http-provider-tls | bash Overview
Http Provider Tls
This example shows how to set up the HTTP provider in promptfoo to use TLS/SSL certificates for mutual TLS (mTLS) authentication. It enables secure communication by requiring both the client and server to present valid certificates. Use this when your promptfoo tests need to interact with an HTTP endpoint that enforces mTLS authentication. This ensures secure, verified connections to sensitive services.
What it does
This example demonstrates how to configure the HTTP provider within promptfoo to utilize TLS/SSL certificates for mutual TLS (mTLS) authentication. It enables secure, certificate-based communication between services.
When to use - and when NOT to
Use this configuration when you need to establish a secure connection to an HTTP endpoint that requires mTLS authentication. This is common in enterprise environments or when integrating with sensitive APIs. Do NOT use this if your target HTTP endpoint does not require mTLS or if you are not managing TLS certificates.
Inputs and outputs
Inputs include the necessary TLS/SSL certificate files (e.g., client certificate, client key, CA certificate) and the configuration for the HTTP provider within promptfoo. The output is a secure, authenticated connection to the target HTTP service, allowing promptfoo to send requests and receive responses.
Integrations
This configuration is designed for use with promptfoo, an open-source tool for evaluating and testing LLM prompts. It directly integrates with promptfoo's HTTP provider functionality.
Who it's for
This is for developers and DevOps engineers who are using promptfoo to test LLM applications that interact with backend services requiring mTLS. It differs from standard HTTP configurations by adding the crucial layer of certificate-based authentication, ensuring only trusted clients can connect.
Source README
This example demonstrates how to configure the HTTP provider with TLS/SSL certificates for mutual TLS (mTLS) authentication.
FAQ
Common questions
Discussion
Questions & comments · 0
Sign In Sign in to leave a comment.