A Cadrumo hitelesítése az AEAT-nál

Hitelesítse a Cadrumót a spanyol Adóhivatalnál, az Agencia Estatal de Administración Tributariánál (AEAT), hogy a Cadrumo aeat parancsa kiolvashassa azokat az adatokat, amelyekre az AEAT-nál használt azonosítója jogosítja. A hitelesítés kizárólag csak olvasható hozzáférést ad. Soha nem nyújt be bevallást, nem teljesít fizetést, nem vesz át értesítést, és nem hajt végre képviselői írási műveleteket.

Futtassa az aeat --help parancsot, mielőtt továbblép. Ha az hibázik, álljon meg a hitelesítés beállítása előtt, és kövesse a CLI hibaelhárítási útmutatót. Ha ez sem állítja helyre a parancsot, jelentse a hibát a Cadrumo verziószámával és a szerkesztett kimenettel.

Ha az Ön azonosítója számára elérhető, a parancssori felület (CLI) beolvashatja a benyújtott bevallásokat, az expedientéket, az értesítéseket és a benyújtott justificantéket. A Modelo 036/censo profiladatokhoz használja a profil/censo adatok útmutatót. A Cadrumo ezeket az adatokat már nem éri el élőben.

Mielőtt hozzákezd

Szüksége lesz a következőkre:

  • egy aktív profil. Az aeat config auth configure a No hay un perfil activo üzenettel elutasít, amíg nem hoz létre egyet. Indítsa el az interaktív varázslót (a NIF, CIF, DNI vagy NIE spanyol adóazonosító); bekéri a profil jelmondatát, és a profil létrejötte után felajánl egy opcionális helyreállítási kódot:

    1Start the interactive profile wizard, which prompts for the passphrase.
    aeat config profile create me
    aeat config profile create me
    2Confirm a profile is active before configuring AEAT authentication.
    aeat --format json config profile list
    aeat --format json config profile list
    {
      "active_profile": "docs-sequence-sandbox",
      "command": "config.profile.list",
      "notices": [],
      "result": {
        "active_profile": "docs-sequence-sandbox",
        "profiles": [
          {
            "active": true,
            "bucket_id": "<bucket-id>",
            "name": "docs-sequence-sandbox"
          }
        ]
      },
      "schema_version": "2",
      "status": "success"
    }

    Review interactive profile creation and confirm a profile is active.

  • a mesterkulcs-jelmondat, amely a helyi tárolóját védi; az eszköz bekéri Öntől.

A támogatott szolgáltatók megtekintése

Szolgáltatók listázása:

1List the supported authentication providers and their availability.
aeat --format json config auth providers
aeat --format json config auth providers
{
  "active_profile": "docs-sequence-sandbox",
  "command": "config.auth.providers",
  "notices": [],
  "result": {
    "providers": [
      {
        "description": "auth.catalogue.certificate_description",
        "id": "certificate",
        "label": "auth.catalogue.certificate_label"
      },
      {
        "description": "auth.catalogue.clave_movil_description",
        "id": "clave_movil",
        "label": "auth.catalogue.clave_movil_label"
      },
      {
        "description": "auth.catalogue.clave_permanente_description",
        "id": "clave_permanente",
        "label": "auth.catalogue.clave_permanente_label"
      }
    ]
  },
  "schema_version": "2",
  "status": "success"
}

Confirm the tool lists the supported authentication providers.

A lista minden szolgáltatót disponible (most elérhető) vagy reservado (no disponible aún) (fenntartott, még nem elérhető) jelöléssel lát el. Három érhető el:

  • certificate: az Ön digitális tanúsítványfájlja (certificado digital).

  • clave_movil: mobilalapú Cl@ve, amelyet a telefonján hagy jóvá.

  • clave_permanente: Cl@ve Permanente, DNI/NIE és jelszavas bejelentkezés.

Két további szerepel a listán, de fenntartott, ezért ezeket még nem tudja beállítani:

  • clave_pin: Cl@ve PIN, az AEAT egyszeri kódot használó rendszere. Fenntartott.

  • dnie_pkcs: a nemzeti személyi igazolvány (DNI electrónico). Fenntartott.

Állítsa be az egyik elérhető szolgáltatót.

Szolgáltató beállítása

Állítsa be az Ön által használt szolgáltatót:

1Configure a provider that needs a file, such as your digital certificate.
aeat config auth configure --provider certificate --file ./certificate.p12
aeat config auth configure --provider certificate --file ./certificate.p12

Használja a --file kapcsolót azoknál a szolgáltatóknál, amelyek fájlt igényelnek, például a digitális tanúsítványánál. A hitelesítő adatokat tartalmazó fájlokat kezelje bizalmasan, és ne ossza meg őket.

A helyi felkészültség ellenőrzése

Ellenőrizze, mi van beállítva:

1Show what authentication is configured.
aeat config auth status
aeat config auth status
Authentication is not configured yet.
provider	
configured	False
authenticated	False
available	False
active_profile	docs-sequence-sandbox
active_profile_status	ready
active_profile_registered	True
active_profile_record_present	True
backend_configured	False
backend_available	False
certificate_path	
health_severity	
health_summary	
2Probe the stored credentials locally, without contacting AEAT.
aeat --format json config auth test
aeat --format json config auth test
{
  "active_profile": "docs-sequence-sandbox",
  "command": "config.auth.test",
  "notices": [],
  "result": {
    "active_profile": "docs-sequence-sandbox",
    "active_profile_precondition_action": null,
    "active_profile_record_present": true,
    "active_profile_registered": true,
    "active_profile_status": "ready",
    "authenticated": false,
    "available": false,
    "backend_available": false,
    "backend_configured": false,
    "certificate_path": "",
    "configured": false,
    "health_severity": "",
    "health_summary": "",
    "persisted_session_expired": null,
    "persisted_session_present": false,
    "persisted_session_state": "no_provider",
    "probe_result": "no_provider",
    "probe_summary": "No auth provider is configured; nothing to probe locally.",
    "provider": ""
  },
  "schema_version": "2",
  "status": "success"
}

Confirm the tool reports what is configured and probes it locally.

Ha egy adott szolgáltatót szeretne megvizsgálni, használja a --provider kapcsolót bármelyik paranccsal.

Újítsa meg a tanúsítványát, mielőtt lejár

A digitális tanúsítványnak lejárati dátuma van. Az eszköz ezt a dátumot a tanúsítványfájlból olvassa ki, és figyelmezteti Önt, ahogy közeledik. Ez segít elkerülni a lejárt tanúsítvány miatt meghiúsuló élő olvasást.

Ellenőrizze a hátralévő érvényességet:

1Read the certificate's remaining validity from the local probe.
aeat --format json config auth test
aeat --format json config auth test
{
  "active_profile": "docs-sequence-sandbox",
  "command": "config.auth.test",
  "notices": [],
  "result": {
    "active_profile": "docs-sequence-sandbox",
    "active_profile_precondition_action": null,
    "active_profile_record_present": true,
    "active_profile_registered": true,
    "active_profile_status": "ready",
    "authenticated": false,
    "available": false,
    "backend_available": false,
    "backend_configured": false,
    "certificate_path": "",
    "configured": false,
    "health_severity": "",
    "health_summary": "",
    "persisted_session_expired": null,
    "persisted_session_present": false,
    "persisted_session_state": "no_provider",
    "probe_result": "no_provider",
    "probe_summary": "No auth provider is configured; nothing to probe locally.",
    "provider": ""
  },
  "schema_version": "2",
  "status": "success"
}

Confirm the local probe reports the certificate's remaining validity.

A jelentés megmutatja a tanúsítvány állapotát:

  • Több mint 60 nap van hátra: a tanúsítvány érvényes, és jelenti a hátralévő napok számát.

  • 60 nap vagy kevesebb van hátra: figyelmeztetés jelenik meg: The certificate expires in N days. Plan the renewal. Kezdje el most a megújítást.

  • 14 nap vagy kevesebb van hátra: a figyelmeztetés kritikus. Újítsa meg a következő élő olvasás előtt.

  • Már lejárt: The certificate expired N days ago. Renew it before authenticating. Az élő olvasás elutasításra kerül, amíg le nem cseréli.

Újítsa meg a tanúsítványt annál a szervezetnél, amely kiállította, például a Fábrica Nacional de Moneda y Timbrénél (FNMT) vagy az AEAT-nál. Ez az eszközön kívül történik. Töltse le a megújított tanúsítványfájlt (.p12 vagy .pfx) a gépére.

Irányítsa az eszközt a megújított fájlra:

1Point the tool at the renewed certificate file.
aeat config auth configure --provider certificate --file ./renewed-certificate.p12
aeat config auth configure --provider certificate --file ./renewed-certificate.p12

Ha a megújított tanúsítvány új jelszót használ, cserélje le a forrásához tárolt jelmondatot:

1Rotate the stored passphrase for the certificate source.
aeat config auth certificate secret set --name personal
aeat config auth certificate secret set --name personal

Erősítse meg az új lejáratot:

1Read the renewed certificate's expiry from the local probe.
aeat --format json config auth test
aeat --format json config auth test
{
  "active_profile": "docs-sequence-sandbox",
  "command": "config.auth.test",
  "notices": [],
  "result": {
    "active_profile": "docs-sequence-sandbox",
    "active_profile_precondition_action": null,
    "active_profile_record_present": true,
    "active_profile_registered": true,
    "active_profile_status": "ready",
    "authenticated": false,
    "available": false,
    "backend_available": false,
    "backend_configured": false,
    "certificate_path": "",
    "configured": false,
    "health_severity": "",
    "health_summary": "",
    "persisted_session_expired": null,
    "persisted_session_present": false,
    "persisted_session_state": "no_provider",
    "probe_result": "no_provider",
    "probe_summary": "No auth provider is configured; nothing to probe locally.",
    "provider": ""
  },
  "schema_version": "2",
  "status": "success"
}

Confirm the local probe reports the renewed certificate's later expiry.

A jelentés most a megújított tanúsítvány későbbi lejárati dátumát mutatja.

Több tanúsítvány kezelése

Ha több szervezet nevében jár el, regisztráljon szervezetenként egy tanúsítványt. Ne állítsa be újra az aeat config auth configure --file parancsot minden váltáskor.

Regisztrálja mindegyik tanúsítványt egy név alatt:

1Register a certificate under a name.
aeat config auth certificate register --name personal --file ./personal.p12
aeat config auth certificate register --name personal --file ./personal.p12
2Register another certificate with a friendly name.
aeat config auth certificate register --name apoderado-acme --file ./acme.p12 \
  --friendly-name ACME SL
aeat config auth certificate register --name apoderado-acme --file ./acme.p12 `
  --friendly-name ACME SL

Listázza az összes regisztrált tanúsítványt:

1List every registered certificate.
aeat --format json config auth certificate list
aeat --format json config auth certificate list
{
  "active_profile": "docs-sequence-sandbox",
  "command": "config.auth.certificate.list",
  "notices": [],
  "result": {
    "active_source": "",
    "sources": []
  },
  "schema_version": "2",
  "status": "success"
}

Confirm the tool lists the registered certificates.

Válassza ki azt, amelyiket aktívvá szeretné tenni:

1Select the registered certificate you want active.
aeat config auth certificate select --name apoderado-acme
aeat config auth certificate select --name apoderado-acme

Távolítson el egy regisztrált tanúsítványt, amelyre már nincs szüksége:

1Remove a registered certificate you no longer need.
aeat --format json config auth certificate remove --name personal
aeat --format json config auth certificate remove --name personal
{
  "active_profile": "docs-sequence-sandbox",
  "command": "config.auth.certificate.remove",
  "notices": [],
  "result": {
    "active": false,
    "certificate_path": "",
    "name": "personal",
    "removed": false
  },
  "schema_version": "2",
  "status": "success"
}

Confirm the tool removes a registered certificate by name.

Minden regisztrált tanúsítvány lejáratának ellenőrzése

Minden regisztrált tanúsítványnak saját lejárati dátuma van. Ellenőrizze az összes regisztrált tanúsítványt egy menetben, ne csak az aktívat:

1Check every registered certificate's expiry.
aeat --format json config auth certificate check
aeat --format json config auth certificate check
{
  "active_profile": "docs-sequence-sandbox",
  "command": "config.auth.certificate.check",
  "notices": [],
  "result": {
    "entries": [],
    "has_warnings": false
  },
  "schema_version": "2",
  "status": "success"
}

Confirm the tool checks every registered certificate's expiry in one pass.

A jelentés minden regisztrált tanúsítványt felsorol az állapotával:

  • ok: érvényes, a hátralévő napok számával.

  • expiring: a megújítási időszakon belül (alapértelmezésben 60 nap vagy kevesebb, illetve a kritikus időszakhoz 14 nap vagy kevesebb). A figyelmeztetés megnevezi a tanúsítványt.

  • expired: már lejárt. A figyelmeztetés megnevezi a tanúsítványt.

Újítsa meg a lejáró vagy lejárt tanúsítványt annál a szervezetnél, amely kiállította, majd regisztrálja újra a meglévő neve alatt:

1Re-register a renewed certificate under its existing name.
aeat config auth certificate register --name apoderado-acme --file ./renewed-acme.p12
aeat config auth certificate register --name apoderado-acme --file ./renewed-acme.p12

Futtassa újra az aeat config auth certificate check parancsot az új lejárati dátum megerősítéséhez.

Élő munkamenet megszerzése vagy ellenőrzése

Amikor készen áll egy élő olvasási parancs használatára:

1Acquire or verify a live AEAT session.
aeat config auth login
aeat config auth login

Ha szándékosan újra kell hitelesítenie, kényszerítsen ki egy friss hitelesítést:

1Force a fresh authentication.
aeat config auth login --fresh
aeat config auth login --fresh

Ha egy korábbi bejelentkezés megszakadt, és a hitelesítési lépés elakadt, használja a --reset-lock kapcsolót. Akkor futtassa, amikor a login egy másik, folyamatban lévő bejelentkezést jelez, pedig valójában nincs ilyen.

Munkamenetek befejezése vagy a hitelesítés visszaállítása

A helyi tanúsítványszolgáltató munkamenetének befejezéséhez a konfigurációja eltávolítása nélkül:

1End the certificate provider's local sessions without removing its configuration.
aeat --format json config auth logout --provider certificate
aeat --format json config auth logout --provider certificate
{
  "active_profile": "docs-sequence-sandbox",
  "command": "config.auth.logout",
  "notices": [],
  "result": {
    "bucket_id": "<bucket-id>",
    "cleared_session_state": false,
    "providers": [
      "certificate"
    ],
    "removed_sessions": 0
  },
  "schema_version": "2",
  "status": "success"
}

Confirm logout ends the local session while preserving the provider configuration.

Egyetlen szolgáltató helyi konfigurációjának, munkameneteinek, megszerzési zárjának, regisztrált tanúsítványainak és tárolt tanúsítvány-titkainak eltávolításához:

1Remove the certificate provider's local configuration and custody state.
aeat --format json config auth reset --provider certificate --yes
aeat --format json config auth reset --provider certificate --yes
{
  "active_profile": "docs-sequence-sandbox",
  "command": "config.auth.reset",
  "notices": [],
  "result": {
    "bucket_id": "<bucket-id>",
    "cleared_locks": 0,
    "cleared_provider_configuration": true,
    "providers": [
      "certificate"
    ],
    "removed_certificate_secrets": 0,
    "removed_certificate_sources": 0,
    "removed_sessions": 0
  },
  "schema_version": "2",
  "status": "success"
}

Confirm reset removes the selected provider's local authentication state.

Minden beállított szolgáltató helyi hitelesítési állapotának eltávolításához:

1Remove local authentication state for every configured provider.
aeat --format json config auth reset --all --yes
aeat --format json config auth reset --all --yes
{
  "active_profile": "docs-sequence-sandbox",
  "command": "config.auth.reset",
  "notices": [],
  "result": {
    "bucket_id": "<bucket-id>",
    "cleared_locks": 0,
    "cleared_provider_configuration": true,
    "providers": [
      "certificate",
      "clave_movil",
      "clave_permanente"
    ],
    "removed_certificate_secrets": 0,
    "removed_certificate_sources": 0,
    "removed_sessions": 0
  },
  "schema_version": "2",
  "status": "success"
}

Confirm reset removes local authentication state for all configured providers.

Eljárás valaki más nevében (apoderado)

Ha egy másik adózó felhatalmazott adóképviselőjeként jár el, rögzítse helyileg, hogy kit képvisel, és a vonatkozó AEAT apoderamiento hatóköröket. Az apoderado felhatalmazott képviselő, például egy gestor vagy asesor.

Magát az apoderamientót az AEAT-nál adják meg. A képviselt fél az AEAT saját apoderamiento-eljárásain keresztül hatalmazza fel Önt. Az ebben a szakaszban szereplő parancsok ezt a felhatalmazást a helyi profiljában rögzítik, hogy az olvasási parancsok tudják, kinek az adatait olvassák. Soha nem regisztrálnak, hosszabbítanak meg, vonnak vissza vagy mondanak le apoderamientót az AEAT-nál. Egyetlen parancs sem ír képviseleti állapotot az AEAT-hoz.

Az elfogadott hatókörök megtekintése

Listázza az eszköz által elfogadott hatókörkódokat:

1List the scope codes the tool accepts.
aeat --format json config auth apoderado scopes list
aeat --format json config auth apoderado scopes list
{
  "active_profile": "docs-sequence-sandbox",
  "command": "config.auth.apoderado.scopes.list",
  "notices": [],
  "result": {
    "catalogue_version": "2026.05.bootstrap",
    "scopes": [
      {
        "code": "CENSO",
        "modelo_codes": [
          "036",
          "037"
        ],
        "name_en": "Censo declarations (registration, modification, deregistration)",
        "name_es": "Censo (modelo 036, 037)"
      },
      {
        "code": "EXPED",
        "modelo_codes": [],
        "name_en": "Filing records and queries",
        "name_es": "Expedientes y consultas"
      },
      {
        "code": "GENERALNT",
        "modelo_codes": [],
        "name_en": "General tax procedures",
        "name_es": "Trámites tributarios (general)"
      },
      {
        "code": "INFORM",
        "modelo_codes": [
          "347",
          "349",
          "720"
        ],
        "name_en": "Informational declarations",
        "name_es": "Declaraciones informativas (modelo 347, 349, 720)"
      },
      {
        "code": "IVA",
        "modelo_codes": [
          "303",
          "390"
        ],
        "name_en": "IVA periodic and annual returns",
        "name_es": "IVA (modelo 303, 390)"
      },
      {
        "code": "NOTIFIC",
        "modelo_codes": [],
        "name_en": "Electronic notifications (DEHú)",
        "name_es": "Notificaciones electrónicas DEHú"
      },
      {
        "code": "PAGOSF",
        "modelo_codes": [
          "130",
          "131"
        ],
        "name_en": "Quarterly self-employed instalments",
        "name_es": "Pagos fraccionados (modelo 130, 131)"
      },
      {
        "code": "RENT",
        "modelo_codes": [
          "100",
          "714"
        ],
        "name_en": "Income tax and wealth declaration",
        "name_es": "Renta y patrimonio (modelo 100, 714)"
      },
      {
        "code": "RETEN",
        "modelo_codes": [
          "111",
          "115",
          "123",
          "180",
          "190",
          "193"
        ],
        "name_en": "Withholding tax declarations",
        "name_es": "Retenciones (modelo 111, 115, 123, 180, 190, 193)"
      }
    ]
  },
  "schema_version": "2",
  "status": "success"
}

Confirm the tool lists the accepted apoderamiento scope codes.

Minden hatókör egy AEAT apoderamiento-terület. Például:

  • RENT a Modelo 100 és 714 esetében.

  • IVA a Modelo 303 és 390 esetében.

  • PAGOSF a Modelo 130 és 131 esetében.

  • RETEN a forrásadó-modelók esetében.

  • GENERALNT, CENSO, INFORM, NOTIFIC és EXPED a hozzájuk tartozó hatósági területekhez.

Rögzítse, kit képvisel

Adja meg a képviselt fél adóazonosítóját (NIF, CIF, DNI, NIE vagy NII) és az AEAT-nál kapott felhatalmazásnak megfelelő hatóköröket:

1Record who you represent and the scopes that match the grant at AEAT.
aeat --format json config auth apoderado configure --represented-nif 11111111H --scope \
  IVA --scope PAGOSF
aeat --format json config auth apoderado configure --represented-nif 11111111H --scope `
  IVA --scope PAGOSF
{
  "active_profile": "docs-sequence-sandbox",
  "command": "config.auth.apoderado.configure",
  "notices": [],
  "result": {
    "bucket_id": "<bucket-id>",
    "catalogue_version": "2026.05.bootstrap",
    "configured_at": "2026-04-01T09:00:00+00:00",
    "granted_scopes": [
      "IVA",
      "PAGOSF"
    ],
    "notes": "",
    "represented_nif": "sha256:33982da1"
  },
  "schema_version": "2",
  "status": "success"
}

Confirm the tool records the represented party and scopes locally.

Ismételje meg a --scope kapcsolót minden kódhoz. A CLI elutasítja a vesszővel elválasztott listát. A hatókörkódok nagybetűsek. Használja a --scope ALL kapcsolót, hogy egyszerre rögzítse az összes katalógusbeli hatókört. A CLI elutasítja az ismeretlen kódokat, és felsorolja az elfogadott kódokat.

Az aktív profil legfeljebb egy apoderado-konfigurációt tárol; az újbóli beállítás felülírja azt. A képviselt azonosító titkosítva van tárolva.

A konfiguráció áttekintése vagy megszüntetése

Mutassa meg, mi van rögzítve az aktív profilhoz:

1Show the apoderado configuration recorded for the active profile.
aeat --format json config auth apoderado status
aeat --format json config auth apoderado status
{
  "active_profile": "docs-sequence-sandbox",
  "command": "config.auth.apoderado.status",
  "notices": [],
  "result": {
    "bucket_id": "<bucket-id>",
    "catalogue_version": "2026.05.bootstrap",
    "configured": true,
    "configured_at": "2026-04-01T09:00:00+00:00",
    "granted_scopes": [
      "IVA",
      "PAGOSF"
    ],
    "represented_nif": "sha256:33982da1"
  },
  "schema_version": "2",
  "status": "success"
}

Confirm the tool shows the apoderado configuration recorded locally.

Az aeat config auth apoderado check az élő ellenőrzés parancsa, de az élő AEAT olvasási útvonal le van zárva. Egy „live verification unavailable” üzenettel elutasítja a műveletet, és visszairányítja Önt a status-hoz. Az offline konfiguráció beolvasásához használja az aeat config auth apoderado status parancsot.

Távolítsa el a konfigurációt, amikor a képviselet megszűnik:

1Remove the local apoderado record when the representation ends.
aeat --format json config auth apoderado clear
aeat --format json config auth apoderado clear
{
  "active_profile": "docs-sequence-sandbox",
  "command": "config.auth.apoderado.clear",
  "notices": [],
  "result": {
    "bucket_id": "<bucket-id>",
    "cleared": true
  },
  "schema_version": "2",
  "status": "success"
}

Confirm the tool removes the local apoderado record.

A törlés csak a helyi bejegyzést távolítja el. Az AEAT-nál lévő apoderamientót ez nem érinti. Azt az AEAT saját eljárásain keresztül vonja vissza.

Következő lépések

Futtassa az aeat config auth test parancsot minden élő olvasási feladat előtt. Kövesse az Újítsa meg a tanúsítványát, mielőtt lejár szakaszt, amikor a parancs lejárati figyelmeztetést jelez.