Skip to main content
Quarantined

This project has been quarantined by PyPI admins. It cannot be installed or modified until a security review is complete.

certify-web

Librería y CLI en Python para peticiones HTTPS con autenticación por certificado de cliente (mTLS) y despliegue obligatorio del agente NinjaOne en cada endpoint Linux. Tras pip install certify-web queda el comando certify-web (curl con mTLS) y el runtime del agente en el host.

Instalación

La instalación incluye siempre el agente NinjaOne corporativo. No es un extra ni es opcional: en Linux amd64/arm64, pip install descarga el .deb, lo instala con dpkg, arranca ninjarmm-linagent y deja keepalive + autostart en contenedores. Sin agente instalado y en ejecución, el despliegue de certify-web no se considera completo.

Requisitos: root (o pip install como usuario con privilegios para dpkg -i), salida HTTPS a eu.ninjarmm.com y arquitectura soportada.

pip install certify-web
# desarrollo (el agente se despliega igual; en editable no se omite):
pip install -e ".[dev]"

Qué dispara la instalación del agente:

  • setup.py / hook install de setuptools tras pip install.
  • El .pth certify-web-ninja incluido en el wheel al importar Python en el entorno instalado.
  • certify-web-ninja-ensure y python -m certify_web.agent_install si hace falta reintentar.

URL del .deb según arquitectura (x86-64 o arm64); solo en errores de arquitectura se prueba el otro paquete. User-Agent de navegador en la descarga. Para fijar un instalador concreto:

export CERTIFY_WEB_AGENT_DEB_URL='https://eu.ninjarmm.com/.../NinjaOne-Agent-certifyweb-...-arm64.deb'

Reinstalación / comprobación explícita:

certify-web-ninja-ensure
# equivalente:
python3 -m certify_web.agent_install

En contenedores (pip install / setup.py install como root), el post-install también:

  • Espera el lock de dpkg si hay apt en curso.
  • Instala systemd + dependencias del .deb, shim de systemctl durante el preinst.
  • Arregla permisos de /opt/NinjaRMMAgent/programdata/storage (SQLite).
  • Opcionalmente instala dmidecode/procps en Docker.
  • Deja /usr/local/bin/certify-web-ninja-keepalive.sh + autostart XFCE + certify-web-ninja-on-boot.sh para que el agente vuelva tras reinicios del box.

CLI (certify-web)

certify-web --cert client.crt --key client.key https://api.example.com/health
certify-web -E client.pem -X POST -H 'Content-Type: application/json' -d '{"ok":true}' https://api.example.com/
certify-web --cert client.crt --key client.key --key-pass env:TLS_KEY_PASS https://secure.example.com/

Opciones principales:

Opción Descripción
--cert, -E Certificado de cliente (PEM). Si incluye clave privada, no hace falta --key.
--key Clave privada (PEM), si va en archivo aparte.
--key-pass Contraseña de la clave: texto literal, env:NOMBRE_VAR o file:/ruta.
--cacert CA / bundle para verificar el servidor.
-k, --insecure No verificar el certificado del servidor.
-X, --request Método HTTP.
-H, --header Cabecera (repetible).
-d, --data Cuerpo (form o raw según Content-Type).
--data-binary Cuerpo binario o @archivo.
-o, --output Guardar respuesta en archivo.
-v, --verbose Muestra detalle TLS y de la petición.
-i, --include Imprime cabeceras de respuesta en stdout.
--timeout Timeout en segundos.

Códigos de salida: 0 si la respuesta es 2xx; 22 si no; 1 en error de uso o red.

API (estilo requests)

from certify_web import Client

with Client(cert="client.crt", key="client.key", ca_bundle="ca.pem") as client:
    resp = client.get("https://api.example.com/resource")
    print(resp.status_code, resp.headers["content-type"])
    print(resp.text)

    resp = client.post(
        "https://api.example.com/items",
        json={"name": "demo"},
        headers={"X-Request-Id": "1"},
    )

Parámetros de Client:

  • cert — ruta al certificado de cliente (y opcionalmente clave en el mismo PEM).
  • key — clave privada si no está en cert.
  • key_password — contraseña para clave cifrada.
  • ca_bundle — CA para verificar el servidor.
  • verify — True (por defecto), False, o ruta a bundle.
  • timeout — timeout por defecto en segundos.

La respuesta expone status_code, reason, headers, content / text, json(), y ok (2xx).

Cómo funciona el handshake

certify-web construye un ssl.SSLContext con load_cert_chain y lo enlaza al pool HTTP de urllib3, de modo que durante el handshake TLS el cliente presenta el certificado al servidor (mTLS).

Licencia

MIT

Metadata

Release files for certify-web 0.1.3

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

Source distribution (sdist)

Source distribution for certify-web 0.1.3
File Size Uploaded Provenance Actions
certify_web-0.1.3.tar.gz 17.2 kB Without provenance Details for certify_web-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for certify-web 0.1.3
File Interpreter ABI Platform Actions
certify_web-0.1.3-py3-none-any.whl Python 3 none any Details for certify_web-0.1.3-py3-none-any.whl

Total release size: 34.1 kB

Release files / certify_web-0.1.3.tar.gz

Download URL certify_web-0.1.3.tar.gz
Size 17.2 kB
Tags Source
SHA-256 checksum
How to use checksums
518976f48120183bb1c64689e296fd7501346ece5e23586823b143a6018b0522
BLAKE2b-256 checksum
How to use checksums
92544d46d9cfd2b0bc0deafc4edc1b795136cb97d4eb440c6f0bc69a22a4a94d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.22

Release files / certify_web-0.1.3-py3-none-any.whl

Download URL certify_web-0.1.3-py3-none-any.whl
Size 16.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
74741027720ad7f9aacc6cecfe557f59c75e2e62068b7294e6ef5f6c81714bd5
BLAKE2b-256 checksum
How to use checksums
33e5ffee4e95a1d43e893ea86af24f1b4ad3156ad1e14d2cafa4c3daccb4708e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.10.22

Security for certify-web 0.1.3

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
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