Skip to content

K8SJKS/K8SPKCS12 store type definitions should set PasswordOptions.StoreRequired: true #86

Description

@spbsoluble

Summary

When a K8SJKS or K8SPKCS12 cert store has its top-level Store Password bound to a PAM provider (e.g. Hashicorp Vault / OpenBao), the UO 26.2.1 fails to retrieve the job configuration with:

Error retrieving job configuration for job id <id>: Value cannot be null. (Parameter 'value')
An exception was encountered processing the job with Id '<id>': Value cannot be null. (Parameter 'value')

The error occurs in OrchestratorJobExecutor before the K8S extension's ProcessJob is called — meaning the framework-level credential resolution is failing, not the extension itself.

Environment

  • Command 26.2.1.1350
  • Universal Orchestrator 26.2.1 (kyfuseng-development image)
  • k8s-orchestrator extension (local net10.0 build, current main branch)
  • PAM provider: Hashicorp-Vault (OpenBao) remote PAM, confirmed accessible by PAM token

Store Configuration

store_type: K8SJKS
properties:
  KubeNamespace: keyfactor-lab
  KubeSecretName: lab-jks-store
  CertificateDataFieldName: keystore.jks
  PasswordFieldName: password
  PasswordIsK8SSecret: "false"
pam_credentials:
  - field: Password          # top-level Store Password
    provider: OpenBao-PAM
    parameters:
      Secret: "kfclab-pam/store-passwords"
      Key: "jks-password"

The PAM provider resolves the secret correctly (confirmed via direct vault read). The top-level Password field on the store in Command shows IsManaged: true with correct ProviderTypeParameterValues. The PAM token has read access to the secret path.

Workaround

Remove the PAM binding for field: Password. The extension then creates the keystore with an empty password and writes no password field to the K8S secret. Inventory works with empty password (no password field present → extension uses empty string). This is acceptable for a lab but not production where the keystore password should be managed.

Expected Behaviour

K8SJKS and K8SPKCS12 extensions should support PAM-resolved Store Password, consistent with how ServerPassword PAM resolution works on the same stores and how other store types (e.g. HCVKVJKS) handle PAM-bound secrets.

Investigation Starting Point

The null occurs in OrchestratorJobExecutor during job config retrieval, before the K8S extension is invoked. Check whether the UO framework's PAM credential resolution path for the top-level Password field returns null for remote PAM providers when the store uses in-cluster K8S auth (no ServerPassword value).

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions