Uploaded image for project: 'EJBCA'
  1. EJBCA
  2. ECA-8118

Create REST endpoint for cryptotoken key creation

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: EJBCA 7.2.0
    • Component/s: None
    • Labels:

      Description

      Endpoint: /ejbca/ejbca-rest-api/v1/cryptotoken/{cryptotoken_name}/generatekeys

      Method type: POST
      Input JSON object:  key_pair_alias, key_alg, key_spec

      Responses:
      200 OK (if successful)
      422 Unprocessable Entity (unknown token name / unknown key alg / unknown spec / invalid alias)

      Other responses should be handled by the existing ExceptionHandler for REST.

      • Write system tests! In CryptoTokenRestResourceSystemTest

       

      How to test:

      • Using Swagger, try valid and invalid requests and verify that proper response code and error message / success message is returned. Using valid input, make sure the key pair is created with correct algorithm (verify in GUI).
      • Run CryptoTokenRestResourceSystemTest and verify the result
      • Make sure creation fails if the requesting admin lacks role privilege /cryptotoken/keys/generate/xx
      • Test with HSM / SoftHSM!

       

        Attachments

          Activity

            People

            Assignee:
            laurik_helmes Lauri Kongas
            Reporter:
            hsunmark Henrik Sunmark
            Verified by:
            Henrik Sunmark
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 3 days
                3d
                Remaining:
                Time Spent - 2 days, 6 hours, 30 minutes Remaining Estimate - 1 hour, 30 minutes
                1h 30m
                Logged:
                Time Spent - 2 days, 6 hours, 30 minutes Remaining Estimate - 1 hour, 30 minutes
                2d 6h 30m