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

Optionally include certificate chain in /pkcs10enroll response

    Details

    • Provenance:
      Internal Delivery
    • Issue discovered during:
      Another issue

      Description

      When retrieving a certificate using the Certificate Management REST API, one would typically like to also retrieve the certificate chain.

      Add an optional parameter include_chain as follows:

      Sending the following payload to https://nautilus:8443/ejbca/ejbca-rest-api/v1/certificate/pkcs10enroll:
      {
          "certificate_request": "-----BEGIN CERTIFICATE REQUEST-----\nMIICzzCCAbcCAQAwQTELMAkGA1UEBhMCU0UxHjAcBgNVBAoMFVByaW1lS2V5IFNv\nbHV0aW9ucyBBQjESMBAGA1UEAwwJdGhpcWEuY29tMIIBIjANBgkqhkiG9w0BAQEF\nAAOCAQ8AMIIBCgKCAQEAvy9aK2ZBCgLjfAHDHxQzOS1oidNKSQrs/zyR0kKM7Met\nnCl/thzkyJnnip3cEmYuuNF3BB3leSxBVPEsx8wPPbctfny8TuKZI3jxedQ2Zn5Y\n3gd70jtz1gvUIzgQpUbN2fgUdxG/HsAOu9Wyf8cthPG6G3LqChDiqGuCSCyQYHC2\nMfklGwY4XdVIyv1Fjpdbe8mFQyp2KMsL2pGRMZ8MfULZxN/+/Zi069GvWbgTV1ln\nANGGhYgLNQYoYS6kiLssJOIPgY3It1tHj1lQMbpfjXcl8LHZdetyxd3Ms6AOZhCP\nKBkwN9t4yeimPNX/U4SNKCKMCDQtX/IB0BduhPydwwIDAQABoEkwRwYJKoZIhvcN\nAQkOMTowODALBgNVHQ8EBAMCBaAwEwYDVR0lBAwwCgYIKwYBBQUHAwEwFAYDVR0R\nBA0wC4IJdGhpcWEuY29tMA0GCSqGSIb3DQEBCwUAA4IBAQBLKe8/AGVojpgxuyBC\nXsiriFu31gL/0KSxYGM0ZlApppQyjqyC2651xtgaEio2uQ1yyKQUoDOpGAEmz5Yu\n3Sqk9qI8vMAMQmnmBfrii1AtZKGQ/E3aWzotbFHzzerQfES4dlvFlZPdlxX/21en\neXy+eEzvQ7f0SCvusmVZsnDVxzMMNTCiLi/6iRN4nDkGDkD6Dl8qZyB6RUdyGY7r\nmJ84oBFuKJlfwCENBtdYftV8XfmPgUmqTTZ0wHJJhimh6aVJeAn6olR2D4XSDJhC\nSQVvNxPjcW7mrrZ9i2XXZEZ9+62TQx1ypF9KHTtkhpDIDe4tJp5LUgCjCANArk+6\nAtao\n-----END CERTIFICATE REQUEST-----\n",
          "certificate_authority_name": "Stormhub RSA Staging G1",
          "certificate_profile_name": "Staging Certificate",
          "end_entity_profile_name": "Staging Certificate",
          "username": "k8s-M4s0nHZ40yjX",
          "password": "vKQRbyirbHDC",
          "include_chain": true
      }
      Received status 201 and the following response:
      {
          "certificate": "MIIEdzCCA1+gAwIBAgIQZC/5RUHvhBH05+zwK3S3rTANBgkqhkiG9w0BAQsFADBWMSAwHgYDVQQDDBdTdG9ybWh1YiBSU0EgU3RhZ2luZyBHMTElMCMGA1UECgwcU3Rvcm1odWIgVHJ1c3QgU2VydmljZXMgTHRkLjELMAkGA1UEBhMCU0UwHhcNMjAwNjA5MjAyMTE4WhcNMjAwNjEwMjAyMTE4WjBBMRIwEAYDVQQDDAl0aGlxYS5jb20xHjAcBgNVBAoMFVByaW1lS2V5IFNvbHV0aW9ucyBBQjELMAkGA1UEBhMCU0UwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQC/L1orZkEKAuN8AcMfFDM5LWiJ00pJCuz/PJHSQozsx62cKX+2HOTImeeKndwSZi640XcEHeV5LEFU8SzHzA89ty1+fLxO4pkjePF51DZmfljeB3vSO3PWC9QjOBClRs3Z+BR3Eb8ewA671bJ/xy2E8bobcuoKEOKoa4JILJBgcLYx+SUbBjhd1UjK/UWOl1t7yYVDKnYoywvakZExnwx9QtnE3/79mLTr0a9ZuBNXWWcA0YaFiAs1BihhLqSIuywk4g+Bjci3W0ePWVAxul+NdyXwsdl163LF3cyzoA5mEI8oGTA323jJ6KY81f9ThI0oIowINC1f8gHQF26E/J3DAgMBAAGjggFUMIIBUDAMBgNVHRMBAf8EAjAAMB8GA1UdIwQYMBaAFAsTh1pz0ZssvmRJH7V9uJ9tL619MBQGA1UdEQQNMAuCCXRoaXFhLmNvbTAnBgNVHSUEIDAeBggrBgEFBQcDAgYIKwYBBQUHAwQGCCsGAQUFBwMBMIGwBgNVHR8EgagwgaUwgaKggZ+ggZyGgZlodHRwOi8vbmF1dGlsdXM6ODA4MC9lamJjYS9wdWJsaWN3ZWIvd2ViZGlzdC9jZXJ0ZGlzdD9jbWQ9Y3JsJmlzc3Vlcj1DTiUzRFN0b3JtaHViK1JTQStTdGFnaW5nK0cxJTJDTyUzRFN0b3JtaHViK1RydXN0K1NlcnZpY2VzK0x0ZC4lMkNDJTNEU0UmcGFydGl0aW9uPTEwHQYDVR0OBBYEFFp+YOhVOWD7GWqt5IXc+5TzIwPyMA4GA1UdDwEB/wQEAwIFoDANBgkqhkiG9w0BAQsFAAOCAQEAAx1AnoqwKq8PHzUUVipvynmPbErg5ERhVTuGRM//xLc50wNHDMDK3UJxFdbsDI7WvOgI2YgJSydK+p7v9/LWtHf4sI/4kTyFxk8MlvYNneE+PyN5zY1mGhzACP9dSIalsy+POwHSmEZ0W4gt8nUqFfNH565F2d2HeL44kFYQjPRvI5mOngjXZ1rg/2mwmd8ev8WcVpgNtxmVCe5acfYPiaeNqkHsRM7gAwHLiULcFjiDjbXW5p86gAyVWrPx5y+SICikLDNWs/LVLWlkqeOvX3hCw159x48o4dkk5tCRp+Dt03p/OIv2PsVlRVkFyYklelG4lgkvzwhdblMl089F4A==",
          "serial_number": "642FF94541EF8411F4E7ECF02B74B7AD",
          "response_format": "DER",
          "certificate_chain": [
              "MIIEqTCCApGgAwIBAgIQJTnt2JlCmZrZ00KVuCMIRzANBgkqhkiG9w0BAQsFADBTMR0wGwYDVQQDDBRTdG9ybWh1YiBSU0EgUm9vdCBSMTElMCMGA1UECgwcU3Rvcm1odWIgVHJ1c3QgU2VydmljZXMgTHRkLjELMAkGA1UEBhMCU0UwHhcNMT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MDBdSMFnp9pf67CJGngPQNLnbuUT8dvcsiDVKgHoKa8+NdE76Uinpwg14eHUzCgLSVA+JeFRVwIAIlyzMSsdLSF"
          ]
      }
      

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              bastianf Bastian Fredriksson
              Reporter:
              bastianf Bastian Fredriksson
              Verified by:
              Samuel Lidén Borell
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - 2 hours Original Estimate - 2 hours
                  2h
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 3 hours, 25 minutes
                  3h 25m