Skip to content

Conversation

@kevinjqliu
Copy link
Contributor

@kevinjqliu kevinjqliu commented Jan 28, 2026

Closes #2800

Rationale for this change

Adds EntraAuthManager for Microsoft Entra ID (Azure AD) authentication using DefaultAzureCredential from the Azure Identity library.

Supported auth methods

  • Environment variables (AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET)
  • Managed Identity (system or user-assigned)
  • Azure CLI (az login)
  • Workload Identity (AKS)

Are these changes tested?

Yes, unit tests, tested locally with OneLake and az cli,

Preview for docs:
Screenshot 2026-01-27 at 5 40 59 PM

Are there any user-facing changes?

Comment on lines 98 to +99
gcp-auth = ["google-auth>=2.4.0"]
entra-auth = ["azure-identity>=1.25.1"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There doesnt seem to be docs on these extra groups? Should we add some information about these eventually?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch, ty!

Copy link
Contributor

@rambleraptor rambleraptor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've got one suggestion for a test, but otherwise this looks great!


def __init__(
self,
scopes: list[str] | None = None,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: consider making the default for this [self.DEFAULT_SCOPE]. That's basically the default anyways (line 287)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that would make the param a mutable list (and shared across calls) which is generally discouraged in python



@patch("azure.identity.DefaultAzureCredential")
def test_entra_auth_manager_default_credential(mock_default_cred: MagicMock, rest_mock: Mocker) -> None:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a test where the azure-default library can't successfully get a token? I'd expect that we'd throw an exception and not try to start sending Iceberg requests with a blank auth header.

Copy link
Contributor

@Fokko Fokko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree with @jayceslesar's comment, but apart from that, it looks good to me 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feature request: add entra as an auth manager

4 participants