You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Application access uses 5-minute chunks to store the session events. The audit log writer is attached to the session chunk and is closed after each 5 minute interval when the session chunk "expires":
If the session expires and the audit writer is closed while the application request is being processed, app server transport will fail to emit the audit event here:
resulting in the error being returned and the client receiving 500 response, even though the request actually made it to the target application.
This can be reproduced very easily locally by reducing the session TTL to something like 5 seconds (in the code) and with a simple "header dumper" application:
This has been fixed in master by #13145, and has also been backported to v9 by #13469 and made it to the 9.3.6 release.
The changes did not backport cleanly to v8/v7, as the app proxy code seems to have undergone some changes since those branched-off. If this bug is deemed important enough, we could spend some time to manually backport to older versions.
Application access uses 5-minute chunks to store the session events. The audit log writer is attached to the session chunk and is closed after each 5 minute interval when the session chunk "expires":
https://github.com/gravitational/teleport/blob/v9.2.4/lib/srv/app/session.go#L134
If the session expires and the audit writer is closed while the application request is being processed, app server transport will fail to emit the audit event here:
https://github.com/gravitational/teleport/blob/v9.2.4/lib/srv/app/transport.go#L157
resulting in the error being returned and the client receiving 500 response, even though the request actually made it to the target application.
This can be reproduced very easily locally by reducing the session TTL to something like 5 seconds (in the code) and with a simple "header dumper" application:
The solution that comes to mind is that the session writer should not close while there are requests in flight.
This issue is the likely cause of https://github.com/gravitational/cloud/issues/1273.
The text was updated successfully, but these errors were encountered: