Code Signing with Upload & Sign
This API is used for code signing with upload and sign. It establishes the policies and permissions that oversee the process of uploading and signing code files. Its primary purpose is to ensure a secure and authorized code signing process, playing a crucial role in preserving control and compliance throughout code deployment and execution.
URL: /code-signing-upload-sign-file-policy
Type: POST
Parameters
| Param Type | Name | Description | Field Type |
|---|---|---|---|
| Header | sessionId |
Session ID received after login. | String |
| Header | username |
AppViewX login username. | String |
| Header | password |
AppViewX login password. | String |
| Payload | file |
Upload the file for code signing. | file |
| Payload | fileName |
Name of the file. | String |
| Payload | fileType |
Specific format of a file providing essential metadata for proper handling and processing. | String |
| Payload | signingPolicy |
Enter the signing policy for code signing. | String |
| Payload | signingKey |
Enter the signing key for code signing. | String |
| Payload | signedType |
Select the code signed type. | String |
| Payload | addOnFields |
Enter the additional fields required for code signing. | map |
Possible Response Message and Code
| HTTP Code | appStatusCode | Description | Response Message |
|---|---|---|---|
| 200 | null | Ok | Successful |
| 400 | CODE_SIGNING_0080 | Bad Request | Wrong Input Payload for the text fields in the text block |
| 400 | CODE_SIGNING_0081 | Bad Request | Invalid Number added in the Add-ons section |
| 400 | CODE_SIGNING_0082 | Bad Request | Mandatory fields are missing in the Add-ons Section |
| 500 | CODE_SIGNING_0063 | Internal Server Error | Your chosen signing type is not supported by the selected policy |
| 403 | CODE_SIGNING_0058 | Forbidden | Unsupported file type is uploaded. The policy selected doesn't support uploaded file type |
| 500 | CODE_SIGNING_0062 | Internal Server Error | Ip provided is invalid |
| 403 | CODE_SIGNING_0031 | Forbidden | Permissions are not there to upload file for signing |
| 500 | CODE_SIGNING_0070 | Internal Server Error | Signing Key is not mapped to the given policy. |
| 500 | CODE_SIGNING_0073 | Internal Server Error | Certificate is not present in the cert inventory |
| 500 | CODE_SIGNING_0087 | Internal Server Error | Signing Key is Revoked/Expired |
| 500 | CODE_SIGNING_0020 | Internal Server Error | Error in generating the signed file |
| 500 | CODE_SIGNING_0023 | Internal Server Error | I/O Exception occurred |
| 500 | CODE_SIGNING_0022 | Internal Server Error | Error in generating the signature file |
| 500 | CODE_SIGNING_0021 | Internal Server Error | Error in updating the signed data |
Sample Request/Response
Use Case
To sign a code using code-signing-upload-sign-file-policy API.
Request URL
http://pe-sign-apvx-n5.lab.appviewx.net:30001/avxapi/code-signing-upload-sign-file-policy?gwsource=external
Request Payload
{
"payload" : {
file: (binary)
fileName: AppViewX.jar
fileType: JAR
signingPolicy: testPolicyByAppViewX
signingKey: GCA_CSP_Cert=E8:F1:1A:04:29:BF:72:44:85:2A:18:12:70:5F:74:F6:42:79:CA
signedType: File Based Signing
addOnFields: [{"Version":"V1"},{"Build":"1"}]
}
}Response
{
"response": "65252c675e3734782705b4cd",
"message": null,
"appStatusCode": null,
"tags": null,
"headers": null
}