-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
(v9) Security fixes #13301
(v9) Security fixes #13301
Conversation
This commit includes two fixes: 1. Enforce an application/json Content-Type server-side. 2. When checking the bearer token, verify that the user associated with the token matches the user associated with the cookie.
When data flow is disabled in TermManager (at the beginning or when TermManager.Off was called) we should ignore all input we receive (currently we buffer it)
"golang.org/x/sys/unix" | ||
) | ||
|
||
func TestAgentSocketPermissions(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This test can run as a root. The name needs to be changed: https://github.com/gravitational/teleport/blob/master/Makefile#L627-L638
require.True(t, isRoot()) | ||
}) | ||
|
||
nonRoot, err := user.LookupId("1000") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is system dependent. Not every OS has a user with ID 1000.
require.True(t, !isRoot()) | ||
|
||
err := unix.Unlink(agentServer.Path) | ||
require.Error(t, err) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably check what error is returned
Ported from a private release.