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

Replace ticket id with transfer id in logs #26

Closed
nirs opened this issue Jan 21, 2022 · 0 comments · Fixed by #27
Closed

Replace ticket id with transfer id in logs #26

nirs opened this issue Jan 21, 2022 · 0 comments · Fixed by #27

Comments

@nirs
Copy link
Member

nirs commented Jan 21, 2022

Following bug https://bugzilla.redhat.com/2043283, imageio log the ticket id
for tracking requests. This is wrong since the ticket id is sensitive information
and the way we track image transfers in all other components is using the transfer
id.

Here example logs using the ticket id:

# grep e285c666-fde0-431b-a993-36315d651e42 /var/log/ovirt-imageio/daemon.log 
2022-01-21 00:53:06,898 INFO    (Thread-9) [tickets] [local] ADD ticket={'dirty': False, 'ops': ['read'], 'size': 6442450944, 'sparse': False, 'inactivity_timeout': 60, 'transfer_id': 'dd8e8c9e-4e74-4b57-b61a-759b5204672b', 'uuid': 'e285c666-fde0-431b-a993-36315d651e42', 'timeout': 300, 'url': 'nbd:unix:/run/vdsm/nbd/e285c666-fde0-431b-a993-36315d651e42.sock'}
2022-01-21 00:53:07,988 INFO    (Thread-11) [images] [::ffff:192.168.122.1] OPTIONS ticket=e285c666-fde0-431b-a993-36315d651e42
2022-01-21 00:53:07,989 INFO    (Thread-11) [extents] [::ffff:192.168.122.1] EXTENTS ticket=e285c666-fde0-431b-a993-36315d651e42 context=zero
2022-01-21 00:53:13,055 INFO    (Thread-17) [tickets] [local] REMOVE ticket=e285c666-fde0-431b-a993-36315d651e42

(Logs fixed by https://bugzilla.redhat.com/2043283 were removed)

I'm not sure if we should remove the ticket id from the ADD log, this need
more thinking. But for the rest of the logs, there is really no need to
show ticket=, and we can simplify replace it with transfer=.

nirs added a commit to nirs/ovirt-imageio that referenced this issue Jan 21, 2022
Use the public transfer id instead of the sensitive ticket id used for
authentication. This makes it easier to follow transfer by grepping the
transfer id.

The ticket id is till logged when adding a ticket, we may want to remove
it from the log, or log only a part of the ticket.

Fixes oVirt#26

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
nirs added a commit to nirs/ovirt-imageio that referenced this issue Jan 21, 2022
Use the public transfer id instead of the sensitive ticket id used for
authentication. This makes it easier to follow transfer by grepping the
transfer id.

The ticket id is till logged when adding a ticket, we may want to remove
it from the log, or log only a part of the ticket.

Fixes oVirt#26

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
vjuranek pushed a commit that referenced this issue Jan 24, 2022
Use the public transfer id instead of the sensitive ticket id used for
authentication. This makes it easier to follow transfer by grepping the
transfer id.

The ticket id is till logged when adding a ticket, we may want to remove
it from the log, or log only a part of the ticket.

Fixes #26

Signed-off-by: Nir Soffer <nsoffer@redhat.com>
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 a pull request may close this issue.

1 participant