saltstack / saltstack/salt

[Bug]: `x509_v2`: Tracebacks and output issues

Open
#69,898 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug needs-triage
Dominant language
Python
Stars
15.7k
Forks
5.6k
Avg merge
2d 44m
Merged PRs (30d)
80

Description

What happened?

This is a collection of relatively minor bugs that came up during a review.

Tracebacks:

  • Malformed not_before/not_after/revocation_date results in a traceback instead of state error return
  • authorityInfoAccess specified as a list of dicts with a single critical string it was meant to skip causes a traceback
  • Adding an extension to an already-revoked entry in a CRL causes a traceback
  • Adding cRLNumber: auto to an existing CRL without a cRLNumber extension causes a traceback

Output inconsistencies:

  • create_private_key returns None for der/pkcs12 output written to a path, while the rest returns a "Private key written to {path}" message for the CLI
  • Typo onysomereasons in read_* output for issuingDistributionPoint extension
  • Typo organizataion in read_* output for certificatePolicies extension
  • An RFC822Name was rendered with a mail: prefix, when it should be email:

For reproductions, see PR.

Type of salt install

Official deb

Major version

3006.x

What supported OS are you seeing the problem on? Can select multiple. (If bug appears on an unsupported OS, please open a GitHub Discussion instead)

ubuntu-24.04

salt --versions-report output
Current HEAD of 3006.x

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the x509_v2 implementation and reproduce the listed traceback and output cases from the issue; the body provides no file or test path. Done means each malformed-input case returns a state error rather than a traceback and each listed CLI/read_* output is corrected, with regressions covered where the project’s existing tests permit.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
security
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.