Skip to content

Introduce backend-agnostic provider configuration and provider manager factory#92

Open
ChansAlive wants to merge 13 commits into
eclipse-score:mainfrom
etas-contrib:backend_integration
Open

Introduce backend-agnostic provider configuration and provider manager factory#92
ChansAlive wants to merge 13 commits into
eclipse-score:mainfrom
etas-contrib:backend_integration

Conversation

@ChansAlive

Copy link
Copy Markdown
Contributor

This PR refactors the crypto daemon's provider layer to be backend-agnostic and configurable at build and runtime.

Key changes:

  • Added a new [backend] configuration layer that controls which cryptographic backends are compiled into the daemon via Bazel flags (backend_exports.bzl, backend_config.bzl).
  • Introduced ProviderManagerFactory to register and create provider managers based on compile-time enabled backend families.
  • Made ScoreProviderFactory backend-agnostic: it now discovers enabled score backends (e.g. OpenSSL, future Primula) through active_backends_list.hpp and selects the default backend via a configurable preference order.
  • Made Pkcs11ProviderFactory support different PKCS#11 backends through a Bazel label_flag, replacing hardcoded SoftHSM dependencies.
  • Removed hardcoded provider names (e.g. common::kProviderNameOpenSSL) in favor of names derived from backend adapters and config.
  • Added backend adapter interfaces (score_backend_adapter, openssl_backend_adapter, pkcs11_token_config_parser) to decouple provider implementations from backend-specific details.
  • Added documentation for the three-layer provider configuration model and a README for backend configuration.
  • Added tests for backend config parsing and provider manager behavior.

Build impact:
Backends are now selected via [backend] flags. Existing OpenSSL and SoftHSM defaults are preserved.

@github-actions

github-actions Bot commented Jul 17, 2026

Copy link
Copy Markdown

License Check Results

🚀 The license check job ran with the Bazel command:

bazel run --lockfile_mode=error //:license-check

Status: ⚠️ Needs Review

Click to expand output
[License Check Output]
Extracting Bazel installation...
Starting local Bazel server (8.3.0) and connecting to it...
INFO: Invocation ID: e7632b94-cd0c-4dbf-b6cf-e3291296c13f
Computing main repo mapping: 
Computing main repo mapping: 
Computing main repo mapping: 
DEBUG: Rule 'abseil-cpp+' indicated that a canonical reproducible form can be obtained by modifying arguments integrity = "sha256-m3oGQwXp/ZTRJP+mzDWFkutCtdpYj7TgfQklSqQAhts="
DEBUG: Repository abseil-cpp+ instantiated at:
  <builtin>: in <toplevel>
Repository rule http_archive defined at:
  /home/runner/.bazel/external/bazel_tools/tools/build_defs/repo/http.bzl:394:31: in <toplevel>
DEBUG: Rule 'protobuf+' indicated that a canonical reproducible form can be obtained by modifying arguments integrity = "sha256-w6Cp7OiTLjHDtzbi2xixxC5wcM2biBOIsm0BqnHiTKI="
DEBUG: Repository protobuf+ instantiated at:
  <builtin>: in <toplevel>
Repository rule http_archive defined at:
  /home/runner/.bazel/external/bazel_tools/tools/build_defs/repo/http.bzl:394:31: in <toplevel>
Computing main repo mapping: 
DEBUG: Rule 'grpc+' indicated that a canonical reproducible form can be obtained by modifying arguments integrity = "sha256-CvN7gAlTEwtHwHW1ZoPuYL3D7aPDf8YAQZP1tWl1ggQ="
DEBUG: Repository grpc+ instantiated at:
  <builtin>: in <toplevel>
Repository rule http_archive defined at:
  /home/runner/.bazel/external/bazel_tools/tools/build_defs/repo/http.bzl:394:31: in <toplevel>
Computing main repo mapping: 
Loading: 
Loading: 1 packages loaded
Loading: 1 packages loaded
    currently loading: 
WARNING: Target pattern parsing failed.
ERROR: Skipping '//:license-check': no such target '//:license-check': target 'license-check' not declared in package '' defined by /home/runner/work/inc_security_crypto/inc_security_crypto/BUILD
ERROR: no such target '//:license-check': target 'license-check' not declared in package '' defined by /home/runner/work/inc_security_crypto/inc_security_crypto/BUILD
INFO: Elapsed time: 8.929s
INFO: 0 processes.
ERROR: Build did NOT complete successfully
ERROR: Build failed. Not running target

@github-actions

Copy link
Copy Markdown

The created documentation from the pull request is available at: docu-html

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.

1 participant