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
CanonicalHostand host-scopedCanonicalNetworkobservations - 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-AgentandX-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.17
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| osp_uio_integrations-0.3.17.tar.gz | 210.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| osp_uio_integrations-0.3.17-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 371.4 kB
Release files / osp_uio_integrations-0.3.17.tar.gz
| Download URL | osp_uio_integrations-0.3.17.tar.gz |
|---|---|
| Size | 210.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
a06083fc70802e8e746fefb7101d4fa15d98843f1895a99fc26b691252858020
|
|
BLAKE2b-256 checksum How to use checksums |
97d7d0d185bab2110bb45b3b5dc563a08a6f1403c829c5b2fe87f3cf9b627c0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / osp_uio_integrations-0.3.17-py3-none-any.whl
| Download URL | osp_uio_integrations-0.3.17-py3-none-any.whl |
|---|---|
| Size | 160.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
69954c92cad65443dcfbd229e9056cc2cf993c959e117a42e505f4b079c1c6c9
|
|
BLAKE2b-256 checksum How to use checksums |
0b1da9de45c5086376cdf5a114dd4343c39b9464fd3d0374a023e1f7f1bee4e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for osp-uio-integrations 0.3.17
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.