Skip to main content

osp-uio-integrations

Shared Python integration package for UiO-specific infrastructure systems such as LDAP, MREG, and Nivlheim.

This repository is the concrete API-glue layer for external UiO systems. It is meant to keep authentication, request/response handling, error mapping, and small normalization helpers in one place so providers and transitional orchestrator code do not duplicate that plumbing.

Maintainer-facing boundaries and invariants live in each integration package's module documentation.

Scope

  • Reusable Python clients for UiO infrastructure services
  • Shared transport/auth/session glue
  • API-specific response parsing and error translation
  • Small stable normalized helper types where duplication would otherwise grow

Current focus

The LDAP integration owns the reusable UiO directory boundary shared by Python services and CLIs:

  • service and end-user bind flows, including UiO's people/system user-DN fallback
  • bounded ldap3 connect and receive timeouts
  • verified LDAPS or mandatory StartTLS using the system CA trust store; TLS failure never falls back to a plaintext password bind
  • safe equality and wildcard filter composition plus raw RFC 4515 filters
  • user, people, host, organization, netgroup, and filegroup lookup
  • automount lookup with the legacy one-hop LDAP indirection behavior
  • normalized membership fields where the legacy CLI already established a useful output contract
  • stable exceptions and password-safe reproduction commands for diagnostics

The Siteadmin integration owns the current netgroup-to-contact mapping read:

  • anonymous, explicit-token, and managed username/password authentication
  • bounded token refresh using Siteadmin's expires_at
  • strict all-or-nothing validation of the grouped current-mapping response
  • deterministic relation normalization that preserves multiple primary contacts
  • stable request failures with Siteadmin error and request metadata
  • public grouped contact-to-host lookup for provider inventory authorization
  • authenticated mreg_hostnames(), mreg_networks() and mreg_roles() snapshot reads (0.3.20), returning the source JSON object with its observation time; missing credentials fail locally, managed service login renews once on 401, and rejected explicit tokens raise AuthenticationFailedError

Caching, fixtures, snapshots, and ownership decisions remain caller policy.

The opt-in canonical package supplies comparison records for infrastructure facts without erasing their source:

  • separate CanonicalHost and host-scoped CanonicalNetwork observations
  • pure MREG, LDAP, and Nivlheim adapters with source-shaped raw snapshots
  • explicit observed-field tracking so unknown differs from observed-empty
  • exact-host grouping and diffs that do not choose authority or guess aliases

The MREG integration is a small synchronous library with:

  • explicit transport and auth handling
  • optional interactive login for token bootstrap
  • request metadata headers such as User-Agent and X-Correlation-ID
  • a host-focused surface covering queries, lifecycle, history, addressing, contacts, CNAMEs, and explicit DNS record modules
  • host-policy role/atom helpers, including batched role lookup for many hosts
  • VLAN host membership lookup with optional host-policy enrichment that avoids per-host API calls
  • room to grow into further MREG areas without flattening everything into one module

For concrete usage examples and a translation table from supported mreg-cli commands to this library API, see docs/mreg-cli-command-map.md.

Non-goals

  • Provider workflow or execution logic
  • Ownership, approval, or placement policy
  • Orchestrator/provider wire contracts
  • Provider-specific planning decisions

Install

pip install osp-uio-integrations

Development

env -u VIRTUAL_ENV uv sync --extra dev
hatch shell
hatch run dev:check
hatch run dev:build
hatch run dev:verify

Release

See docs/release.md for the manual tag and publish flow.

Create and push the annotated release tag from the checked-in release notes:

hatch run dev:tag-push

Guest readiness

VMware and NREC share the JSON cloud-init readiness boundary in guest_setup. Completed cloud-init with an empty errors list is ready for exit 0 or exit 2 (degraded done). Exit 1 and non-empty errors fail. Recoverable diagnostics remain visible as individual progress messages and in the result's cloud_init_recoverable_errors mapping, including after enrollment reboots. Gateway rendering remains a provider concern. The frozen-image compatibility matrix records the actual package sources and the legacy JSON schema boundary.

Metadata

Release files for osp-uio-integrations 0.3.24

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for osp-uio-integrations 0.3.24
File Size Uploaded Provenance Actions
osp_uio_integrations-0.3.24.tar.gz 231.1 kB Without provenance Details for osp_uio_integrations-0.3.24.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for osp-uio-integrations 0.3.24
File Interpreter ABI Platform Actions
osp_uio_integrations-0.3.24-py3-none-any.whl Python 3 none any Details for osp_uio_integrations-0.3.24-py3-none-any.whl

Total release size: 395.6 kB

Release files / osp_uio_integrations-0.3.24.tar.gz

Download URL osp_uio_integrations-0.3.24.tar.gz
Size 231.1 kB
Tags Source
SHA-256 checksum
How to use checksums
f3c6d486e653d9bdd538b235bfee073a5e770f009bea815fdd4789b6fac93d6b
BLAKE2b-256 checksum
How to use checksums
2dbf88e745b55dad0a49c81d5b97f43e31d1e56105875f7e72e59fb07614c00a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.15

Release files / osp_uio_integrations-0.3.24-py3-none-any.whl

Download URL osp_uio_integrations-0.3.24-py3-none-any.whl
Size 164.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd5843e6f3fae41ca71414b5d3e2abdd1f56ae3e15ff69ac5e08c358d46ef5af
BLAKE2b-256 checksum
How to use checksums
488bee5a516c09d078505f5296405d6f28a05c3b739e3784a97dfb05cd7e12db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.15

Security for osp-uio-integrations 0.3.24

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.3.24 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page