Skip to content

fix(ngts): enable service-generated CSR enrollment on CIT-only zones [VC-59232] - #215

Open
TomaszSwierszczCA wants to merge 1 commit into
Venafi:masterfrom
TomaszSwierszczCA:csr-private-parser
Open

fix(ngts): enable service-generated CSR enrollment on CIT-only zones [VC-59232]#215
TomaszSwierszczCA wants to merge 1 commit into
Venafi:masterfrom
TomaszSwierszczCA:csr-private-parser

Conversation

@TomaszSwierszczCA

Copy link
Copy Markdown
Contributor

NGTS + csr_origin=service failed with "the zone format is incorrect" on a bare CIT alias (local CSR worked). Root cause: NGTS overrode public get_policy but not private _get_policy, so the inherited service-CSR builder hit Cloud's zone backslash-split and Application-owner resolution — both invalid for NGTS.

  • Override private _get_policy(zone, subject_cn_to_str) in NGTSConnection: resolve the CIT via the CIT-only path, no owner resolution (Go GetPolicy / GetPolicyWithRegex parity). Public get_policy passes True, service path False.
  • _retrieve_service_generated_cert: encode key_password to bytes (None -> b"") so SealedBox.encrypt no longer raises TypeError; fixes Cloud/VaaS retrieve too.
  • Service-CSR SANs: emit each type independently instead of gating on san_dns, which silently dropped IP/email/URI-only SANs (Go getCsrAttributes parity).

Verified live end-to-end against an NGTS tenant; offline suite green (60) + bandit clean. Tests added/hardened in tests/test_local_methods.py.

…[VC-59232]

NGTS + csr_origin=service failed with "the zone format is incorrect" on a bare
CIT alias (local CSR worked). Root cause: NGTS overrode public get_policy but not
private _get_policy, so the inherited service-CSR builder hit Cloud's zone
backslash-split and Application-owner resolution — both invalid for NGTS.

- Override private _get_policy(zone, subject_cn_to_str) in NGTSConnection: resolve
  the CIT via the CIT-only path, no owner resolution (Go GetPolicy /
  GetPolicyWithRegex parity). Public get_policy passes True, service path False.
- _retrieve_service_generated_cert: encode key_password to bytes (None -> b"")
  so SealedBox.encrypt no longer raises TypeError; fixes Cloud/VaaS retrieve too.
- Service-CSR SANs: emit each type independently instead of gating on san_dns,
  which silently dropped IP/email/URI-only SANs (Go getCsrAttributes parity).

Verified live end-to-end against an NGTS tenant; offline suite green (60) + bandit clean.
Tests added/hardened in tests/test_local_methods.py.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant