siemens / cmp-ra-component

A CMP Registration Authority (RA)
Apache License 2.0
3 stars 5 forks source link

Relax the configuration file format #90

Open ralienpp opened 7 months ago

ralienpp commented 7 months ago

When getting started with CmpRaComponent, even a basic "hello world" example can be a challenge, because it requires the user to fill out some boilerplate structures in the configuration file. This is especially problematic if the user is not yet familiar with the meaning of every option.

An example is when empty structures need to be created:

DownstreamConfiguration:
  - VerificationContext:

A simpler and more compact config could let the user omit such entries altogether. In the current situation, these lines are only here to help the parser (at the expense of extra work for the user).

Another example is to consider a more compact notation like ForceRaVerifyOnUpstream: true instead of the current:

ForceRaVerifyOnUpstream:
  - value: true

My understanding is that these are effects of using https://github.com/eclipse-ee4j/jaxb-ri for automatically processing YAML files into Java objects. Perhaps some improvement can be made by adjusting parameters of jaxbi, or maybe there are other types of low-hanging fruits.

Akretsch commented 7 months ago

Configuration file parsing is done in https://github.com/siemens/LightweightCmpRa/tree/main/src/main/java/com/siemens/pki/lightweightcmpra/configuration , this CmpRaComponent uses only interface implementations from https://github.com/siemens/cmp-ra-component/tree/main/src/main/java/com/siemens/pki/cmpracomponent/configuration