Skip to content

Conversation

@kiron-mx
Copy link
Collaborator

Description

The RA plugin API is intended to make it easy to extend an RA built with CmpRaComponent, by using
additional rules for checking certificate requests. The API enables programmers to create plugins in
any programming language.

Contributions

Extendend the InventoryInterface with the ability to

  1. start an external process for verifying a CSR, as well as
  2. issuing a HTTP request to an external system

Usage / Test examples

  1. Process-based API: test case invokes Python script scripts/external-inventory-example.pyw as external process (set by environment variable RA_INVENTORY_EXEC = <path to executable>)
  2. HTTP API: test case sends request to a HTTP server (set by environment variable RA_INVENTORY_URL = <URL to HTTP server>) *

* Currently test case expects a HTTP server already running on http://127.0.0.1:8000/check. Therefore, it is excluded from the Maven build

Implementations:
1. local check of subject.CN
2. check run in external process
3. check delegated to REST-API

Test Cases:
1. Test inventory invocation
2. Test local inventory
3. Test external inventory

Test Configurations:
1. Enrollment with local inventory path
2. Enrollment with plugin path for external inventory checker process
- InventoryPluginBase class for common structures and methods
- Use plain JSON structure for certificate request information
- Use environment variable RA_INVENTORY_EXEC to pass on path to external
  checker to lightweightCmpRa
- Test case uses scripts/external-inventory-example.pyw as external
  checker
- Change from apache http client to java.net.http
- Use plain JSON structure for certificate request information
- Adjust test case to use environment variable RA_INVENTORY_URL for HTTP
  service
@kiron-mx kiron-mx requested a review from Akretsch January 24, 2024 09:43
@Akretsch Akretsch marked this pull request as ready for review January 24, 2024 09:44
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.

2 participants