Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ venv.bak/
# macOS
.DS_Store

# Local git worktrees
.worktrees/

# Python
__pycache__/
*.py[cod]
Expand All @@ -26,3 +29,5 @@ dist/
.eggs/
*.egg-info
poetry.lock

.worktrees/
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ pip install netboxlabs-diode-sdk
* `DIODE_CLIENT_SECRET` - Client Secret for OAuth2 authentication
* `DIODE_MAX_AUTH_RETRIES` - Maximum attempts for OAuth2 token fetch and gRPC re-authentication on `Unauthenticated` (default: `3`). Token fetch retries with exponential backoff on `429`, `500`, `502`, and `503`, honouring `Retry-After` when present on `429`/`503`.
* `DIODE_CERT_FILE` - Path to custom certificate file for TLS connections
* `DIODE_SKIP_TLS_VERIFY` - Skip TLS verification (default: `false`)
* `DIODE_SKIP_TLS_VERIFY` - Skip TLS certificate verification for `grpcs://` / `https://` targets (default: `false`). Traffic stays encrypted; only chain validation is disabled. Prefer `DIODE_CERT_FILE` for self-signed production servers.
* `DIODE_DRY_RUN_OUTPUT_DIR` - Directory where `DiodeDryRunClient` will write JSON files

### Example
Expand Down Expand Up @@ -232,7 +232,7 @@ export NO_PROXY=localhost,127.0.0.1,.example.com

**Important notes for proxy usage:**

1. **Proxy with SKIP_TLS_VERIFY**: When using HTTP(S) proxies, the SDK **always uses secure channels** because proxies require TLS for the CONNECT tunnel. Setting `DIODE_SKIP_TLS_VERIFY=true` with a proxy will log a warning and use a secure channel anyway.
1. **Proxy with SKIP_TLS_VERIFY**: For `grpcs://` / `https://` targets the SDK uses a **secure gRPC channel** (including when `DIODE_SKIP_TLS_VERIFY=true`). Proxies use an HTTP CONNECT tunnel; skip-verify disables certificate checks only, not TLS. Plaintext `grpc://` targets stay on insecure channels and use `HTTP_PROXY`.

2. **MITM proxies (like mitmproxy)**: To use an intercepting proxy, you must provide the proxy's CA certificate:
```bash
Expand Down Expand Up @@ -268,10 +268,14 @@ export DIODE_CERT_FILE=/path/to/cert.pem

#### Disabling TLS verification

Use this only as a development or break-glass escape hatch. The connection remains TLS-encrypted; the SDK skips validating the server certificate (same idea as Go `InsecureSkipVerify`).

```bash
export DIODE_SKIP_TLS_VERIFY=true
```

For self-signed or private-CA servers in production, mount the CA or server cert via `DIODE_CERT_FILE` instead.

#### For legacy certificates (CN-only, no SANs)

```python
Expand Down
Loading
Loading