Create a Mock KMIP Interface for testing

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Fixed
    • Priority: Major - P3
    • 8.3.0-rc0
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Security
    • Fully Compatible
    • Server Security 2025-10-10, Server Security 2025-10-24
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      To better support unit tests, we should create a mock KMIP server that can generate certain outcomes for testing.

      1. Create a KMIPServiceMock class that makes a mock version of KMIPService. It should inherit from KMIPService. The KMIPServiceMock should take an enum that indicates the failure that the KMIPService implements.
      2. We should create two basic faults to start - KMIPSuccess (Create a new symmetric key for the class, use it to encrypt the value passed into encrypt) and KMIP Network Failure.
      3. Add a virtual function on SLSLogEncryptorManager called createKMIPService. For SLSLogEncryptorManager, have that function call KMIPService::createKMIPService.
      4. Add a subclass of SLSLogEncryptorManagerImpl called SLSLogEncryptorManagerImplMock. Have the class take an enum in the constructor and implement the createKMIPService function for SLSLogEncryptorManagerImplMock that creates a KMIPServiceMock.

            Assignee:
            Adrian Gonzalez Montemayor
            Reporter:
            Shreyas Kalyan
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: