Aruba ClearPass : enregistrer un équipement par l'API REST

Intermédiaire LinuxAruba ClearPass Policy Manager25 min50 XP

Automatisez l'enregistrement des imprimantes dans ClearPass (https://cppm.acme.test/api) avec le client API ops-automation (flux client credentials).

  1. Écrivez ~/travail/oauth.json : {"grant_type": "client_credentials", "client_id": "ops-automation", "client_secret": "Lab-Secr3t-2026"} et protégez-le : chmod 600 oauth.json
  2. Jeton : curl -sk -X POST https://cppm.acme.test/api/oauth -H "Content-Type: application/json" -d @oauth.json (depuis ~/travail) → durée de validité en secondes → answer duree <n>
  3. Écrivez ~/travail/endpoint.json : mac_address = 00-1b-63-84-45-e6, status = Known, description = Imprimante RDC
  4. Création : curl -sk -X POST https://cppm.acme.test/api/endpoint -H "Authorization: Bearer <jeton>" -H "Content-Type: application/json" -d @endpoint.json
  5. Vérification : curl -sk https://cppm.acme.test/api/endpoint/mac-address/001b638445e6 -H "Authorization: Bearer <jeton>" → identifiant attribué → answer id <n>

Contenu Premium

Ce contenu est inclus dans l'offre Premium. Le titre et le résumé restent visibles pour vous aider à choisir.

Tâches

  1. Fichier d'identifiants protégé
  2. Jeton obtenu
  3. Imprimante enregistrée et vérifiée