Skip to content

Conversation

@bernhardreiter
Copy link
Contributor

@bernhardreiter bernhardreiter commented Aug 15, 2025

  • add the new leading ABNF from ABNF suggestions #858 for namespace into src/ssvc/utils/ssvc_namespace_pattern.abnf.
    The location was chosen to be as close to the python file where it is integrated.
  • replace old regular expression patterns in patterns.py with ones generated from the ABNF
    Generation was done with
abnf              2.4.0
abnf-to-regexp    1.1.3
python 3.11.2

on Debian GNU/Linux Bookworm.

  • replace JSON schema files with the newly generated ones
  • adapt tests for the changed namespace rules
  • Some experimental tests were removed.

based on #881, so that tests run in principle.

One failing test was there before and is untouched.

black was hinted upon in the repository, so the changed code was run by it.

A review should take a deeper look at the changed testcases in test_namespaces_pattern.py
and note that docs/reference/code/namespaces.md is know to need to be overhauled with the results of the discussions that lead to #858.
(The documentation has not been adapted further as the reasoning behind the #858 are not fully documented in that issue.)

Assuming shared copyright on the new file, ssvc_namespace_pattern.abnf. As I am working on behalf of @tschmidtb51, the (German) BSI owns the copyright of copyrightable changes.

Additional suggestions for further improvements (out of scope for this new code):

  • Someone may consider to place the namespace properties part in one JSON schema file and refer to it from the others.
  • Test cases could be overhauled as well, cutting down some elder ones that were kept to show the difference, but maybe a duplication. And adding some more for the enhanced patterns.
  • Add code to generate an insert the patterns from the ABNF into the python part.
    This means extending the requirements.

resolve #858

  use new ABNF from #858 and use the pattern created from it
  to replace the existing patterns.

  add compatibility definitions and change for tests so the existing
  tests can be started (and fail where changes from #858 affect them).
  .. as it comes from working file `s3.abnf` from
   #858 (comment)
   and one intermediate and two trailing spaces are unnecessary
  use valid examples where it is fairly obvious what the meaning
  of the test is. Remove tests where it is not or the test does not
  seem useful anymore.

  (The pattern schema is not yet adapted and thus checks via the schema
  will fail.)
   in code that the new ssvc pattern touched
Copy link
Contributor

@tschmidtb51 tschmidtb51 left a comment

Choose a reason for hiding this comment

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

First half of my review - main point:

Please use x_example.test#test instead.

Comment on lines 150 to 151
`x_org.example#bar`, and there are no guarantees of global uniqueness for the
decision points in the `x_org.example#bar` namespace.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
`x_org.example#bar`, and there are no guarantees of global uniqueness for the
decision points in the `x_org.example#bar` namespace.
`x_example.test#test`, and there are no guarantees of global uniqueness for the
decision points in the `x_example.test#test` namespace.

Copy link
Contributor

Choose a reason for hiding this comment

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

@ahouseholder Or we rephrase that to x_example.test#documentation

Copy link
Contributor

@tschmidtb51 tschmidtb51 Aug 19, 2025

Choose a reason for hiding this comment

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

I worked on that part - please have a look in the namespaces.md during your review.

  .. by fixing a typo in a test example.
  .. by adding whitespace after [ and before ] to be consistent.
@ahouseholder ahouseholder self-assigned this Aug 18, 2025
@ahouseholder ahouseholder added enhancement New feature or request integration/blocker Something that is blocking integration with another framework or system tech/backend Back-end tools, code, infrastructure tech/data Data implementation (content of /data, data object instances, etc.) integration Related to integration of SSVC into another framework or system labels Aug 18, 2025
Copy link
Contributor

@ahouseholder ahouseholder left a comment

Choose a reason for hiding this comment

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

holding my review until @tschmidtb51's concerns have been resolved.

@ahouseholder
Copy link
Contributor

Additional suggestions for further improvements (out of scope for this new code):

  • Someone may consider to place the namespace properties part in one JSON schema file and refer to it from the others.

Copy link
Contributor

@tschmidtb51 tschmidtb51 left a comment

Choose a reason for hiding this comment

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

@bernhardreiter Please address my comments.

@ahouseholder There are some questions in this review for you: Could you please answer them?

- addresses parts of #858
- update decision to match current ABNF
- minor format updates and clarifications
@tschmidtb51
Copy link
Contributor

@ahouseholder: How do we call a collection of decision points in one namespace? It is not necessarily a decision point group... Currently, I use "model" but I guess there should be a better wording for that.

@ahouseholder
Copy link
Contributor

@ahouseholder: How do we call a collection of decision points in one namespace? It is not necessarily a decision point group... Currently, I use "model" but I guess there should be a better wording for that.

I'd suggest collection.

We use model interchangeably with the thing we now call a DecisionTable.

  to `.example.test#test` from `.com.example#foo` and other
  combinations.
@ahouseholder
Copy link
Contributor

@tschmidtb51 I think I've addressed all your comments directed at me. Please let me know if I've missed anything.

Copy link
Contributor

@tschmidtb51 tschmidtb51 left a comment

Choose a reason for hiding this comment

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

Still some minors.

  remove old textual description in favor of a link to the ABNF,
  which is a more precise description. Avoid duplication this way.
@bernhardreiter
Copy link
Contributor Author

bernhardreiter commented Aug 19, 2025

@bernhardreiter Please also update the namespaces.md based on the ABNF (especially the last 20 lines).

6a0bc7e improved the documentation in two places. It mainly links to the new ABNF file and avoids some duplication this way.

- addresses review comments of #882
- update a few examples
- corrected "model" to "collection"
Copy link
Contributor

@tschmidtb51 tschmidtb51 left a comment

Choose a reason for hiding this comment

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

I think we addressed all comments so far - @ahouseholder Please review.

@bernhardreiter
Copy link
Contributor Author

bernhardreiter commented Aug 20, 2025

Note that docs/reference/code/namespaces.md would still need more love before it is a good documentation. It partly explains the ABNF, mixed with meaning. This would need to be cross checked, then stripped of duplicates, corrected for errors found in the process and then checked in the mkdocs layout.
I suggest a new issue for this.

@sei-vsarvepalli
Copy link
Contributor

The link checker fails can be fixed but the src/test/test_mixins.py failures need to be reviewed still.

@bernhardreiter
Copy link
Contributor Author

but the src/test/test_mixins.py failures need to be reviewed still.

Note that this test failure was there before this PR, so the PR does not worsen the situation.

@ahouseholder ahouseholder merged commit b81144f into CERTCC:main Aug 21, 2025
0 of 2 checks passed
@ahouseholder ahouseholder added this to the 2025-09 milestone Aug 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request integration/blocker Something that is blocking integration with another framework or system integration Related to integration of SSVC into another framework or system tech/backend Back-end tools, code, infrastructure tech/data Data implementation (content of /data, data object instances, etc.)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ABNF suggestions

4 participants