Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add support for encoding/decoding cert payloads #47

Merged

Conversation

atc0005
Copy link
Owner

@atc0005 atc0005 commented Nov 23, 2024

Overview

Add support for generating a certificate metadata payload in JSON format from a specified metadata payload format version.

Add support for support for decoding a given (valid) certificate metadata payload. The format is automatically detected from a list of valid format versions.

The intent is to support all stable format versions indefinitely.

As of this commit / PR, format 0 is still under active development. This format version is an "unstable" metadata format and is not covered by this goal; format version 0 is subject to change often as development continues. Format version 1 is implemented at this time as a stub version for testing purposes; once stable the plan is to promote version 0 content as the initial version 1.

Changes

Primary changes:

  • add support for generating a JSON payload from a specified metadata payload format version
    • this can be generated by calling the Encode function from a specific format version or by calling the top-level Encode function and specifying a valid format version number (e.g., 0 or 1)
  • add support for decoding a given (valid) certificate metadata payload
    • the intent is to support decoding any given payload matching the set of supported format versions (e.g., 0, 1)
    • the caller provides an instance of a specific format version of the certificate metadata payload and the Decode function for that format version is used
    • once a format version is stable, the intent is to support creating and decoding it using this library indefinitely
      • this should allow the sysadmin using the check_cert plugin to specify what version of the payload format they wish to create
      • this should allow the sysadmin using a reporting tool to consume a certificate metadata payload generated by the check_cert plugin in the same fixed version as the one they asked the check_cert plugin to create
      • this process should continue to work as-is until the sysadmin decides to explicitly change the certificate metadata payload format version they're working with; updating this dependency should not break payload generation or consumption

Other changes:

  • add identification of misordered certificate chains
  • add example "test" to illustrate library usage
    • initial example uses format 0; the plan is to update the example once format 1 is released/stable
  • documentation updates
  • general refactoring work

References

@atc0005 atc0005 added documentation Improvements or additions to documentation enhancement New feature or request breaking Breaking change in behavior from a previous release labels Nov 23, 2024
@atc0005 atc0005 added this to the v0.7.0-alpha.1 milestone Nov 23, 2024
@atc0005 atc0005 self-assigned this Nov 23, 2024
OVERVIEW

Add support for generating a certificate metadata payload in JSON
format from a specified metadata payload format version.

Add support for support for decoding a given (valid) certificate
metadata payload. The format is automatically detected from a list of
valid format versions.

The intent is to support all stable format versions indefinitely.

As of this commit / PR, format 0 is still under active development.
This format version is an "unstable" metadata format and is not
covered by this goal; format version 0 is subject to change often as
development continues. Format version 1 is implemented at this time as
a stub version for testing purposes; once stable the plan is to
promote version 0 content as the initial version 1.

CHANGES

Primary changes:

- add support for generating a JSON payload from a specified metadata
  payload format version
  - this can be generated by calling the `Encode` function from a
    specific format version or by calling the top-level `Encode`
    function and specifying a valid format version number (e.g., `0`
    or `1`)
- add support for decoding a given (valid) certificate metadata
  payload
  - the intent is to support decoding any given payload matching the
    set of supported format versions (e.g., `0`, `1`)
  - the caller provides an instance of a specific format version of
    the certificate metadata payload and the `Decode` function for
    that format version is used
  - once a format version is stable, the intent is to support creating
    and decoding it using this library indefinitely
    - this should allow the sysadmin using the `check_cert` plugin to
      specify what version of the payload format they wish to create
    - this should allow the sysadmin using a reporting tool to consume
      a certificate metadata payload generated by the `check_cert`
      plugin in the same fixed version as the one they asked the
      `check_cert` plugin to create
    - this process should continue to work as-is until the sysadmin
      decides to explicitly change the certificate metadata payload
      format version they're working with; updating this dependency
      should not break payload generation or consumption

Other changes:

- add identification of misordered certificate chains
- add example "test" to illustrate library usage
  - initial example uses format 0; the plan is to update the example
    once format 1 is released/stable
- documentation updates
- general refactoring work

REFERENCES

- #19
- #31
- #46
- atc0005/check-cert#1004
@atc0005 atc0005 force-pushed the i46-add-support-for-encoding-decoding-cert-payloads branch from df9f195 to 0cb596f Compare November 23, 2024 23:11
@atc0005 atc0005 merged commit 0d64fb6 into development Nov 23, 2024
28 of 29 checks passed
@atc0005 atc0005 deleted the i46-add-support-for-encoding-decoding-cert-payloads branch November 23, 2024 23:13
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
breaking Breaking change in behavior from a previous release documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant