feat: get_web_login_auth on the vCenter, a source per provider and SSO domain (NetOrk/netork#662)

The vCenter driver reads how people log in to the vSphere Client, in
napalm-device-types' WebLoginAuthDict: each identity provider of identity
federation (GET /api/vcenter/identity/providers) is a source that decides
itself (external), the default first; each SSO domain the vSphere API names
(UserDirectory.domainList) is a source whose second factor cannot be read
(unknown), since smart card and RSA SecurID live in SSO's authentication
policy, which neither API exposes.

Listing the providers needs VcIdentityProviders.Read and .Manage; without
them the vCenter answers 403 and the driver raises PermissionError naming
them. The REST read logs in to /api/session with the same account and logs
out after. The ESXi driver has no reader.
This commit is contained in:
Christian Manivong committed 2026-11-29 20:09:55 +01:00
1 parent e1677bebb2
commit ab18ca87ca
10 files changed
+529 -6

No files matched your search

+3
View File
@@ -42,6 +42,9 @@ class FakeInventory:
def licenses(self) -> list[dict[str, Any]]:
return self.data.get("licenses", [])
def sso_domains(self) -> list[str]:
return self.data.get("sso_domains", [])
def collect(self, type_name: str, paths: Sequence[str]) -> list[dict[str, Any]]:
self.calls.append((type_name, tuple(paths)))
rows = self.data["objects"].get(type_name, [])