Skip to content

Add dcmcheckexpiry, dcmlistapps, dcmregister, dcmunregister, dcmcsr commands#53

Open
Saschollen wants to merge 3 commits into
ThePrez:mainfrom
Saschollen:feature/dcm-app-management
Open

Add dcmcheckexpiry, dcmlistapps, dcmregister, dcmunregister, dcmcsr commands#53
Saschollen wants to merge 3 commits into
ThePrez:mainfrom
Saschollen:feature/dcm-app-management

Conversation

@Saschollen
Copy link
Copy Markdown

  • dcmcheckexpiry: queries QSYS2.CERTIFICATE_INFO (IBM i 7.3+) via JDBC to
    report certificates expiring within a configurable number of days (default 30).
    Exits with rc=1 when expiring certs are found, making it suitable for cron
    alerting scripts.
  • dcmlistapps: completes the QycdRetrieveCertUsageInfo TODO in DcmApiCaller,
    listing registered DCM applications and their assigned certificates. Defaults
    to querying all common IBM i system applications.
  • dcmregister: registers a new application definition in DCM via
    QycdRegisterApplication.
  • dcmunregister: removes an application definition from DCM via
    QycdUnregisterApplication, with confirmation prompt.
  • dcmcsr: generates a Certificate Signing Request via QYCDCSRC with full
    subject field support (CN, O, OU, L, ST, C) and configurable RSA key size.

Also adds AppCertInfo inner class to DcmApiCaller, exposes getConnection(),
adds all new commands to DcmCmd umbrella, adds script wrappers, and updates
Makefile uninstall target.

Saschollen and others added 3 commits March 31, 2026 21:18
…ommands

- dcmcheckexpiry: queries QSYS2.CERTIFICATE_INFO (IBM i 7.3+) via JDBC to
  report certificates expiring within a configurable number of days (default 30).
  Exits with rc=1 when expiring certs are found, making it suitable for cron
  alerting scripts.
- dcmlistapps: completes the QycdRetrieveCertUsageInfo TODO in DcmApiCaller,
  listing registered DCM applications and their assigned certificates. Defaults
  to querying all common IBM i system applications.
- dcmregister: registers a new application definition in DCM via
  QycdRegisterApplication.
- dcmunregister: removes an application definition from DCM via
  QycdUnregisterApplication, with confirmation prompt.
- dcmcsr: generates a Certificate Signing Request via QYCDCSRC with full
  subject field support (CN, O, OU, L, ST, C) and configurable RSA key size.

Also adds AppCertInfo inner class to DcmApiCaller, exposes getConnection(),
adds all new commands to DcmCmd umbrella, adds script wrappers, and updates
Makefile uninstall target.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
IBM i API expects application ID first, then the receiver buffer,
not the other way around. Also fixes output data index to match.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Header file qycdrcui.h shows the API requires:
- Format name RCUI0200 (not CUSG0100)
- Selection criteria structure (Qycd_App_Select_Crit_T) to search by app ID
- Receiver variable first in parameter list

Also fixes RCUI0200 output parsing to use correct field offsets
based on the Application_Info structure layout from the header.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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