You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<summary><strong>Fixing “CA cert does not include key usage extension”</strong></summary>
127
+
128
+
### Why the error happens
129
+
130
+
When Azure CLI authenticates, it makes HTTPS requests (via MSAL → Requests → OpenSSL). If you’re intercepting TLS with Burp, Burp generates “on the fly” certificates for sites like `login.microsoftonline.com` and signs them with Burp’s CA.
131
+
132
+
On newer stacks (Python 3.13 + OpenSSL 3), CA validation is stricter:
133
+
134
+
- A CA certificate must include **Basic Constraints: `CA:TRUE`** and a **Key Usage** extension permitting certificate signing (**`keyCertSign`**, and typically **`cRLSign`**).
135
+
136
+
Burp’s default CA (PortSwigger CA) is old and typically lacks the Key Usage extension, so OpenSSL rejects it even if you “trust it”.
137
+
138
+
That produces errors like:
139
+
140
+
-`CA cert does not include key usage extension`
141
+
-`CERTIFICATE_VERIFY_FAILED`
142
+
-`self-signed certificate in certificate chain`
143
+
144
+
So you must:
145
+
146
+
1. Create a modern CA (with proper Key Usage).
147
+
2. Make Burp use it to sign intercepted certs.
148
+
3. Trust that CA in macOS.
149
+
4. Point Azure CLI / Requests to that CA bundle.
150
+
151
+
### Step-by-step: working configuration
152
+
153
+
#### 0) Prereqs
154
+
155
+
- Burp running locally (proxy at `127.0.0.1:8080`)
156
+
- Azure CLI installed (Homebrew)
157
+
- You can `sudo` (to trust the CA in the system keychain)
158
+
159
+
#### 1) Create a standards-compliant Burp CA (PEM + KEY)
160
+
161
+
Create an OpenSSL config file that explicitly sets CA extensions:
0 commit comments