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

Create custom Properties and Map configs classes with toString method that hides password properties #1196

Merged
merged 4 commits into from Aug 25, 2023

Conversation

trnguyencflt
Copy link
Member

@trnguyencflt trnguyencflt commented Aug 15, 2023

This PR add two classes (inner class of KafkaRestConfig) that can be a direct replacement for the two classes that are often used in creating configuration

  • Properties
  • Map<String, Object>

The two classes have overriden toString method that can hide sensitive configs. toString is the function that will get called in logging on the class.

This PR also uses the two new classes in all functions in KafkaRestConfig that return configurations so that they can be safely logged later.

Reference JIRA: https://confluentinc.atlassian.net/browse/KREST-11068

@trnguyencflt trnguyencflt force-pushed the KREST-11068-create-custom-class-for-logging branch 2 times, most recently from cb0cc8f to 02161eb Compare August 16, 2023 12:01
@trnguyencflt trnguyencflt changed the title Create custom Properties and Map<String, Object> classes with toStrin… Create custom Properties and Map configs classes with toString method that hides password properties Aug 16, 2023
…chema registry) from KafkaRestConfig and add unittests.
@trnguyencflt trnguyencflt force-pushed the KREST-11068-create-custom-class-for-logging branch from 02161eb to 9ec4bf7 Compare August 16, 2023 13:59
@trnguyencflt trnguyencflt marked this pull request as ready for review August 16, 2023 14:13
@trnguyencflt trnguyencflt requested a review from a team as a code owner August 16, 2023 14:13
@trnguyencflt trnguyencflt merged commit 39d60cf into master Aug 25, 2023
4 checks passed
@trnguyencflt trnguyencflt deleted the KREST-11068-create-custom-class-for-logging branch August 25, 2023 13:03
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.

None yet

2 participants