Skip to content

Commit 0fe8462

Browse files
ai: apply changes for #919 (1 review thread)
Addresses: - #3828367785 at src/databricks/sql/backend/kernel/auth_bridge.py:265 Signed-off-by: peco-engineer-bot[bot] <peco-engineer-bot[bot]@users.noreply.github.com>
1 parent c3eacf7 commit 0fe8462

1 file changed

Lines changed: 18 additions & 0 deletions

File tree

src/databricks/sql/backend/kernel/auth_bridge.py

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -270,6 +270,24 @@ def kernel_auth_kwargs(
270270
"auth_type='azure-sp-m2m' requires azure_client_id and "
271271
"azure_client_secret."
272272
)
273+
# azure-sp-m2m carries its credentials in the azure_* namespace, so a
274+
# conflicting OAuth signal is not a routing collision and does not fail
275+
# loudly the way the other flows do (see the routing note above). Still,
276+
# leave a breadcrumb: a caller who paired azure-sp-m2m with an
277+
# oauth_*/credentials_provider value likely misunderstood the routing,
278+
# and those values are silently ignored here.
279+
ignored_signals = [
280+
name
281+
for name in ("oauth_client_secret", "oauth_jwt_key_file", "credentials_provider")
282+
if opts.get(name) is not None
283+
]
284+
if ignored_signals:
285+
logger.debug(
286+
"auth_type='azure-sp-m2m' selected; ignoring conflicting "
287+
"credential signal(s) %s (Azure SP credentials in the azure_* "
288+
"namespace take precedence on the kernel path).",
289+
", ".join(ignored_signals),
290+
)
273291
kwargs = {
274292
"auth_type": "azure-sp-m2m",
275293
"azure_client_id": azure_client_id,

0 commit comments

Comments
 (0)