Skip to content

[Feature]: Make validator args dynamic #18

@bradh11

Description

@bradh11

Pre-flight checklist

  • I have searched existing issues to make sure this feature hasn't been requested
  • I have read the documentation to ensure this feature doesn't already exist
  • This feature aligns with the project's goals and scope

Problem Statement

As a user, i want all validators to be able to accept arguments similar to how subject_alt_names currently works - where the validator name is the keyword, and then the validator args are passed in as a dict. This should be consistent across all validators and someone developing a validator should not have to make an update to any core modules in order for the validator args to be available.

Proposed Solution

I would like CertMonitor to read in all validator names and dynamically accept kwargs for those names with a dict as the body. Similarly to the way subject_alt_names works. In fact this will continue to work as-is - no breaking change. But will enable other validators to more easily have arguments passed in.

validation_results = monitor.validate(validator_args={"subject_alt_names": ["www.example.com"]})

Feature Category

API enhancement

Use Case

Add ability for other validators to have the same syntax as below without having to make core module updates.

validation_results = monitor.validate(validator_args={"subject_alt_names": ["www.example.com"]})

Implementation Ideas

No response

Code Examples

Alternatives Considered

No response

Priority

Medium - Would be helpful

Contribution

  • I would be willing to implement this feature
  • I would be willing to write tests for this feature
  • I would be willing to write documentation for this feature
  • I would be willing to help with code review

Additional Context

No response

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions