| Commit-Queue | +1 |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
std::vector<std::string>& allowed_login_usernames();
const std::vector<std::string>& allowed_login_usernames() const;I don't think this belongs here. This feels like a policy related field rather than a behavior.
const std::vector<std::string>& allowed_login_usernames,I think this should just be 'required_username' or 'username' which, if empty means no policy is set (or you can use std::optional if you want instead of empty).
The gist is that if the 'MatchUsername' policy is set, it is reasonable to assume that this is an enterprise configuration and it is reasonable to expect that the usernames in the host config (and from the initial heartbeat) will match but potentially have different domains due to the Gaia dependency.
IMO it would be cleaner to provide a single username which is used for injecting or reconnecting to a Desktop process and there isn't a use case where the username will vary (unless it's empty and the host has no policy set).
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +1 |
I just rewrote this CL to hook into `OnUpdateHostOwner()`. PTAL!
std::vector<std::string>& allowed_login_usernames();
const std::vector<std::string>& allowed_login_usernames() const;I don't think this belongs here. This feels like a policy related field rather than a behavior.
Done
I think this should just be 'required_username' or 'username' which, if empty means no policy is set (or you can use std::optional if you want instead of empty).
The gist is that if the 'MatchUsername' policy is set, it is reasonable to assume that this is an enterprise configuration and it is reasonable to expect that the usernames in the host config (and from the initial heartbeat) will match but potentially have different domains due to the Gaia dependency.
IMO it would be cleaner to provide a single username which is used for injecting or reconnecting to a Desktop process and there isn't a use case where the username will vary (unless it's empty and the host has no policy set).
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
looks way better to me but I have one question about however username is provide.
required_username_ = username;You only need to set this value once per network process lifetime so I think it would be good to pass it in when a desktop session is created however if that isn't feasible, then maybe check it here to ensure it doesn't change.
// it is ready, so we just return true here.Did you want to return true here to match the comment? :)
SetRequiredUsername(string username);Could this be a param in CreateDesktopSession? I think the gist is that the username will not change during the lifetime of the network process so it should be known at start-up and the value could be provided when the desktop session is created.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
You only need to set this value once per network process lifetime so I think it would be good to pass it in when a desktop session is created however if that isn't feasible, then maybe check it here to ensure it doesn't change.
Done
Did you want to return true here to match the comment? :)
Oops... Done!
Could this be a param in CreateDesktopSession? I think the gist is that the username will not change during the lifetime of the network process so it should be known at start-up and the value could be provided when the desktop session is created.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
From googleclient/chrome/chromium_gwsq/ipc/config.gwsq:
IPC: aj...@chromium.org
📎 It looks like you’re making a possibly security-sensitive change! 📎 IPC security review isn’t a rubberstamp, so your friendly security reviewer will need a fair amount of context to review your CL effectively. Please review your CL description and code comments to make sure they provide context for someone unfamiliar with your project/area. Pay special attention to where data comes from and which processes it flows between (and their privilege levels). Feel free to point your security reviewer at design docs, bugs, or other links if you can’t reasonably make a self-contained CL description. (Also see https://cbea.ms/git-commit/).
IPC reviewer(s): aj...@chromium.org
Reviewer source(s):
aj...@chromium.org is from context(googleclient/chrome/chromium_gwsq/ipc/config.gwsq)
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Code-Review | +1 |
lgtm mojom
// If non-empty, the login user of the desktop session must match `username`.you could use an optional here `string?` but up to you
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
| Commit-Queue | +2 |
Thanks!
// If non-empty, the login user of the desktop session must match `username`.you could use an optional here `string?` but up to you
Yeah, I considered this, but we use an empty string for this value everywhere else, so it seems more consistent to just use that.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |
[crd host][linux] Match login usernames in daemon process
Similar to the PAM check, we cannot enforce the username match policy on
the network process since the username would always be `_crd_network`.
This CL fixes this by having the network process pass the required
username to the daemon process, so that the daemon process can enforce
the policy. This may also allow us to enforce the username match policy
on Windows at some point.
The login username will be checked whenever the host owner username is
known, changed, or a new desktop session is created. It will not be
checked for greeter sessions, since the greeter session will be run as a
system user (e.g. `Debian-gdm`) that is generally not the host owner.
| Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. |