-
Notifications
You must be signed in to change notification settings - Fork 2.6k
batch requests never use mTLS URLs #2440
Copy link
Copy link
Closed as not planned
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
Metadata
Metadata
Assignees
Labels
priority: p2Moderately-important priority. Fix may not be included in next release.Moderately-important priority. Fix may not be included in next release.type: bugError or flaw in code with unintended results or allowing sub-optimal usage patterns.Error or flaw in code with unintended results or allowing sub-optimal usage patterns.
At:
https://github.com/googleapis/google-api-python-client/blob/main/googleapiclient/discovery.py#L1495-L1497
we build
batch_uribased off the hard-codedrootUrldiscovery doc parameter. We do this even if mTLS endpoint was previously configured onbuild()thus using batch methods never actually uses the mTLS endpoint.is_mtlsto theResourceobject so we have a simple boolean to determine mTLS status._add_basic_methodscould then use theis_mtlsboolean to determine whether to userootUrlormtlsRootUrlfrom the discovery data.