Callback handler verification
Callback handlers are verified by Acronis before the CyberApp version is allowed to be deployed to production data centers.
Note
Verification of custom callbacks is usually out of the verification scope.
The following tests are performed during verification:
General
Callback handler correctly parses the
X-CyberApp-Auth
header (left side as plain text, right side as JSON).Callback handler correctly parses the
X-CyberApp-Extra
header (as JSON text).
Access control
Callback handler parses and validates the
Authorization
header.[If applicable] Callback handler verifies
context.tenant_id
and provides information relevant to this tenant.
CyberApp enablement
CyberApp status is reported correctly with the cti.a.p.acgw.callback.v1.0~a.p.enablement.read.v1.0 callback.
CyberApp can be enabled with the cti.a.p.acgw.callback.v1.0~a.p.enablement.write.v1.0 callback according to the following rules:
When CyberApp is not enabled, the CyberApp status must be written. The response must contain the
vendor_tenant_id
andacronis_tenant_id
that were used to enable the CyberApp.When CyberApp is enabled, the
acronis_tenant_id
of the CyberApp must not be changed for the samevendor_tenant_id
. In case a differentacronis_tenant_id
for the samevendor_tenant_id
was provided, the request must fail.When CyberApp is enabled, a request with the same
acronis_tenant_id
should be successful.
CyberApp can be disabled with the cti.a.p.acgw.callback.v1.0~a.p.enablement.reset.v1.0 callback according to the following rules:
CyberApp status must be reset.
Customer mapping information must be reset.
Customer mapping
A list of customers is reported with the cti.a.p.acgw.callback.v1.0~a.p.topology.read.v1.0 callback.
A list of customer mapping pairs is reported with the cti.a.p.acgw.callback.v1.0~a.p.tenant_mapping.read.v1.0 callback.
Customer mapping can be written and removed with the cti.a.p.acgw.callback.v1.0~a.p.tenant_mapping.write.v1.0 callback.
Postman collection
We provide a Postman collection that can be used to verify all mentioned scenarios and simplify your testing process. The collection includes CyberApp enablement with customer mapping requests.
The requests include tests that verify whether the callback corresponds to the defined contract. The tests verify:
Response payload.
Received callback ID.
Response code.