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

fix: Credentials obfuscation #154

Merged
merged 6 commits into from
Dec 14, 2024
Merged

fix: Credentials obfuscation #154

merged 6 commits into from
Dec 14, 2024

Conversation

alexluong
Copy link
Collaborator

@alexluong alexluong commented Dec 13, 2024

implements #148

  • Obfuscate credentials
  • Support credentials update
    • Remove webhook obfuscation for now for secret rotation logic

Approach

In the credentials schema, we added a sensitive field. Then, the registry (provider) adds a method ObfuscateDestination which reads the metadata & obfuscate the sensitive values.

For webhook provider, it overrides the default obfuscate function to provide more fine-tuned obfuscation logic.

Result:

RabbitMQ

"credentials": {
	"password": "****",
	"username": "guest"
}

AWS

"credentials": {
	"key": "****",
	"secret": "****",
	"session": "****"
}

Webhook

"credentials": {
	"secrets": "[{\"key\":\"****\",\"created_at\":\"2024-01-01T00:00:00Z\"}]"
}

@alexbouchardd
Copy link
Contributor

alexbouchardd commented Dec 14, 2024

Can we keep the first 4 value by default and maintain the length of the value (replace characters with "*"). If the secret is too short =< 8 characters then it should be fully obfuscated

@alexluong alexluong merged commit 47403a4 into main Dec 14, 2024
@alexluong alexluong deleted the obfuscate branch December 14, 2024 08: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.

2 participants