mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-09-22 13:39:35 +00:00
Add ssl fix for certificates with different hostname than the IP and doc improvement
This commit is contained in:
@@ -107,13 +107,13 @@ const normalizeAdcsUrl = (url: string): string => {
|
||||
const createHttpsAgent = (sslRejectUnauthorized: boolean, sslCertificate?: string): https.Agent => {
|
||||
const agentOptions: https.AgentOptions = {
|
||||
rejectUnauthorized: sslRejectUnauthorized,
|
||||
keepAlive: true // axios-ntlm needs keepAlive for NTLM handshake
|
||||
keepAlive: true, // axios-ntlm needs keepAlive for NTLM handshake
|
||||
ca: sslCertificate ? [sslCertificate.trim()] : undefined,
|
||||
// Disable hostname verification as Microsoft servers by default use local IPs for certificates
|
||||
// which may not match the hostname used to connect
|
||||
checkServerIdentity: () => undefined
|
||||
};
|
||||
|
||||
if (sslCertificate && sslCertificate.trim()) {
|
||||
agentOptions.ca = [sslCertificate.trim()];
|
||||
}
|
||||
|
||||
return new https.Agent(agentOptions);
|
||||
};
|
||||
|
||||
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 448 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 421 KiB After Width: | Height: | Size: 449 KiB |
@@ -30,12 +30,23 @@ Connect Infisical to Microsoft Active Directory Certificate Services (ADCS) for
|
||||
- **Username**: Domain administrator username (format: `DOMAIN\username` or `username@domain.com`)
|
||||
- **Password**: Password for the domain administrator account
|
||||
|
||||
**SSL Tab (for HTTPS connections):**
|
||||
**SSL Tab:**
|
||||
- **SSL Certificate**: Optional PEM certificate for custom CA certificates or self-signed certificates
|
||||
- **Reject Unauthorized**: Whether to reject connections with invalid SSL certificates (recommended: keep enabled for production)
|
||||
- **Reject Unauthorized**: Whether to reject connections with invalid SSL certificates (it's recommended to keep it enabled)
|
||||
|
||||
<Note>
|
||||
**Getting the SSL Certificate**: If your ADCS server uses a self-signed certificate or a certificate from a custom CA, you can obtain the certificate using OpenSSL:
|
||||
|
||||
```bash
|
||||
openssl s_client -connect your-adcs-server:443 -showcerts
|
||||
```
|
||||
|
||||
Copy the certificate content (including `-----BEGIN CERTIFICATE-----` and `-----END CERTIFICATE-----` lines) and paste it into the SSL Certificate field.
|
||||
</Note>
|
||||
|
||||
And click **Connect to ADCS** to establish the connection.
|
||||

|
||||

|
||||
</Step>
|
||||
<Step title="Connection Created">
|
||||
Your **Azure ADCS Connection** is now available for use in your Infisical projects. 
|
||||
|
||||
Reference in New Issue
Block a user