teleport icon indicating copy to clipboard operation
teleport copied to clipboard

`tsh app ...` does not emit `app.session.start`

Open programmerq opened this issue 1 year ago • 1 comments

Expected behavior:

When running tsh app login, tsh proxy app, or issuing the first request with the app client cert, it seems like an event of type app.session.start should be emitted.

All that really matters is that an app.session.start event should appear before the first app.session.chunk is emitted. I have the opinion that app.session.start should be emitted at the same time that the teleport/apps/sessions/aaabbbccc key is written to the backend. This happens during tsh app login because the generated cert includes the session name as part of the cert.

Current behavior:

No app.session.start event is emitted when using tsh app login or tsh proxy app. Only app.session.chunk events are populated for tsh app ... initiated app sessions.

I believe the web UI specific app session handling emits the app.session.start event. tsh app login uses a separate code path.

Bug details:

  • Teleport version: 14.x (This was observed on many 14.x versions. I did not test older versions)
  • Recreation steps: run tsh app login. Attempt to access the app. No app.session.start event is emitted. No INFO [AUDIT] log line appears.
  • Debug logs: N/A

edit: clarified my implementation opinion vs the actual ask

programmerq avatar Jan 22 '24 21:01 programmerq