-
Notifications
You must be signed in to change notification settings - Fork 212
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Mask sensitive values logged through spans (#3290)
feat: Mask sensitive values logged through spans closes #3216 closes #2256 Signed-off-by: Kim Christensen <kimworking@gmail.com>
- Loading branch information
1 parent
58c6aee
commit a97711e
Showing
6 changed files
with
215 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
tests/integration/testdata/bundles/failing-bundle-with-sensitive-data/helpers.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
#!/usr/bin/env bash | ||
set -euo pipefail | ||
|
||
install() { | ||
echo Hello, $1 | ||
} | ||
|
||
open_door() { | ||
echo opening door using $1 | ||
} | ||
|
||
upgrade() { | ||
echo World 2.0 | ||
} | ||
|
||
uninstall() { | ||
echo Goodbye World | ||
} | ||
|
||
# Call the requested function and pass the arguments as-is | ||
"$@" |
50 changes: 50 additions & 0 deletions
50
tests/integration/testdata/bundles/failing-bundle-with-sensitive-data/porter.yaml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
schemaVersion: 1.0.0-alpha.1 | ||
name: mybuns | ||
version: 0.1.2 | ||
description: "A test bundle for sensitive data" | ||
registry: localhost:5000 | ||
|
||
parameters: | ||
- name: name | ||
description: "author name" | ||
type: string | ||
default: "porter" | ||
- name: password | ||
description: "The super secret data" | ||
type: string | ||
sensitive: true | ||
|
||
outputs: | ||
- name: mylogs | ||
applyTo: | ||
- install | ||
- upgrade | ||
- name: result | ||
applyTo: | ||
- install | ||
sensitive: true | ||
|
||
mixins: | ||
- exec | ||
|
||
install: | ||
- exec: | ||
description: "Failing step to test sensitive data logging" | ||
command: fail | ||
arguments: | ||
- open_door | ||
- "{{ bundle.parameters.password }}" | ||
|
||
upgrade: | ||
- exec: | ||
description: "upgrade" | ||
command: ./helpers.sh | ||
arguments: | ||
- upgrade | ||
|
||
uninstall: | ||
- exec: | ||
description: "uninstall" | ||
command: ./helpers.sh | ||
arguments: | ||
- uninstall |