mic-platform
Briques policy, contrôle et intégrations d'identité du framework MIC. Sommet du DAG
platform → data → core : dépend de mic-core ET mic-datastore.
Modules
| Module | Rôle |
|---|---|
mic.authz |
Autorisation : moteur in-memory, OPA, OpenFGA (appels API via httpx) |
mic.identity.keycloak |
Client OIDC Keycloak concret, sans dépendance FastAPI/Litestar ; client d'administration pour provisionner des clients machine |
mic.ratelimit |
Rate limiting (in-memory / Redis Lua) + RateLimitMiddleware |
Namespace PEP 420 (pas de mic/__init__.py).
Installation
pip install "mic-platform[keycloak,openfga,redis]"
Extras
| Extra | Tire |
|---|---|
opa |
mic-core[client] (httpx — appels HTTP vers l'agent OPA) |
openfga |
mic-core[client] (httpx — API OpenFGA ; pas le SDK officiel) |
keycloak |
mic-core[client] (httpx : discovery, authorization code + PKCE, refresh, logout, Admin REST) |
redis |
mic-datastore[redis] (backend Lua du rate limiter) |
ℹ️ L'adaptateur OpenFGA (
mic.authz.openfga) parle à l'API HTTP viahttpx, il n'utilise pasopenfga-sdk.
mic.identity.keycloak.KeycloakClient ne dépend d'aucun transport entrant :
les adaptateurs FastAPI, Litestar, WebSocket ou gRPC extraient les credentials,
puis appellent ce client et mic.auth.OidcTokenVerifier. Le client ne réimplémente
pas la validation JWT/JWKS et n'expose volontairement pas le password grant.
mic.identity.keycloak.KeycloakAdminClient provisionne des clients machine
(agents, workers, services partenaires) par l'API Admin REST, authentifié en
client_credentials :
from mic.identity import KeycloakAdminClient
with KeycloakAdminClient(server_url="https://sso.example.org", realm="library",
client_id="library-provisioner", client_secret=secret) as admin:
agent = admin.ensure_confidential_client(client_id="agent-site-a", name="Agent site A",
default_client_scopes=["ingestion:deposit"])
credential = admin.get_client_secret(agent.id) # SecretStr
admin.rotate_client_secret(agent.id) # révocation du secret
admin.set_client_enabled(agent.id, False) # plus aucun jeton émis
ensure_confidential_client est idempotent : un client existant garde son secret et
son état (jamais réactivé) ; un client existant qui n'est pas un client machine
confidentiel (public, flux navigateur, password grant) lève keycloak.client_conflict
au lieu d'être modifié. Rôles minimaux de l'identité d'administration
(realm-management) : manage-clients, view-clients, plus manage-users pour
grant_service_account_realm_roles.
Versionnage
Brique volatile (OPA/OpenFGA bougent vite) — reste en 0.x. Contraindre avec
>=0.1,<1. Release : make release-pkg PKG=platform VERSION=x.y.z → tag
platform-vX.Y.Z (cf. ../../RELEASING.md).
Metadata
Release files for mic-platform 0.1.23
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 | |
|---|---|---|---|---|
| mic_platform-0.1.23.tar.gz | 31.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| mic_platform-0.1.23-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 72.4 kB
Release files / mic_platform-0.1.23.tar.gz
| Download URL | mic_platform-0.1.23.tar.gz |
|---|---|
| Size | 31.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cc967558181d8c6982f1f3c3029cc6a8327e426d2e84394ca3fbf085e617f53a
|
|
BLAKE2b-256 checksum How to use checksums |
24dcb3fe3a1bed2c354df5d42332a73fc368870c1b7731731b6f930b8991bd7e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Release files / mic_platform-0.1.23-py3-none-any.whl
| Download URL | mic_platform-0.1.23-py3-none-any.whl |
|---|---|
| Size | 41.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d2e0f653237e3b52ae63579da1760518b83902eb4f30051a2a7820e3e2298111
|
|
BLAKE2b-256 checksum How to use checksums |
760b82658e16139aff0e09e8efd78ab81994375fff4c6fd5c48623da4d7ed0af
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.7
|
Security for mic-platform 0.1.23
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.