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

Create REST endpoint for cryptotoken activation

    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:
      None

      Description

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

      Method type: PUT
      Input JSON object:  activation_code

      Responses:
      200 OK (if successful) https://restfulapi.net/http-methods/#put
      400 Bad Request (if wrong enrollment code or unknown token name)

      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 crypto token is actually activated (verify in GUI)
      • Run CryptoTokenRestResourceSystemTest and verify the result
      • Make sure activation fails if the requesting admin lacks role privilege /cryptotoken/activate/xx

       

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2 days Original Estimate - 2 days
                  2d
                  Remaining:
                  Time Spent - 7 hours, 14 minutes Remaining Estimate - 1 day, 1 hour
                  1d 1h
                  Logged:
                  Time Spent - 7 hours, 14 minutes Remaining Estimate - 1 day, 1 hour
                  7h 14m