Commit 3368f27
authored
feat: Add helper methods for asynchronous x.509 certificate discovery (#1956)
This PR introduces the google.auth.aio.transport.mtls module, providing
asynchronous helper methods for mTLS certificate discovery
[go/caa:x509-async-support](http://goto.google.com/caa:x509-async-support).
These helpers are designed to be for x.509 certs discovery and
non-blocking, ensuring that disk I/O operations are async during mTLS
handshake process. Plus, added unit tests respectively for the helper
functions.
Please note: Only x.509 creds are in scope of this project currently.
Context aware or ECP credentials are not in scope of this project
currently.
Next Steps: Will create a followup PR will that will utilize these
helpers to implement `configure_mtls_channel` within the
`AsyncAuthorizedSession` class.
---------
Signed-off-by: Radhika Agrawal <agrawalradhika@google.com>1 parent 89fc6f2 commit 3368f27Copy full SHA for 3368f27
6 files changed
+304-16Lines changed: 304 additions & 16 deletions
File tree
Expand file treeCollapse file tree
Open diff view settings
Filter options
- packages/google-auth
- google/auth
- aio/transport
- transport
- system_tests/system_tests_sync
- tests/transport
Expand file treeCollapse file tree
Open diff view settings
Collapse file
packages/google-auth/google/auth/aio/transport/mtls.py
Copy file name to clipboard+137Lines changed: 137 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | + |
| 14 | + |
| 15 | + |
| 16 | + |
| 17 | + |
| 18 | + |
| 19 | + |
| 20 | + |
| 21 | + |
| 22 | + |
| 23 | + |
| 24 | + |
| 25 | + |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
| 30 | + |
| 31 | + |
| 32 | + |
| 33 | + |
| 34 | + |
| 35 | + |
| 36 | + |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | + |
| 42 | + |
| 43 | + |
| 44 | + |
| 45 | + |
| 46 | + |
| 47 | + |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | + |
| 52 | + |
| 53 | + |
| 54 | + |
| 55 | + |
| 56 | + |
| 57 | + |
| 58 | + |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | + |
| 63 | + |
| 64 | + |
| 65 | + |
| 66 | + |
| 67 | + |
| 68 | + |
| 69 | + |
| 70 | + |
| 71 | + |
| 72 | + |
| 73 | + |
| 74 | + |
| 75 | + |
| 76 | + |
| 77 | + |
| 78 | + |
| 79 | + |
| 80 | + |
| 81 | + |
| 82 | + |
| 83 | + |
| 84 | + |
| 85 | + |
| 86 | + |
| 87 | + |
| 88 | + |
| 89 | + |
| 90 | + |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | + |
| 95 | + |
| 96 | + |
| 97 | + |
| 98 | + |
| 99 | + |
| 100 | + |
| 101 | + |
| 102 | + |
| 103 | + |
| 104 | + |
| 105 | + |
| 106 | + |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | + |
| 111 | + |
| 112 | + |
| 113 | + |
| 114 | + |
| 115 | + |
| 116 | + |
| 117 | + |
| 118 | + |
| 119 | + |
| 120 | + |
| 121 | + |
| 122 | + |
| 123 | + |
| 124 | + |
| 125 | + |
| 126 | + |
| 127 | + |
| 128 | + |
| 129 | + |
| 130 | + |
| 131 | + |
| 132 | + |
| 133 | + |
| 134 | + |
| 135 | + |
| 136 | + |
| 137 | + |
Collapse file
packages/google-auth/google/auth/transport/_mtls_helper.py
Copy file name to clipboardExpand all lines: packages/google-auth/google/auth/transport/_mtls_helper.py+16-6Lines changed: 16 additions & 6 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
25 | 25 | |
26 | 26 | |
27 | 27 | |
| 28 | + |
| 29 | + |
28 | 30 | |
29 | 31 | |
30 | 32 | |
| ||
103 | 105 | |
104 | 106 | |
105 | 107 | |
106 | | - |
| 108 | + |
| 109 | + |
| 110 | + |
107 | 111 | |
108 | 112 | |
109 | 113 | |
110 | 114 | |
111 | 115 | |
112 | 116 | |
113 | 117 | |
| 118 | + |
| 119 | + |
114 | 120 | |
115 | 121 | |
116 | 122 | |
| ||
121 | 127 | |
122 | 128 | |
123 | 129 | |
124 | | - |
| 130 | + |
| 131 | + |
| 132 | + |
125 | 133 | |
126 | 134 | |
127 | 135 | |
128 | 136 | |
129 | 137 | |
130 | 138 | |
131 | 139 | |
132 | | - |
| 140 | + |
133 | 141 | |
134 | 142 | |
135 | 143 | |
| ||
141 | 149 | |
142 | 150 | |
143 | 151 | |
| 152 | + |
| 153 | + |
144 | 154 | |
145 | 155 | |
146 | 156 | |
| ||
155 | 165 | |
156 | 166 | |
157 | 167 | |
158 | | - |
| 168 | + |
159 | 169 | |
160 | 170 | |
161 | 171 | |
| ||
166 | 176 | |
167 | 177 | |
168 | 178 | |
169 | | - |
170 | | - |
| 179 | + |
| 180 | + |
171 | 181 | |
172 | 182 | |
173 | 183 | |
|
Collapse file
packages/google-auth/google/auth/transport/mtls.py
Copy file name to clipboardExpand all lines: packages/google-auth/google/auth/transport/mtls.py+9-4Lines changed: 9 additions & 4 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
20 | 20 | |
21 | 21 | |
22 | 22 | |
23 | | - |
| 23 | + |
24 | 24 | |
25 | 25 | |
| 26 | + |
| 27 | + |
| 28 | + |
| 29 | + |
26 | 30 | |
27 | 31 | |
28 | 32 | |
29 | 33 | |
30 | | - |
| 34 | + |
| 35 | + |
31 | 36 | |
32 | 37 | |
33 | 38 | |
| ||
58 | 63 | |
59 | 64 | |
60 | 65 | |
61 | | - |
| 66 | + |
62 | 67 | |
63 | 68 | |
64 | 69 | |
| ||
94 | 99 | |
95 | 100 | |
96 | 101 | |
97 | | - |
| 102 | + |
98 | 103 | |
99 | 104 | |
100 | 105 | |
|
Collapse file
packages/google-auth/system_tests/system_tests_sync/test_service_account.py
Copy file name to clipboardExpand all lines: packages/google-auth/system_tests/system_tests_sync/test_service_account.py+2-2Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
41 | 41 | |
42 | 42 | |
43 | 43 | |
44 | | - |
| 44 | + |
45 | 45 | |
46 | 46 | |
47 | 47 | |
48 | 48 | |
49 | | - |
| 49 | + |
50 | 50 | |
51 | 51 | |
52 | 52 | |
|
0 commit comments