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

Add WS CLI method to get remaining number of approvals

    Details

    • Type: New Feature
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: EJBCA 7.0.0
    • Component/s: None
    • Labels:
      None
    • Issue discovered during:
      Customer
    • Sprint:
      EJBCA Team Bob - 2018 w48

      Description

      There has been many support requests lately using approvals and WS API.

      We should document and be able to support a simple approval workflow with clientToolBox
      {{}}

      ./ejbcaClientToolBox.sh EjbcaWsRaCli edituser testuser foo123 }}{{false "CN=testuser" NULL NULL ManagementCA 1 USERGENERATED NEW EMPTY ENDUSER NULL
       <...>
       Waiting }}{{for approval: Add Entity request has been added }}{{for approval by authorized administrators.
       Approval requestID: 1845592727
        
       # If you now try to enroll you will get an error, since the above edituser command has not been executed:
       ./ejbcaClientToolBox.sh EjbcaWsRaCli pkcs10req testuser foo123 ~/tmp/1.csr PEM NONE .
       Error: USER_WRONG_STATUS: null
       org.ejbca.ui.cli.ErrorAdminCommandException: org.ejbca.core.protocol.ws.client.gen.EjbcaException_Exception: Got request with status GENERATED (40), NEW, FAILED or INPROCESS required: testuser.
        
       # You can run a command to check how many approvals are remaining, use this to poll the CA for when the request is approved (don't poll too often though):
       ./ejbcaClientToolBox.sh EjbcaWsRaCli getremainingnumberofapprovals 1845592727
       Approvals remaining: 1
        
       # Approve the request in RA GUI (or Admin GUI), and check again:
       ./ejbcaClientToolBox.sh EjbcaWsRaCli getremainingnumberofapprovals 1845592727
       Approvals remaining: 0
        
       # Now you can enroll:
       ./ejbcaClientToolBox.sh EjbcaWsRaCli pkcs10req testuser foo123 ~/tmp/1.csr PEM NONE .

      {{}}In order to support this, one new WS CLI call is needed, and it's a simple one.

      • getremainingnumberofapprovals

        Attachments

          Activity

            People

            • Assignee:
              tomas Tomas Gustavsson
              Reporter:
              tomas Tomas Gustavsson
              Verified by:
              Samuel Lidén Borell
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 2 hours
                2h
                Remaining:
                Time Spent - 1 hour, 10 minutes Remaining Estimate - 50 minutes
                50m
                Logged:
                Time Spent - 1 hour, 10 minutes Remaining Estimate - 50 minutes
                1h 10m