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

Proof of Concept for RA Plugin API #74

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

Proof of Concept for RA Plugin API #74

wants to merge 10 commits into from

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
@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.

1 participant