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

Bugfix/auth header log fix #3674

Merged
merged 2 commits into from
Nov 25, 2024
Merged

Bugfix/auth header log fix #3674

merged 2 commits into from
Nov 25, 2024

Conversation

stigus
Copy link
Contributor

@stigus stigus commented Nov 20, 2024

This pull request includes changes to the TestnavLogbackEncoder class in the reactive-core library to improve the redaction of sensitive information in log messages. The most important changes include the addition of a new pattern to identify bearer tokens and the refactoring of the formatMessage method to use the new patterns for redaction.

Improvements to sensitive information redaction:

@stigus stigus requested a review from a team as a code owner November 20, 2024 09:13
Copy link
Contributor

@krharum krharum left a comment

Choose a reason for hiding this comment

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

Supert! 😄

var replacement = match.substring(0, 6) + "xxxxx";
matcher.appendReplacement(result, replacement);
message = identNummer.matcher(message).replaceAll(match -> {
if (match.group().charAt(2) == '0' || match.group().charAt(2) == '1') {
Copy link
Contributor

Choose a reason for hiding this comment

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

Strengt tatt vil if (match.group().charAt(2) < '4') være bedre da det også fanger opp NPID som har +2 på måned i prod

@stigus stigus merged commit a96c532 into master Nov 25, 2024
300 checks passed
@stigus stigus deleted the bugfix/auth-header-log-fix branch November 25, 2024 10:06
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