Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

NIAP CA Protection Profile

This page maps kipuka capabilities to the Security Functional Requirements (SFRs) defined in the NIAP Certificate Authority Protection Profile v2.0. The mapping is intended for evaluation teams preparing a Common Criteria assessment and for operators who need to verify that their deployment satisfies the Protection Profile.

Note: A Common Criteria evaluation requires an accredited evaluation facility. This document describes how kipuka addresses each SFR at the implementation level; it does not constitute a certified Security Target.

Audit (FAU)

FAU_GEN.1 – Audit Data Generation

Requirement: The TOE shall generate an audit record for each auditable event, including the date/time, event type, subject identity, and outcome.

How kipuka satisfies it:

The kipuka::audit module records structured audit events through the AuditEvent struct. Every event includes:

  • Timestamp (UTC, microsecond precision)
  • Event type (AuditEventType enum)
  • Subject identity (client certificate DN, OTP identifier, or GSSAPI principal)
  • Outcome (success or failure with reason)
  • Source IP address and EST label

The following event types are audited:

Event TypeTrigger
EnrollRequestClient submits a CSR to /simpleenroll, /simplereenroll, or /fullcmc
CertIssueCertificate successfully signed and returned to client
CertReenrollCertificate re-enrollment completed
CertRevokeCertificate revocation processed
EnrollRejectCSR rejected (policy violation, invalid key, unauthorized)
AuthSuccessClient authentication succeeded (any method)
AuthFailureClient authentication failed (bad OTP, invalid cert, GSSAPI error)
KeyGenerateCA key pair generated (HSM or software)
KeyLoadCA key loaded from HSM slot or file
KeyDestroyCA key destroyed (HSM C_DestroyObject or file wipe)
OtpCreateOTP token created via admin API
OtpUseOTP token consumed during enrollment
OtpRevokeOTP token revoked via admin API
OtpExpireOTP token expired (TTL exceeded)
AdminLoginOperator authenticated to admin API
AdminLogoutOperator session ended
AdminActionOperator performed an administrative operation
CaStartCA instance started and ready for signing
CaStopCA instance shut down
CaHealthChangeCA health status changed (HA failover event)
CrlGenerateCRL generated (when using Dogtag back-end)
SecurityViolationPolicy violation detected (tampered request, replay, etc.)

Implementation location: kipuka::audit::record() is called from every EST handler and authentication layer.

Evaluation notes: The event set covers all “minimum audit events” listed in Table 5 of the Protection Profile. Additional events (OTP lifecycle, HA health changes) exceed the minimum.

FAU_GEN.2 – User Identity Association

Requirement: The TOE shall associate each auditable event with the identity of the user that caused the event.

How kipuka satisfies it:

The AuditEvent struct contains a subject field populated from the authenticated identity:

  • mTLS: Subject DN and serial number of the client certificate.
  • OTP: The OTP identifier (opaque token ID, not the secret).
  • GSSAPI: The Kerberos principal name.
  • CMS: The signer DN from the CMS SignerInfo.
  • Unauthenticated (/cacerts): Recorded as "anonymous" with the source IP.

FAU_STG.1 – Protected Audit Trail Storage

Requirement: The TOE shall protect the stored audit records from unauthorized deletion.

How kipuka satisfies it:

Audit records are written through two channels, both designed for append-only semantics:

  1. Database – Audit records are INSERT-only. The database schema does not expose UPDATE or DELETE operations on the audit table. When using PostgreSQL, row-level security policies can further restrict modification.

  2. File – When audit.file is configured, events are appended to a JSON Lines file. kipuka opens the file in append-only mode (O_APPEND). File-system permissions should restrict the audit file to the kipuka service account.

  3. Syslog – When audit.syslog is configured, events are forwarded to a remote syslog server over TLS, placing the audit trail outside the TOE boundary.

Evaluation notes: The Protection Profile requires that “the TSF shall be able to prevent unauthorized deletion of the stored audit records.” Operators must ensure that file-system permissions and database RBAC are configured to prevent the kipuka process from deleting its own audit records. Shipping audit events to a remote syslog server (channel 3) provides the strongest protection.

Cryptographic Support (FCS)

FCS_CKM.1 – Cryptographic Key Generation

Requirement: The TOE shall generate asymmetric cryptographic keys in accordance with a specified key generation algorithm and key sizes.

How kipuka satisfies it:

Key TypeGeneration MethodModule
RSA 2048, 3072, 4096PKCS#11 C_GenerateKeyPair (HSM) or Synta softwarekipuka_hsm::key
ECDSA P-256, P-384, P-521PKCS#11 C_GenerateKeyPair (HSM) or Synta softwarekipuka_hsm::key
ML-DSA-44, ML-DSA-65, ML-DSA-87Synta software or vendor PKCS#11kipuka_hsm::key
Certificate serial numbersOS CSPRNG (getrandom) or PKCS#11 C_GenerateRandomkipuka::ca::issue

Serial numbers are 160 bits (20 bytes) from a CSPRNG, exceeding the CA/B Forum minimum of 64 bits and the NIAP requirement for unpredictable serial numbers.

Implementation location: kipuka_hsm::key::HsmKeyPair for CA keys; kipuka_est::serverkeygen for end-entity keys generated via /serverkeygen.

FCS_CKM.2 – Cryptographic Key Distribution

Requirement: The TOE shall distribute cryptographic keys in accordance with a specified key distribution method.

How kipuka satisfies it:

  • CA certificate distribution – The /cacerts endpoint returns the CA certificate chain as a PKCS#7 certs-only message. Distribution is over TLS (FCS_TLSS_EXT.1).

  • Server-generated key distribution – When /serverkeygen is enabled, the generated private key is encrypted to the client using PKCS#7 EnvelopedData:

    • AES-256 key wrapping with the content-encryption key wrapped to the client’s public key via RSA-OAEP or ECDH-ES.
    • The wrapped key and signed certificate are returned as a single multipart MIME response.

Implementation location: kipuka_est::serverkeygen for key wrapping; kipuka_est::cacerts for CA chain distribution.

FCS_COP.1 – Cryptographic Operation

Requirement: The TOE shall perform cryptographic operations in accordance with specified algorithms and key sizes.

How kipuka satisfies it:

OperationAlgorithm(s)Key SizeModule
Certificate signingRSA PKCS#1 v1.5, RSA-PSS, ECDSA>= 2048 (RSA), P-256/P-384/P-521 (EC)kipuka_hsm::sign
Certificate signing (PQC)ML-DSAL2/L3/L5kipuka_hsm::sign::sign_ml_dsa
HashingSHA-256, SHA-384, SHA-512Synta / HSM
TLSTLS 1.2 / TLS 1.3Per cipher suiterustls
OTP hashingArgon2id, bcrypt, SHA-256-HMACkipuka_otp
Key wrapping (/serverkeygen)AES-256-WRAP, RSA-OAEP256 (AES), >= 2048 (RSA)kipuka_est::serverkeygen

Implementation location: kipuka_hsm::sign dispatches to sign_rsa_pkcs1, sign_rsa_pss, sign_ecdsa, or sign_ml_dsa depending on the CA key type.

FCS_RBG_EXT.1 – Random Bit Generation

Requirement: The TOE shall use a DRBG that is seeded by an entropy source.

How kipuka satisfies it:

  • With HSM: Random bytes are obtained via PKCS#11 C_GenerateRandom, which invokes the HSM’s FIPS-validated DRBG.
  • Without HSM: Random bytes are obtained from the operating system’s CSPRNG via getrandom(2) on Linux or the equivalent on other platforms.

Serial number generation always uses whichever RBG is active.

FCS_TLSS_EXT.1 – TLS Server

Requirement: The TOE shall implement TLS 1.2 and/or TLS 1.3 as a server.

How kipuka satisfies it:

kipuka uses rustls for TLS termination.

ParameterConfigurationNotes
Minimum versiontls.min_version (default "1.2")Set to "1.3" to disable TLS 1.2 entirely.
Cipher suitestls.cipher_suitesDefaults to rustls safe defaults (TLS_AES_256_GCM_SHA384, TLS_AES_128_GCM_SHA256, TLS_CHACHA20_POLY1305_SHA256 for TLS 1.3; ECDHE suites for TLS 1.2).
Client authtls.client_authSupports required, optional, and none modes.
Server certificate EKUid-kp-cmcRAThe server certificate should include the CMC Registration Authority extended key usage OID (1.3.6.1.5.5.7.3.28) for NIAP compliance.

Implementation location: kipuka::tls module configures rustls::ServerConfig.

Identification and Authentication (FIA)

FIA_AFL.1 – Authentication Failure Handling

Requirement: The TOE shall detect when a configurable number of unsuccessful authentication attempts occur and take action.

How kipuka satisfies it:

The OTP authentication subsystem implements rate limiting and lockout:

ParameterConfig KeyDefault
Max consecutive failuresotp.max_failures5
Failure counting windowotp.failure_window15 minutes
Lockout durationotp.lockout_duration30 minutes

When the threshold is reached:

  1. An AuthFailure audit event is recorded with reason "lockout".
  2. Subsequent authentication attempts for that OTP identifier return HTTP 403 until the lockout expires.
  3. If the lockout is triggered by mTLS (invalid client cert), the TLS handshake fails before the HTTP layer is reached; the audit event records the client IP and certificate serial number.

Implementation location: kipuka::auth::otp for OTP lockout; kipuka::auth::mtls for mTLS failure logging.

FIA_UAU.1 – Timing of Authentication

Requirement: The TOE shall allow only the retrieval of CA certificates before the user is authenticated.

How kipuka satisfies it:

  • /cacerts – Unauthenticated. No client credential is required.
  • All other endpoints (/simpleenroll, /simplereenroll, /fullcmc, /serverkeygen, /csrattrs) – Require authentication via at least one configured method (mTLS, OTP, GSSAPI, or CMS signature).

The EstAuth extractor in kipuka::auth enforces this policy. The OptionalAuth extractor is used only for /cacerts and returns AuthMethod::None when no credential is presented.

Implementation location: kipuka::auth::EstAuth and kipuka::auth::OptionalAuth.

FIA_UAU.5 – Multiple Authentication Mechanisms

Requirement: The TOE shall provide multiple authentication mechanisms.

How kipuka satisfies it:

kipuka supports five authentication methods, selectable per EST label:

MethodAuthMethod VariantUse Case
Mutual TLSMtlsPrimary method for re-enrollment and machine identity
One-Time PasswordOtpInitial device bootstrapping
GSSAPI / KerberosGssapiEnterprise domain-joined devices
CMS signatureCmsFull CMC requests signed by an RA
None (unauthenticated)None/cacerts only

Security Management (FMT)

FMT_SMR.1 – Security Roles

Requirement: The TOE shall maintain the roles of operator and user.

How kipuka satisfies it:

kipuka defines two distinct roles:

RoleAccessAuthentication
OperatorAdmin API (OTP management, CA health, HA control, audit retrieval)Admin-specific mTLS certificate or bearer token, on a separate listener (admin_listen)
UserEST endpoints (enrollment, renewal, CA certificate retrieval)EST client credentials (mTLS, OTP, GSSAPI)

The admin API listens on a separate address and port (server.admin_listen, default 127.0.0.1:9443) with independent TLS configuration. No EST client credential grants access to the admin API, and no admin credential grants access to EST endpoints on behalf of a client.

Implementation location: kipuka::routes::admin for operator endpoints; kipuka::routes::est for user endpoints.

FMT_SMF.1 – Management Functions

Requirement: The TOE shall provide management functions for authorized operators.

How kipuka satisfies it:

The admin API provides:

FunctionEndpointDescription
OTP managementPOST /admin/otp, DELETE /admin/otp/{id}Create and revoke OTP tokens
CA healthGET /admin/ca/healthView CA status, signing latency, HSM connectivity
HA controlPOST /admin/ha/failoverForce failover to a backup CA
Audit retrievalGET /admin/auditQuery audit records with time range and event type filters
Configuration reloadPOST /admin/reloadHot-reload certificate and label configuration without restart

Trusted Path (FTP)

FTP_TRP.1 – Trusted Path

Requirement: The TOE shall provide a communication path between itself and remote users that is logically distinct from other paths and provides assured identification of its endpoints.

How kipuka satisfies it:

  • EST over TLS – All enrollment communication uses TLS with server certificate authentication and (for authenticated endpoints) mutual TLS. The server certificate identifies the kipuka instance; the client certificate identifies the enrolling device.

  • Admin on separate TLS – The admin API uses an independent TLS listener with its own certificate and trust anchors. This provides logical separation between the user-facing EST path and the operator-facing management path.

  • DTLS for CoAP – CoAP enrollment uses DTLS 1.2 for the trusted path, providing the same endpoint authentication guarantees over UDP.

Implementation location: kipuka::tls for EST and admin TLS; kipuka_coap::dtls for DTLS.

SFR Coverage Summary

SFRRequirementkipuka ModuleStatus
FAU_GEN.1Audit data generationkipuka::auditSatisfied
FAU_GEN.2User identity associationkipuka::auditSatisfied
FAU_STG.1Protected audit trailkipuka::audit, DB, syslogSatisfied
FCS_CKM.1Key generationkipuka_hsm::keySatisfied
FCS_CKM.2Key distributionkipuka_est::serverkeygen, kipuka_est::cacertsSatisfied
FCS_COP.1Crypto operationskipuka_hsm::sign, rustlsSatisfied
FCS_RBG_EXT.1Random bit generationOS CSPRNG, PKCS#11Satisfied
FCS_TLSS_EXT.1TLS serverkipuka::tls (rustls)Satisfied
FIA_AFL.1Auth failure handlingkipuka::auth::otpSatisfied
FIA_UAU.1Timing of authenticationkipuka::authSatisfied
FIA_UAU.5Multiple auth mechanismskipuka::authSatisfied
FMT_SMR.1Security roleskipuka::routes::admin, kipuka::routes::estSatisfied
FMT_SMF.1Management functionskipuka::routes::adminSatisfied
FTP_TRP.1Trusted pathkipuka::tls, kipuka_coap::dtlsSatisfied