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

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

Metadata

Release files for osp-uio-integrations 0.3.18

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.18
File Size Uploaded Provenance
osp_uio_integrations-0.3.18.tar.gz 211.1 kB Without provenance Details

Built distribution (wheel)

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

Total release size: 371.9 kB

Release files / osp_uio_integrations-0.3.18.tar.gz

Download URL osp_uio_integrations-0.3.18.tar.gz
Size 211.1 kB
Tags Source
SHA-256 checksum
How to use checksums
b5e138dc658600ef6f951d23a297c7e30e3ffd51b8b2ea4f9ced652a242b1225
BLAKE2b-256 checksum
How to use checksums
2683e0b3261086773aaef7f3d85f7f6cceb447c6327cf9e757208df195b6ff37
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

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

Download URL osp_uio_integrations-0.3.18-py3-none-any.whl
Size 160.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
69f48cd54b9cc2e22f055432ad2401fbec8d03378b6cad2c04702c9ed429d26b
BLAKE2b-256 checksum
How to use checksums
c0d2c8453cb6c68f088ca30624116f3593fe48bc03b4bbffa32e1198835ab6e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.12

Security for osp-uio-integrations 0.3.18

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.

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