Skip to content

Conversation

@iamayushm
Copy link
Contributor

@iamayushm iamayushm commented Dec 22, 2022

Description

Audit logs for resource deletion from devtron UI

tech doc : https://docs.google.com/document/d/1mo4mTwv2f8T5qnX26432sfYpsaSXw9vKfAtRUwtROt0/edit#

Fixes #2747

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Provide instructions so we can reproduce. Please also list any relevant details for your test configuration

  • By deleting all types of resource from devtron UI and checking history of deletion in database.

Checklist:

  • The title of the PR states what changed and the related issues number (used for the release note).
  • Does this PR requires documentation updates?
  • I've updated documentation as required by this PR.
  • I have performed a self-review of my own code.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have tested it for all user roles.
  • I have added all the required unit/api test cases.

Does this PR introduce a user-facing change?


@gitguardian
Copy link

gitguardian bot commented Dec 22, 2022

⚠️ GitGuardian has uncovered 2 secrets following the scan of your pull request.

Please consider investigating the findings and remediating the incidents. Failure to do so may lead to compromising the associated services or software components.

🔎 Detected hardcoded secrets in your pull request
GitGuardian id Secret Commit Filename
141558 Generic High Entropy Secret 003b1c8 scripts/devtron-reference-helm-charts/cronjob-chart_1-4-0/env-values.yaml View secret
2763127 Generic High Entropy Secret 003b1c8 scripts/devtron-reference-helm-charts/cronjob-chart_1-4-0/secrets-test-values.yaml View secret
🛠 Guidelines to remediate hardcoded secrets
  1. Understand the implications of revoking this secret by investigating where it is used in your code.
  2. Replace and store your secrets safely. Learn here the best practices.
  3. Revoke and rotate these secrets.
  4. If possible, rewrite git history. Rewriting git history is not a trivial act. You might completely break other contributing developers' workflow and you risk accidentally deleting legitimate data.

To avoid such incidents in the future consider


🦉 GitGuardian detects secrets in your source code to help developers and security teams secure the modern development process. You are seeing this because you or someone else with access to this repository has authorized GitGuardian to scan your pull request.

Our GitHub checks need improvements? Share your feedbacks!

@iamayushm iamayushm self-assigned this Dec 22, 2022

func (impl ArgoApplicationRestHandlerImpl) DeleteResource(w http.ResponseWriter, r *http.Request) {

userId, err := impl.userService.GetLoggedInUser(r)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handle error here

func (handler *K8sApplicationRestHandlerImpl) DeleteResource(w http.ResponseWriter, r *http.Request) {

userId, err := handler.userService.GetLoggedInUser(r)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

handle error here and return 401

@vikramdevtron vikramdevtron merged commit c0a9030 into main Jan 13, 2023
@vikramdevtron vikramdevtron deleted the audit_logs_for_k8s_resource branch January 13, 2023 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Audit log for object deletion from devtron UI

3 participants