Update CA Policy
The Update CA Policy API updates an existing CA policy in AppViewX Native
PKI.
Before you Begin
- You have valid AppViewX credentials or an active session ID.
- The AppViewX Native PKI module is enabled and accessible.
- The CA policy you want to update exists in AppViewX Native PKI.
Request Structure
| Endpoint: | v1/pki/ca/policies |
| Type: | PUT |
| Sample URL: |
To understand the elements of the sample URL, see References. |
| Headers | |
| Content-Type: | application/json |
| Name | Description |
|---|---|
| sessionId
|
(Mandatory) Session Id received after login. Type: String Constraint: Required if username and password are not provided. |
| username
|
(Mandatory) AppViewX login username. Type: String Constraint: Required if sessionId is not provided. |
| password
|
(Mandatory) AppViewX login password. Type: String Constraint: Required if sessionId is not provided. |
| Content-Type
|
(Mandatory) Specifies the nature of the data in the payload. Type: String Constraint: Value of the parameter should be ‘application/json’ |
| gwkey
|
(Mandatory) Tenant Key. This is needed only in case of multi-tenant
installations and can disregarded for other types of installations. Type: String |
| gwsource
|
(Mandatory) Source from which the request is triggered. (E.g.
external) Type: String |
| Payload
|
Contains all the parameters to be included in the request body for the POST
request. Type: Payload |
Payload Parameters
| Parameter | Description |
|---|---|
policyName |
(Mandatory) Name of the CA policy. Type: String. Minimum 2 characters, maximum 64 characters. |
description |
Description of the CA policy. Type: String. Maximum 500 characters. |
caConfiguration |
(Mandatory) CA configuration settings for the policy. Type: Object. |
cryptographicSettings |
(Mandatory) Cryptographic settings for the CA policy. Type: Object. |
csrAndKeyGeneration |
(Mandatory) CSR and key generation settings. Type: Object. |
revocationAndDistribution |
(Mandatory) Revocation and distribution settings. Type: Object. |
caConfiguration
| Parameter | Description |
|---|---|
certificateAuthorityType |
(Mandatory) Type of CA. Type: String. Allowed values: |
validFor |
(Mandatory) Allowed validity period range for certificates issued under this
policy. Type: Array of Objects. Cannot be empty. |
pathLengthConstraint |
(Mandatory) Allowed range for the path length constraint, specified as a
hyphen-separated string. Type: String. Example: |
caConfiguration.validFor (array object)
| Parameter | Description |
|---|---|
value |
(Mandatory) Minimum and maximum validity as a two-element array. Type: Array
of Integer. Example: |
unit |
(Mandatory) Unit for the validity period. Type: String. Allowed values:
|
cryptographicSettings
| Parameter | Description |
|---|---|
cryptoModel |
(Mandatory) Cryptographic model. Type: String. Allowed values:
classical, pqc,
composite. |
keyDetails |
(Mandatory) Key algorithm details for the CA policy. Type: Array of Objects. |
eku |
Extended Key Usage values. Type: Array of String. Example:
["serverAuth", "clientAuth"]. |
ku |
Key Usage values. Type: Array of String. Example: ["digitalSignature",
"keyEncipherment", "crlSign"]. |
cryptographicSettings.keyDetails (array object)
| Parameter | Description |
|---|---|
******Algorithm |
The available fields vary based on the selected cryptographic model:
The fields displayed also depend on the selected algorithm. For example, some algorithms require a curve selection, while others require a key length.
RSA. |
padding |
Allowed padding algorithms. Type: Array of String. Example:
["PKCS1"]. |
bitLength |
(Mandatory) Allowed key bit lengths. Type: Array of String. Example:
["2048"]. |
hashAlgorithm |
(Mandatory) Allowed hash algorithms. Type: Array of String. Example:
["SHA256"]. |
csrAndKeyGeneration
| Parameter | Description |
|---|---|
csrGeneration |
(Mandatory) CSR generation method. Type: String. Allowed values:
AppViewX, HSM. Note: HSM
support depends on the selected cryptographic model and algorithm:
|
revocationAndDistribution
| Parameter | Description |
|---|---|
crlPublish |
Enables CRL publishing for certificates issued under this policy. Type:
Boolean. If true, crlSign must be included in
ku. |
crlDistributionPoints |
Protocols for CRL distribution. Type: Array of String. Allowed values:
HTTP. |
defaultOcspSigningCertificate |
Algorithm for the default OCSP signing certificate. Type: String. EC algorithm is not allowed. |
defaultCsrGenerationForOcspSigningCertificate |
CSR generation method for the OCSP signing certificate. Type: String. Allowed
values: AppViewX. HSM is not allowed. |
Response Structure
The response returns a string of type application/json with the following body parameters:
| Parameter | Description |
|---|---|
response |
Indicates the status of the update operation. Type: String or Object. |
message |
Success or error message. Type: String. |
appStatusCode |
Application-specific status code for the response. Non-null for failure responses. Type: String. |
tags |
Additional information in case of a failure response. |
Status Codes
| HTTP Status | appStatusCode | Description |
|---|---|---|
200 OK |
null | CA policy updated successfully. |
400 Bad Request |
MANDATORY_POLICY_NAME |
Policy name is missing or empty. Remediation: Provide a value for
|
400 Bad Request |
KEY_DETAILS_VALIDATION_FAILED |
Validation failed for the key details in the policy. Remediation:
Verify that |
400 Bad Request |
CRL_SIGN_MUST_PRESENT_IN_KU_FOR_CRL_PUBLISH |
crlPublish is set to true but
crlSign is not included in ku.
Remediation: Add |
400 Bad Request |
INVALID_OCSP_SIGNING_CERTIFICATE_ALGORITHM |
EC is not a valid algorithm for defaultOcspSigningCertificate.
Remediation: Use a non-EC classical algorithm. |
400 Bad Request |
INVALID_OCSP_CSR_GENERATION_TYPE |
HSM is not a valid value for
defaultCsrGenerationForOcspSigningCertificate.
Remediation: Use |
401 Unauthorized |
AVX_GW_003 |
Authentication failed — invalid credentials. Remediation: Provide a
valid |
403 Forbidden |
USER_POLICY_WRITE_ACCESS_RESTRICTED |
The authenticated user does not have write access to CA policies.
Remediation: Contact your AppViewX administrator to grant the required permissions. |
404 Not Found |
USER_POLICY_NOT_FOUND |
No CA policy found with the specified name. Remediation: Use the
|
Sample Request/Response
Sample Request
{
"policyName": "RootCAPolicy-PQC-ML-DSA",
"description": "Update Root CA policy with PQC ML-DSA key details",
"caConfiguration": {
"certificateAuthorityType": "Root CA",
"validFor": [
{
"value": [
1,
2
],
"unit": "Years"
}
],
"pathLengthConstraint": "0-4"
},
"cryptographicSettings": {
"cryptoModel": "pqc",
"keyDetails": [
{
"keyDetailsType": "PqcKeyDetails",
"pqcAlgorithm": "ML-DSA",
"bitLength": [
"15616"
],
"hashAlgorithm": [
"SHAKE256"
]
}
],
"eku": [
"serverAuth"
],
"ku": [
"digitalSignature",
"crlSign"
]
},
"csrAndKeyGeneration": {
"csrGeneration": "AppViewX"
},
"revocationAndDistribution": {
"crlPublish": true,
"crlDistributionPoints": [
"HTTP"
],
"defaultOcspSigningCertificate": "RSA",
"defaultCsrGenerationForOcspSigningCertificate": "AppViewX"
}
}
Sample Response
{
"response": "Success",
"message": "CA policy updated successfully",
"appStatusCode": 0,
"tags": {},
"headers": {
"additionalProp1": {}
}
}
References
- IP/HostName/TenantName: Replace with the actual IP address, hostname, or
tenant name based on the specific configuration in AppViewX.
- IP: A unique identifier assigned to each device connected to a computer
network that uses the Internet Protocol for communication
The IP address will be included in the endpoint URL for an on-prem deployment.
- HostName: A human-readable label assigned to a device (host) on a
network
The hostname will be included in the endpoint URL for an on-prem deployment.
- TenantName: An identifier label for a tenant given to indicate which
tenant's data the API request will access/modify
The tenant name will be included in the endpoint URL for a SaaS deployment.
- IP: A unique identifier assigned to each device connected to a computer
network that uses the Internet Protocol for communication
- GWPORT: AppViewX gateway port
A gateway port refers to a network port through which data is sent and received to communicate with a gateway in an on-prem deployment.
Example: 31443
- avxapi: Path parameter value (static) that is part of the endpoint's URL
- Endpoint: Endpoint of the API, for example: execute-hook
- gwsource: Source or origin of a gateway, for example: external.
