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

Hl 1092 audit logs #2717

Merged
merged 6 commits into from
Jan 15, 2024
Merged

Hl 1092 audit logs #2717

merged 6 commits into from
Jan 15, 2024

Conversation

rikuke
Copy link
Collaborator

@rikuke rikuke commented Jan 10, 2024

Description ✨

CRUD actions for Employee, Attachment and DeMinimisAid models were not logged in the audit log on the applicants side when application is created and updated. Audit logging for Employee is added so that first_name, last_name and social_security fields are left out resulting in a log entry such as following:
{ "audit_event": { "actor": { "role": "USER", "user_id": "97641437-3300-41bd-abb4-c50cbf130035", "provider": "", "ip_address": "" }, "origin": "helsinki-benefit-api", "status": "SUCCESS", "target": { "id": "a4ec879f-bb0f-4774-97ee-ce568b6a1cf6", "type": "Employee", "changes": [ "collective_bargaining_agreement changed from to TES", "other_expenses changed from None to 200.00", "job_title changed from to testo", "working_hours changed from None to 20.00", "monthly_pay changed from None to 2500.00", "is_living_in_helsinki changed from False to True", "vacation_money changed from None to 100.00" ] }, "date_time": "2024-01-11T08:49:17.883Z", "operation": "UPDATE", "date_time_epoch": 1704962957883, "additional_information": "" } }

Issues 🐛

Testing ⚗️

Create and update an application, observe from the auditlog_auditlog_entry table that a corresponding row is insterted when:

  • Updating an employee
  • Adding DeMinimis entries
  • Adding and deleting an attachment

Screenshots 📸

Additional notes 🗒️

@terovirtanen
Copy link
Contributor

API branch is deployed to platta: https://helsinkilisa-pr2717.api.dev.hel.ninja/healthz 🚀🚀🚀

@terovirtanen
Copy link
Contributor

APPLICANT branch is deployed to platta: https://helsinkilisa-ui-pr2717.dev.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

TestCafe result is success for https://helsinkilisa-ui-pr2717.dev.hel.ninja 😆🎉🎉🎉

@terovirtanen
Copy link
Contributor

HANDLER branch is deployed to platta: https://helsinkilisa-ui-handler-pr2717.dev.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

TestCafe result is success for https://helsinkilisa-ui-handler-pr2717.dev.hel.ninja 😆🎉🎉🎉

@rikuke rikuke force-pushed the HL-1092-audit-logs branch from 153a9da to 074a59e Compare January 11, 2024 12:06
@rikuke rikuke marked this pull request as ready for review January 11, 2024 12:12
@rikuke rikuke requested a review from sirtawast January 11, 2024 12:12
@terovirtanen
Copy link
Contributor

API branch is deployed to platta: https://tet-pr2717.api.dev.hel.ninja/healthz 🚀🚀🚀

@terovirtanen
Copy link
Contributor

API branch is deployed to platta: https://helsinkilisa-pr2717.api.dev.hel.ninja/healthz 🚀🚀🚀

@terovirtanen
Copy link
Contributor

API branch is deployed to platta: https://kesaseteli-pr2717.api.dev.hel.ninja/healthz 🚀🚀🚀

Copy link

sonarcloud bot commented Jan 11, 2024

Quality Gate Passed Quality Gate passed for 'yjdh'

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
No data about Duplication

See analysis details on SonarCloud

Copy link

sonarcloud bot commented Jan 11, 2024

Quality Gate Passed Quality Gate passed for 'yjdh'

The SonarCloud Quality Gate passed, but some issues were introduced.

6 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

sonarcloud bot commented Jan 11, 2024

Quality Gate Passed Quality Gate passed for 'yjdh'

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

sonarcloud bot commented Jan 11, 2024

Quality Gate Passed Quality Gate passed for 'yjdh'

The SonarCloud Quality Gate passed, but some issues were introduced.

14 New issues
0 Security Hotspots
No data about Coverage
1.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

sonarcloud bot commented Jan 11, 2024

Quality Gate Passed Quality Gate passed for 'yjdh'

The SonarCloud Quality Gate passed, but some issues were introduced.

3 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

sonarcloud bot commented Jan 11, 2024

Quality Gate Passed Quality Gate passed for 'yjdh'

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

sonarcloud bot commented Jan 11, 2024

Quality Gate Passed Quality Gate passed for 'yjdh'

The SonarCloud Quality Gate passed, but some issues were introduced.

1 New issue
0 Security Hotspots
80.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

sonarcloud bot commented Jan 11, 2024

Quality Gate Passed Quality Gate passed for 'yjdh-tet-admin'

The SonarCloud Quality Gate passed, but some issues were introduced.

100 New issues
0 Security Hotspots
53.7% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

sonarcloud bot commented Jan 11, 2024

Quality Gate Passed Quality Gate passed

The SonarCloud Quality Gate passed, but some issues were introduced.

40 New issues
0 Security Hotspots
71.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

sonarcloud bot commented Jan 11, 2024

Quality Gate Passed Quality Gate passed for 'yjdh-tet-youth'

The SonarCloud Quality Gate passed, but some issues were introduced.

72 New issues
0 Security Hotspots
29.3% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

Copy link

sonarcloud bot commented Jan 11, 2024

Quality Gate Passed Quality Gate passed for 'yjdh-tet-shared'

The SonarCloud Quality Gate passed, but some issues were introduced.

43 New issues
0 Security Hotspots
42.8% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@terovirtanen
Copy link
Contributor

API branch is deployed to platta: https://kesaseteli-pr2717.api.dev.hel.ninja/healthz 🚀🚀🚀

Copy link

sonarcloud bot commented Jan 11, 2024

Quality Gate Passed Quality Gate passed for 'yjdh'

The SonarCloud Quality Gate passed, but some issues were introduced.

8 New issues
0 Security Hotspots
85.5% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@terovirtanen
Copy link
Contributor

API branch is deployed to platta: https://tet-pr2717.api.dev.hel.ninja/healthz 🚀🚀🚀

@terovirtanen
Copy link
Contributor

API branch is deployed to platta: https://helsinkilisa-pr2717.api.dev.hel.ninja/healthz 🚀🚀🚀

@terovirtanen
Copy link
Contributor

EMPLOYER branch is deployed to platta: https://kesaseteli-employer-pr2717.dev.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

ADMIN branch is deployed to platta: https://tet-admin-ui-pr2717.dev.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

TestCafe result is success for https://tet-admin-ui-pr2717.dev.hel.ninja 😆🎉🎉🎉

@terovirtanen
Copy link
Contributor

TestCafe employer result is failed for https://kesaseteli-employer-pr2717.dev.hel.ninja 😿💢💥💥

@terovirtanen
Copy link
Contributor

APPLICANT branch is deployed to platta: https://helsinkilisa-ui-pr2717.dev.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

TestCafe result is success for https://helsinkilisa-ui-pr2717.dev.hel.ninja 😆🎉🎉🎉

@terovirtanen
Copy link
Contributor

YOUTH branch is deployed to platta: https://tet-youth-ui-pr2717.dev.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

HANDLER branch is deployed to platta: https://helsinkilisa-ui-handler-pr2717.dev.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

TestCafe result is success for https://tet-youth-ui-pr2717.dev.hel.ninja 😆🎉🎉🎉

@terovirtanen
Copy link
Contributor

TestCafe result is success for https://helsinkilisa-ui-handler-pr2717.dev.hel.ninja 😆🎉🎉🎉

@terovirtanen
Copy link
Contributor

TestCafe result is success for https://kesaseteli-employer-pr2717.dev.hel.ninja 😆🎉🎉🎉

Copy link

sonarcloud bot commented Jan 11, 2024

Quality Gate Passed Quality Gate passed for 'yjdh'

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code

See analysis details on SonarCloud

@terovirtanen
Copy link
Contributor

HANDLER branch is deployed to platta: https://kesaseteli-handler-pr2717.dev.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

TestCafe result is success for https://kesaseteli-handler-pr2717.dev.hel.ninja 😆🎉🎉🎉

@terovirtanen
Copy link
Contributor

YOUTH branch is deployed to platta: https://kesaseteli-youth-pr2717.dev.hel.ninja 🚀🚀🚀

@terovirtanen
Copy link
Contributor

TestCafe result is success for https://kesaseteli-youth-pr2717.dev.hel.ninja 😆🎉🎉🎉

Copy link
Collaborator

@sirtawast sirtawast left a comment

Choose a reason for hiding this comment

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

Looks good!

@rikuke rikuke merged commit 451364b into main Jan 15, 2024
197 checks passed
@rikuke rikuke deleted the HL-1092-audit-logs branch January 15, 2024 08:08
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.

3 participants