Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

QCP-N-QSCD 411 1(411 2), 412-2 and 412 5 #129

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

breynders-cb
Copy link

@breynders-cb breynders-cb commented Oct 28, 2024

As previously mentioned in #124, a first PR which extends pkilint with QCP-N-QSCD for 411-1 (with restrictions of 411-2), 412-2 and 412-5.

I did my best in maintaining the existing structure of everything, please let me know where you'd want changes and we'll use this PR to get everything aligned as much as possible.

I've generated certificates as integration tests to validate most (or all) rules that I've added as part of the qcp-n-qscd profile.

Additionally:

  • I did not add tests, what's the testing policy? I see there's a lot of integration tests and I'm wondering if you have some tool/project set up that can already easily generate all these certificates in the right (i.e. wrong) format. If not I'll start building something for ourselves to generate some test cases for these types (but will take a bit).
  • For etsi the finding_metadata.csv seems to be empty, I tried to document all the sources (and changes) but is it on the roadmap to fill in that csv?

And some further questions inlined ⬇️

Comment on lines +371 to 375
# PR Question: Is this from 415_5.qcs-4.2? Needs different classifier?
allowances[en_319_412_5.id_etsi_qcs_QcCClegislation] = Rfc2119Word.MUST
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering what the source was for this rule. I couldn't really find it other than the reference in 412-5 QCS 4.2. If so, would it need a different source in the validation finding?

@breynders-cb breynders-cb force-pushed the qcp-n-qscd-411-1(412-2)-and-412-5 branch from 0929950 to 0e59ab3 Compare October 29, 2024 12:48
@breynders-cb breynders-cb changed the title QCP-N-QSCD 411 1(412 2) and 412 5 QCP-N-QSCD 411 1(411 2) and 412 5 Oct 29, 2024
@breynders-cb breynders-cb force-pushed the qcp-n-qscd-411-1(412-2)-and-412-5 branch 2 times, most recently from e06fa2d to 6567785 Compare October 30, 2024 16:11
@breynders-cb breynders-cb changed the title QCP-N-QSCD 411 1(411 2) and 412 5 QCP-N-QSCD 411 1(411 2), 412-2 and 412 5 Oct 30, 2024
@breynders-cb breynders-cb force-pushed the qcp-n-qscd-411-1(412-2)-and-412-5 branch from 6567785 to caa9f65 Compare November 1, 2024 15:23
@breynders-cb breynders-cb marked this pull request as ready for review November 1, 2024 15:25
@breynders-cb
Copy link
Author

Moved to ready-for-review since the ETSI rules are now considered feature-complete from my end (and I'm going to shift towards implementing the POR rules now), looking forward to the feedback!

@CBonnell
Copy link
Collaborator

CBonnell commented Nov 4, 2024

Thank you this great contribution, @breynders-cb! I'm currently traveling for work this week, but will review this PR fully when I return next week.

As for the test case generation, we use der-ascii to generate test artifacts. It has a bit of learning curve to use, but quite powerful and flexible. The test case file format is the PEM text of the artifact followed by the CSV-formatted output of findings. This makes it relatively simple to write test case generation scripts.

We originally did not flesh out the ETSI finding_metadata.csv file, as the ETSI linter references the citation directly in the finding codes. We can certainly flesh out that file if that would be helpful. We are planning to revamp and improve the documentation for findings as part of #64, but haven't had the cycles yet do to so.

@breynders-cb
Copy link
Author

Thank you this great contribution, @breynders-cb! I'm currently traveling for work this week, but will review this PR fully when I return next week.

As for the test case generation, we use der-ascii to generate test artifacts. It has a bit of learning curve to use, but quite powerful and flexible. The test case file format is the PEM text of the artifact followed by the CSV-formatted output of findings. This makes it relatively simple to write test case generation scripts.

We originally did not flesh out the ETSI finding_metadata.csv file, as the ETSI linter references the citation directly in the finding codes. We can certainly flesh out that file if that would be helpful. We are planning to revamp and improve the documentation for findings as part of #64, but haven't had the cycles yet do to so.

Great, thanks! I'll add der-ascii to my list of tools, for now I spruced up some of our test code and generated test certificates through bouncy castle so all new rules should have tests in the PEM+csv format.

@breynders-cb breynders-cb force-pushed the qcp-n-qscd-411-1(412-2)-and-412-5 branch from caa9f65 to a0295ea Compare November 11, 2024 09:29
@breynders-cb breynders-cb force-pushed the qcp-n-qscd-411-1(412-2)-and-412-5 branch from a0295ea to dd6e770 Compare November 11, 2024 09:37
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.

3 participants