import requests
url = "https://platform.ankra.app/api/v1/org/service-admission/instances/{instance_id}/credential-rotations/{rotation_id}/confirm"
payload = { "digest": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({digest: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/service-admission/instances/{instance_id}/credential-rotations/{rotation_id}/confirm', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/service-admission/instances/{instance_id}/credential-rotations/{rotation_id}/confirm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"digest": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"instance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"plan": {
"schema_version": 123,
"instance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"actor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"service_name": "<string>",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"generation": 123,
"expires_at": "2023-11-07T05:31:56Z",
"secret_name": "<string>",
"owner_role": "<string>",
"secret_uid": "<string>",
"rotations": 123,
"consumers": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"application_name": "<string>",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"namespace": "<string>",
"on_service_cluster": true,
"credential": "owner",
"breaks": true,
"statement": "<string>",
"role_state": "<string>"
}
],
"breaking": 123,
"statements": {
"what_happens": "<string>",
"breaks": "<string>",
"not_affected": "<string>",
"other_copies": "<string>",
"heal": "<string>"
}
},
"digest": "<string>",
"state": "pending",
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"confirmed_at": "2023-11-07T05:31:56Z",
"settled_at": "2023-11-07T05:31:56Z",
"outcome": {
"secret": "deleted",
"note": "<string>",
"observed_at": "2023-11-07T05:31:56Z"
},
"effect": "awaiting",
"effective_at": "2023-11-07T05:31:56Z"
}Confirm a managed-service owner credential rotation by its digest
Requires the applications rollout flag, applications.deploy, and clusters.operate on the service’s cluster and clusters.operate and clusters.read on the cluster of every application environment connected to the service, all intersected with live token scopes. Accepts only the stored rotation and the digest its actor reviewed, resolves the plan again under the instance lock and refuses when anything it covers moved. In one transaction it records the rotation as confirmed with the uid of postgresql-app the cluster’s last sync shows and audits it, with no value of the credential. It then reads postgresql-app, the database Cluster and the CloudNativePG operator live through the cluster’s agent and deletes postgresql-app only when the operator will create it again; CloudNativePG creates it again with a password it generates in the cluster and sets that password on the role app. Ankra never sees, stores or logs the password. Ankra then reads the Secret back for up to 30 seconds. The rotation settles with what the delete came back with, and effect says whether it took effect: taken once Ankra saw the new Secret, from when each application environment on the owner credential reads redeploy_needed and its next deploy copies the new password and rolls the pods that read it; awaiting while Ankra has not seen it, when another rotation is refused and the next review of the service, or a retry of this confirmation, reads the effect from the cluster’s sync; lapsed when it never takes effect. A retry returns the same record and deletes nothing; for a rotation still awaiting its effect it reads the Secret again.
import requests
url = "https://platform.ankra.app/api/v1/org/service-admission/instances/{instance_id}/credential-rotations/{rotation_id}/confirm"
payload = { "digest": "<string>" }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({digest: '<string>'})
};
fetch('https://platform.ankra.app/api/v1/org/service-admission/instances/{instance_id}/credential-rotations/{rotation_id}/confirm', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));curl --request POST \
--url https://platform.ankra.app/api/v1/org/service-admission/instances/{instance_id}/credential-rotations/{rotation_id}/confirm \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"digest": "<string>"
}
'{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"instance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"plan": {
"schema_version": 123,
"instance_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"organisation_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"actor_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"service_name": "<string>",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"generation": 123,
"expires_at": "2023-11-07T05:31:56Z",
"secret_name": "<string>",
"owner_role": "<string>",
"secret_uid": "<string>",
"rotations": 123,
"consumers": [
{
"id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"application_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"application_name": "<string>",
"cluster_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"namespace": "<string>",
"on_service_cluster": true,
"credential": "owner",
"breaks": true,
"statement": "<string>",
"role_state": "<string>"
}
],
"breaking": 123,
"statements": {
"what_happens": "<string>",
"breaks": "<string>",
"not_affected": "<string>",
"other_copies": "<string>",
"heal": "<string>"
}
},
"digest": "<string>",
"state": "pending",
"created_at": "2023-11-07T05:31:56Z",
"expires_at": "2023-11-07T05:31:56Z",
"confirmed_at": "2023-11-07T05:31:56Z",
"settled_at": "2023-11-07T05:31:56Z",
"outcome": {
"secret": "deleted",
"note": "<string>",
"observed_at": "2023-11-07T05:31:56Z"
},
"effect": "awaiting",
"effective_at": "2023-11-07T05:31:56Z"
}Authorizations
Response
The confirmed rotation and what the delete of the Secret came back with.
One rotation of a managed PostgreSQL service's owner credential, as its preparing actor sees it.
Null until the rotation is confirmed. taken: Ankra saw postgresql-app replaced, so each application environment on the owner credential is marked as needing a deploy and its next deploy copies the new password. awaiting: Ankra has not seen the new Secret yet, and the rotation may still take effect; another rotation is refused meanwhile. lapsed: the rotation never takes effect.
awaiting, taken, lapsed, null