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

secrets: handle empty secrets #2620

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

AlexanderYastrebov
Copy link
Member

Logs error on add and treat empty file as removed on update.

In particular it errors instead of using empty value when secret path comes from process substitution

$ bin/routesrv -kubernetes-token-file=<(echo foobar)
ERRO[0000] Failed to read file /dev/fd/63: empty file
FATA[0000] failed to get secret /dev/fd/63

which is a symlink to a named pipe

$ ls -l <(echo foobar)
lr-x------ 1 jdoe jdoe 64 Sep 25 13:36 /dev/fd/63 -> 'pipe:[7925874]'

Logs error on add and treat empty file as removed on update.

In particular it errors instead of using empty value
when secret path comes from process substitution
```
$ bin/routesrv -kubernetes-token-file=<(echo foobar)
ERRO[0000] Failed to read file /dev/fd/63: empty file
FATA[0000] failed to get secret /dev/fd/63
```

which is a symlink to a named pipe
```
$ ls -l <(echo foobar)
lr-x------ 1 jdoe jdoe 64 Sep 25 13:36 /dev/fd/63 -> 'pipe:[7925874]'
```

Signed-off-by: Alexander Yastrebov <[email protected]>
@RomanZavodskikh
Copy link
Member

👍

@AlexanderYastrebov
Copy link
Member Author

pipeline flaked due to #2621

@AlexanderYastrebov AlexanderYastrebov marked this pull request as draft September 25, 2023 12:02
@szuecs
Copy link
Member

szuecs commented Sep 25, 2023

👍

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.

3 participants