Skip to content

pvacms: bind --cert_validity-server and -ioc to their own config fields - #53

Open
george-mcintyre wants to merge 1 commit into
mainfrom
fix/cert-validity-per-type-options
Open

pvacms: bind --cert_validity-server and -ioc to their own config fields#53
george-mcintyre wants to merge 1 commit into
mainfrom
fix/cert-validity-per-type-options

Conversation

@george-mcintyre

Copy link
Copy Markdown
Contributor

Closes #48. All three per-type validity options bound to default_client_cert_validity (copy-paste), so the last one parsed clobbered the client validity and server/IOC kept defaults. Environment-variable parsing and all consumers were already per-type; the fix is the two bindings.

Verified: pvacms -v --cert_validity-client 1M --cert_validity-server 2M --cert_validity-ioc 3M now reports 1M/2M/3M in the effective config; generic --cert_validity 9M still sets all three.

… fields

All three per-type options bound to default_client_cert_validity, so the
last one parsed clobbered the client validity and the server/IOC
validities silently kept their defaults.  Env parsing and consumers were
already per-type. Closes #48
@ernestow

Copy link
Copy Markdown

@george-mcintyre

Verified the fix on commit fa3a0aa from branch fix/cert-validity-per-type-options.

bin/rhel9-x86_64/pvacms -V
PVXS-CMS (pvxs-cms-1.5.0-spva.20260518-30-gfa3a0aa1838bda51a0f4)
PVXS 1.5.1 (pvxs-1.5.1-spva.20260518)
EPICS 7.0.10
libevent 2.1.12-stable
OpenSSL 3.2.2 4 Jun 2024

I rebuilt PVXS-CMS and reran the original regression test using separate validity values:

--cert_validity-client 91d
--cert_validity-server 92d
--cert_validity-ioc 93d

The effective configuration now reports the expected values:

EPICS_PVACMS_CLIENT_CERT_VALIDITY=91d
EPICS_PVACMS_SERVER_CERT_VALIDITY=92d
EPICS_PVACMS_IOC_CERT_VALIDITY=93d

The original option-binding issue is resolved. I am satisfied with the fix from a regression-testing standpoint.

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.

pvacms: --cert_validity-server and --cert_validity-ioc update client validity

2 participants