Commit 19f9699
committed
refactor(auth): replace pyOpenSSL with standard ssl and cryptography
Replace pyOpenSSL with standard library ssl for mTLS transport and update key decryption to use cryptography library.
This change also enhances security for handling private keys by:
- Using Linux memfd_create for RAM-backed in-memory files to avoid writing secrets to physical storage.
- Encrypting plaintext keys on-the-fly before writing to fallback temporary files on disk.
- Securely wiping temporary files with null bytes before deletion.1 parent 384724c commit 19f9699
15 files changed
Lines changed: 377 additions & 181 deletions
File tree
- packages/google-auth
- google/auth
- aio/transport
- transport
- system_tests
- tests
- transport
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | 28 | | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
55 | | - | |
56 | 34 | | |
57 | 35 | | |
58 | 36 | | |
| |||
71 | 49 | | |
72 | 50 | | |
73 | 51 | | |
74 | | - | |
75 | | - | |
76 | | - | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
77 | 57 | | |
78 | 58 | | |
79 | 59 | | |
80 | | - | |
| 60 | + | |
81 | 61 | | |
82 | 62 | | |
83 | 63 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
152 | 152 | | |
153 | 153 | | |
154 | 154 | | |
155 | | - | |
156 | | - | |
157 | | - | |
| 155 | + | |
158 | 156 | | |
159 | | - | |
160 | | - | |
161 | | - | |
| 157 | + | |
162 | 158 | | |
163 | 159 | | |
164 | 160 | | |
| |||
184 | 180 | | |
185 | 181 | | |
186 | 182 | | |
187 | | - | |
188 | | - | |
189 | | - | |
| 183 | + | |
190 | 184 | | |
191 | 185 | | |
192 | 186 | | |
| |||
204 | 198 | | |
205 | 199 | | |
206 | 200 | | |
207 | | - | |
208 | | - | |
209 | | - | |
| 201 | + | |
210 | 202 | | |
211 | 203 | | |
212 | 204 | | |
| |||
221 | 213 | | |
222 | 214 | | |
223 | 215 | | |
224 | | - | |
225 | | - | |
226 | | - | |
| 216 | + | |
227 | 217 | | |
228 | | - | |
229 | | - | |
230 | | - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
231 | 221 | | |
232 | 222 | | |
233 | 223 | | |
| |||
Lines changed: 1 addition & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
27 | | - | |
28 | 26 | | |
29 | 27 | | |
30 | 28 | | |
| |||
45 | 43 | | |
46 | 44 | | |
47 | 45 | | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | 46 | | |
54 | 47 | | |
55 | 48 | | |
| |||
274 | 267 | | |
275 | 268 | | |
276 | 269 | | |
277 | | - | |
| 270 | + | |
278 | 271 | | |
279 | 272 | | |
280 | 273 | | |
| |||
0 commit comments