add _lastModifiedTime field to secret snapshots#810
Open
EldarShalev wants to merge 4 commits into
Open
Conversation
Extract the most recent time from metadata.managedFields and include it as a synthetic _lastModifiedTime field on Secret objects sent to the backend. This enables detection of stale or unrotated secrets.
SgtCoDFish
reviewed
May 26, 2026
SgtCoDFish
reviewed
May 26, 2026
added 2 commits
May 26, 2026 19:23
…e' into feature/secret-last-modified-time
Member
|
Ash's feedback has been addressed, I think we are good to go. To test this manually, I went to https://tlskp-test.integration-cyberark.cloud/, logged in using mael.valais@cyberark.cloud.420375, then used these creds to do: I used mitmproxy to see what payload is being sent, and I was able to confirm that the new {
"agent_version": "development",
"cluster_id": "db43366f-d7db-4c27-b384-985db34aefa9",
"cluster_name": "mael.valais@cyberark.cloud.420375",
"k8s_version": "v1.35.0",
"openid_configuration": {
"id_token_signing_alg_values_supported": ["RS256"],
"issuer": "https://kubernetes.default.svc.cluster.local",
"jwks_uri": "https://172.18.0.2:6443/openid/v1/jwks",
"response_types_supported": ["id_token"],
"subject_types_supported": ["public"]
},
"jwks": {
"keys": [
{
"alg": "RS256",
"e": "AQAB",
"kid": "CHm2bo7FnsdchfAyB-2RV3LLlYDsab8AW8pZfxrmqI0",
"kty": "RSA",
"n": "n-xg_DuZuQtQDoseuyal00Q6Hoi_tZZ0NrfKL0oaaUP3hPtldZn5g2u9ak1L9j5sgxp34FhTs9b98B9NgHIuvrwiRiEkIaYhcJT8LnF3qMiM-FQgFuv2REtHXwY-fL8_HZBhHuLkYlg3zG1mPPUss0cBV3iK8y3M0GZ7o_WQTUHXo_NoR56qE_oGAwF4TZfTN17TN3CkjrVCOfOJQS6OGFL6nKa8g5qZgUszPcU4z0FrAiPqKRKuuFkFsypxidh_6--CpSDrjzmg0CIp5onf8UESqhel_3rb8P7RURoBODb6Cl4I1in4FEDJUezVDDz_X1I-bMy0GP5NgddPU22sVw",
"use": "sig"
}
]
},
"secrets": [
{
"_lastModifiedTime": "2026-05-28T13:24:36Z",
"apiVersion": "v1",
"kind": "Secret",
"metadata": {
"creationTimestamp": "2026-05-28T13:24:36Z",
"name": "agent-credentials",
"namespace": "ark",
"resourceVersion": "5833",
"uid": "0bb44bd2-4120-482f-b26c-19d71249b54e"
},
"type": "Opaque"
},
{
"_lastModifiedTime": "2026-05-28T13:24:26Z",
"apiVersion": "v1",
"kind": "Secret",
"metadata": {
"creationTimestamp": "2026-05-28T13:24:26Z",
"name": "agent-credentials",
"namespace": "default",
"resourceVersion": "5818",
"uid": "c0781cce-3a55-4e96-b0e7-c1df32e181d5"
},
"type": "Opaque"
}
],
# ... |
maelvls
approved these changes
May 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Extract the most recent time from metadata.managedFields and include it as a synthetic _lastModifiedTime field on Secret objects sent to the backend. This enables detection of stale or unrotated secrets.