For your convenience, all necessary certificates are pre-generated and available in the
Linqra/keys folder. You can use these certificates directly for local development.Pre-Generated Certificates
The following certificates and keystores are available in theLinqra/keys directory:
All certificates are configured with default password
123456 and are organized into:- Core client certificates for general use
- Gateway certificates for both local and containerized environments
- Eureka discovery certificates for both local and containerized environments
- Service-specific certificates for containerized microservices
Certificate Generation
If you need to regenerate the certificates or understand how they were created, follow the instructions below.Client Certificate
Generate a generic client certificate for your microservices:Gateway Certificates
Generate certificates for the API Gateway:Discovery Server Certificates
Generate certificates for the Eureka Discovery Server:Service-Specific Certificates
For containerized environments, generate certificates for each service:Truststore Configuration
Gateway Truststore
Import all certificates into the gateway truststore:Client Truststore
Import all certificates into the client truststore:Eureka Truststore
Import all certificates into the Eureka truststore:Python Project Certificate Setup (CounterApp)
For Python projects like CounterApp that require mutual TLS (mTLS) authentication, you need to extract certificates from Java keystores and convert them to PEM format for use with Flask.Prerequisites
Ensure you have the following files in yourCounterApp/keys/ directory:
counter-app-keystore-container.jks(Java keystore)client-truststore.jks(Java truststore)
Manual Certificate Extraction Process
If you need to manually extract certificates, follow these steps:Step 1: Extract Certificate Aliases
Step 2: Extract Certificates from Truststore
Step 3: Convert DER to PEM Format
Step 4: Extract Server Certificate and Key
Step 5: Create CA Bundle
Step 6: Create CA Certificate for Client Signing
Step 7: Create Client Certificate
Step 8: Update CA Bundle
Step 9: Validate CA Bundle
Run Complete Certificate Setup Script
- 1: Get certificate aliases dynamically from truststore
- 2: Extract all certificates from truststore (DER format)
- 3: Convert DER certificates to PEM format
- 4: Extract server certificate and private key from Java keystore
- 5: Extract server private key from Java keystore
- 6: Create CA bundle with all certificates
- 7: Clean up temporary files and unnecessary certificates
- 8: Create CA certificate for signing client certificates
- 9: Create client certificate signed by the CA
- 10: Update CA bundle with the CA certificate and cleanup
server-cert.pem: Server certificate (for Flask HTTPS)server-key.pem: Server private key (for Flask HTTPS)ca-bundle.pem: Combined CA certificates (for server validation)ca-key.pem: CA private keyca-cert.pem: CA certificateclient-key.pem: Client private keyclient-cert.pem: Client certificate
Part 3: Import Client Certificate for Browser Testing
Step 5a: Import Certificate into macOS Keychain- Open Keychain Access application
- Go to File → Import Items…
- Select
keys/certs/client-cert.pemandkeys/certs/client-key.pemfiles - Enter your macOS password when prompted
- Set trust settings to “Always Trust” for testing
Testing mTLS
Test with curl (should succeed):- Open
https://127.0.0.1:5001/healthin Chrome - Chrome will prompt for certificate selection
- Select the “client-app” certificate
- Enter your macOS password when prompted
File Structure After Setup
Verification
To verify the contents of any truststore:<truststore-name> with either gateway-truststore, client-truststore, or eureka-truststore.
Edge Service SSL Configuration
For secure local development of the Edge Service, you’ll need to set up additional SSL certificates. These certificates enable HTTPS access throughhttps://localhost:3000.
Generate Edge Service Certificate
Navigate to thekeys directory and generate the required certificate:
Trust the Certificate
- macOS
- Windows
- Linux
Security Best Practices
Add the following to your.gitignore file:
The generated certificates are valid for 365 days. For production environments, always use proper CA-signed certificates.
Certificate Details
The Edge Service certificate is configured with the following properties:- Validity: 365 days
- Key Type: RSA 2048-bit
- Common Name (CN): localhost
- Organization Unit (OU): IT
- Organization (O): Development
- Location (L): Houston
- State (ST): Texas
- Country (C): US
Directory Structure
After generating the Edge Service certificates, yourkeys directory will include:

