Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Audit log having updatedBy field is null when using kubectl with the kubeconfig of target clusters #6195

Open
2 tasks done
ajaydevtron opened this issue Dec 18, 2024 · 0 comments
Assignees
Labels
bug Something isn't working needs-triage Issue is not approved or ready-to-work on

Comments

@ajaydevtron
Copy link
Contributor

ajaydevtron commented Dec 18, 2024

📜 Description

We are trying to retrieve the kubeconfig of the target cluster from the Devtron UI and use it locally with kubectl to access Kubernetes resources. Additionally, we want to log every operation performed using kubectl.

Currently, the audit log contains the following data:


"log":"2024/08/14 07:13:00 AUDIT_LOG: requestMethod: DELETE, urlPath: /orchestrator/k8s/proxy/cluster/dev-mumbai/api/v1/namespaces/default/pods/nginx, queryParams: , updatedBy: , updatedOn: 2024-08-14 07:13:00.571039569 +0000 UTC m=+473543.194180702, apiResponseCode: 200, requestPayload: {\"propagationPolicy\":\"Background\"}"

Here, the updatedBy field is null. To identify who performed the operation, we need to correlate this with the normal orchestrator logs, which provide information like:

{"level":"info","ts":1723627156.3477376,"caller":"application/k8sApplicationRestHandler.go:1425","msg":"K8sProxyRequest","Method:":"DELETE","Path:":"/api/v1/namespaces/default/pods/analytics-exporter-7bd87786bb-4wpb9","Email:":"[email protected]"}

Our goal is to merge the relevant information from these two logs, updating the updatedBy field in the audit log so that it provides a single, comprehensive source for audit purposes.

👟 Reproduction steps

NA

👍 Expected behavior

NA

👎 Actual Behavior

NA

☸ Kubernetes version

1.30

Cloud provider

AWS

🌍 Browser

Chrome

🧱 Your Environment

No response

✅ Proposed Solution

No response

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find any similar issue

🏢 Have you read the Code of Conduct?

@ajaydevtron ajaydevtron added the bug Something isn't working label Dec 18, 2024
@satyampsoni satyampsoni added the needs-triage Issue is not approved or ready-to-work on label Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working needs-triage Issue is not approved or ready-to-work on
Projects
None yet
Development

No branches or pull requests

4 participants