Skip to content

Use audited fork that allows reading encrypted attrs#1357

Merged
tvararu merged 1 commit intomainfrom
audited-encryption
May 29, 2024
Merged

Use audited fork that allows reading encrypted attrs#1357
tvararu merged 1 commit intomainfrom
audited-encryption

Conversation

@tvararu
Copy link
Member

@tvararu tvararu commented May 29, 2024

Audited automatically replaces entries in the audited_changes field on audits with [FILTERED] for attributes that are encrypted. This is designed to prevent leaking of sensitive information in audited_changes which is an unencrypted field.

The downside to this is that the audited_changes field now provides less information about what the audit actually changed.

To solve this, collectiveidea/audited#694 adds additional configuration attributes:

  • Audited.filter_encrypted_attributes = false disables the automatic replacement with [FILTERED]
  • Audited.encrypt_audited_changes = true encrypts the actual entire audited_changes field, ensuring that sensitive information isn't leaked

See:

Before - Fields filtered out and unreadable

image

Column unencrypted in database

Screenshot 2024-05-29 at 11 13 01

After - Fields readable

Screenshot 2024-05-29 at 11 07 20

Column encrypted

Screenshot 2024-05-29 at 15 39 50

@tvararu tvararu temporarily deployed to mavis-pr-1357 May 29, 2024 09:19 Inactive
@tvararu tvararu force-pushed the audited-encryption branch from 3f09c7e to f97eb27 Compare May 29, 2024 12:22
@tvararu tvararu marked this pull request as ready for review May 29, 2024 12:22
@tvararu tvararu requested a review from a team as a code owner May 29, 2024 12:22
@tvararu tvararu temporarily deployed to mavis-pr-1357 May 29, 2024 12:22 Inactive
Audited automatically replaces entries in the `audited_changes` field on
audits with `[FILTERED]` for attributes that are encrypted. This is
designed to prevent leaking of sensitive information in
`audited_changes` which is an unencrypted field.

The downside to this is that the `audited_changes` field now provides
less information about what the audit actually changed.

To solve this, collectiveidea/audited#694 adds
additional configuration attributes:

- `Audited.filter_encrypted_attributes = false` disables the automatic
  replacement with `[FILTERED]`
- `Audited.encrypt_audited_changes = true` encrypts the actual entire
  `audited_changes` field, ensuring that sensitive information isn't
  leaked

See:

- collectiveidea/audited#690
- collectiveidea/audited#694
@tvararu tvararu force-pushed the audited-encryption branch from f97eb27 to 5a8bd35 Compare May 29, 2024 13:39
@tvararu tvararu temporarily deployed to mavis-pr-1357 May 29, 2024 13:39 Inactive
@sonarqubecloud
Copy link

Quality Gate Passed Quality Gate passed

Issues
0 New issues
0 Accepted issues

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

See analysis details on SonarCloud

@tvararu tvararu merged commit 22457fa into main May 29, 2024
@tvararu tvararu deleted the audited-encryption branch May 29, 2024 14:15
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.

2 participants