remoting: Introduce enable_security_key to DesktopEnvironmentOptions [chromium/src : main]

0 views
Skip to first unread message

Yuwei Huang (Gerrit)

unread,
Jun 24, 2026, 12:26:08 AM (5 days ago) Jun 24
to Lambros Lambrou, Joe Downing, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org, ipc-securi...@chromium.org
Attention needed from Lambros Lambrou

Yuwei Huang added 1 comment

Patchset-level comments
File-level comment, Patchset 3 (Latest):
Yuwei Huang . resolved

PTAL thanks!

Open in Gerrit

Related details

Attention is currently required from:
  • Lambros Lambrou
Submit Requirements:
  • requirement satisfiedCode-Coverage
  • requirement is not satisfiedCode-Owners
  • requirement is not satisfiedCode-Review
  • requirement is not satisfiedReview-Enforcement
Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
Gerrit-MessageType: comment
Gerrit-Project: chromium/src
Gerrit-Branch: main
Gerrit-Change-Id: I5f1c910cff33382e8c250351df8f10c2852d6ac0
Gerrit-Change-Number: 7988580
Gerrit-PatchSet: 3
Gerrit-Owner: Yuwei Huang <yuw...@chromium.org>
Gerrit-Reviewer: Lambros Lambrou <lambros...@chromium.org>
Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
Gerrit-CC: Joe Downing <joe...@chromium.org>
Gerrit-Attention: Lambros Lambrou <lambros...@chromium.org>
Gerrit-Comment-Date: Wed, 24 Jun 2026 04:25:47 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
satisfied_requirement
unsatisfied_requirement
open
diffy

Lambros Lambrou (Gerrit)

unread,
Jun 24, 2026, 1:20:18 PM (4 days ago) Jun 24
to Yuwei Huang, Joe Downing, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org, ipc-securi...@chromium.org
Attention needed from Yuwei Huang

Lambros Lambrou voted and added 1 comment

Votes added by Lambros Lambrou

Code-Review+1

1 comment

File remoting/host/client_session.cc
Line 1423, Patchset 5 (Latest): if (!extension_session || !allow_gnubby) {
Lambros Lambrou . unresolved

Could you split this into separate checks with different log messages?

Open in Gerrit

Related details

Attention is currently required from:
  • Yuwei Huang
Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I5f1c910cff33382e8c250351df8f10c2852d6ac0
    Gerrit-Change-Number: 7988580
    Gerrit-PatchSet: 5
    Gerrit-Owner: Yuwei Huang <yuw...@chromium.org>
    Gerrit-Reviewer: Lambros Lambrou <lambros...@chromium.org>
    Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
    Gerrit-CC: Joe Downing <joe...@chromium.org>
    Gerrit-Attention: Yuwei Huang <yuw...@chromium.org>
    Gerrit-Comment-Date: Wed, 24 Jun 2026 17:20:00 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Yuwei Huang (Gerrit)

    unread,
    Jun 24, 2026, 2:36:13 PM (4 days ago) Jun 24
    to Chromium IPC Reviews, Lambros Lambrou, Joe Downing, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org, ipc-securi...@chromium.org
    Attention needed from Chromium IPC Reviews

    Yuwei Huang voted and added 1 comment

    Votes added by Yuwei Huang

    Auto-Submit+1
    Commit-Queue+1

    1 comment

    Patchset-level comments
    File-level comment, Patchset 5 (Latest):
    Yuwei Huang . resolved

    Thanks! adding IPC reviewer..

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Chromium IPC Reviews
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I5f1c910cff33382e8c250351df8f10c2852d6ac0
    Gerrit-Change-Number: 7988580
    Gerrit-PatchSet: 5
    Gerrit-Owner: Yuwei Huang <yuw...@chromium.org>
    Gerrit-Reviewer: Chromium IPC Reviews <chrome-ip...@google.com>
    Gerrit-Reviewer: Lambros Lambrou <lambros...@chromium.org>
    Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
    Gerrit-CC: Joe Downing <joe...@chromium.org>
    Gerrit-Attention: Chromium IPC Reviews <chrome-ip...@google.com>
    Gerrit-Comment-Date: Wed, 24 Jun 2026 18:35:51 +0000
    Gerrit-HasComments: Yes
    Gerrit-Has-Labels: Yes
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    gwsq (Gerrit)

    unread,
    Jun 24, 2026, 2:40:26 PM (4 days ago) Jun 24
    to Yuwei Huang, Chromium IPC Reviews, Daniel Cheng, Lambros Lambrou, Joe Downing, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org, ipc-securi...@chromium.org
    Attention needed from Daniel Cheng

    Message from gwsq

    From googleclient/chrome/chromium_gwsq/ipc/config.gwsq:
    IPC: dch...@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): dch...@chromium.org


    Reviewer source(s):
    dch...@chromium.org is from context(googleclient/chrome/chromium_gwsq/ipc/config.gwsq)

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Daniel Cheng
    Submit Requirements:
    • requirement satisfiedCode-Coverage
    • requirement is not satisfiedCode-Owners
    • requirement satisfiedCode-Review
    • requirement is not satisfiedNo-Unresolved-Comments
    • requirement satisfiedReview-Enforcement
    Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
    Gerrit-MessageType: comment
    Gerrit-Project: chromium/src
    Gerrit-Branch: main
    Gerrit-Change-Id: I5f1c910cff33382e8c250351df8f10c2852d6ac0
    Gerrit-Change-Number: 7988580
    Gerrit-PatchSet: 5
    Gerrit-Owner: Yuwei Huang <yuw...@chromium.org>
    Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
    Gerrit-Reviewer: Lambros Lambrou <lambros...@chromium.org>
    Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
    Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
    Gerrit-CC: gwsq
    Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
    Gerrit-Comment-Date: Wed, 24 Jun 2026 18:39:50 +0000
    Gerrit-HasComments: No
    Gerrit-Has-Labels: No
    satisfied_requirement
    unsatisfied_requirement
    open
    diffy

    Yuwei Huang (Gerrit)

    unread,
    Jun 24, 2026, 2:41:56 PM (4 days ago) Jun 24
    to Chromium IPC Reviews, Daniel Cheng, Lambros Lambrou, Joe Downing, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org, ipc-securi...@chromium.org
    Attention needed from Daniel Cheng

    Yuwei Huang voted and added 1 comment

    Votes added by Yuwei Huang

    Auto-Submit+1
    Commit-Queue+1

    1 comment

    File remoting/host/client_session.cc
    Line 1423, Patchset 5: if (!extension_session || !allow_gnubby) {
    Lambros Lambrou . resolved

    Could you split this into separate checks with different log messages?

    Yuwei Huang

    Done

    Open in Gerrit

    Related details

    Attention is currently required from:
    • Daniel Cheng
    Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement is not satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I5f1c910cff33382e8c250351df8f10c2852d6ac0
      Gerrit-Change-Number: 7988580
      Gerrit-PatchSet: 6
      Gerrit-Owner: Yuwei Huang <yuw...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: Lambros Lambrou <lambros...@chromium.org>
      Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
      Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
      Gerrit-CC: Joe Downing <joe...@chromium.org>
      Gerrit-CC: gwsq
      Gerrit-Attention: Daniel Cheng <dch...@chromium.org>
      Gerrit-Comment-Date: Wed, 24 Jun 2026 18:41:42 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      Comment-In-Reply-To: Lambros Lambrou <lambros...@chromium.org>
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Daniel Cheng (Gerrit)

      unread,
      Jun 24, 2026, 7:38:53 PM (4 days ago) Jun 24
      to Yuwei Huang, Daniel Cheng, Chromium IPC Reviews, Lambros Lambrou, Joe Downing, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org, ipc-securi...@chromium.org
      Attention needed from Yuwei Huang

      Daniel Cheng voted and added 3 comments

      Votes added by Daniel Cheng

      Code-Review+1

      3 comments

      Patchset-level comments
      File-level comment, Patchset 6 (Latest):
      Daniel Cheng . resolved

      LGTM though it seems to me like there's some room to simplify the SequenceBound plumbing (but that's out of scope here)

      File remoting/host/desktop_session_agent.cc
      Line 284, Patchset 6 (Latest): security_key_auth_handler_
      .AsyncCall(&SecurityKeyAuthHandler::SetSendMessageCallback)
      .WithArgs(base::BindPostTaskToCurrentDefault(
      base::BindRepeating(&DesktopSessionAgent::OnSecurityKeyMessage,
      weak_factory_.GetWeakPtr())));
      Daniel Cheng . unresolved

      I know this is pre-existing but it seems like this is probably better off as an additional constructor param rather than requiring two PostTasks to set up the object.

      Line 291, Patchset 6 (Latest): &SecurityKeyAuthHandler::CreateSecurityKeyConnection);
      Daniel Cheng . unresolved

      (And this could be combined as well)

      Open in Gerrit

      Related details

      Attention is currently required from:
      • Yuwei Huang
      Submit Requirements:
      • requirement satisfiedCode-Coverage
      • requirement satisfiedCode-Owners
      • requirement satisfiedCode-Review
      • requirement is not satisfiedNo-Unresolved-Comments
      • requirement satisfiedReview-Enforcement
      Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
      Gerrit-MessageType: comment
      Gerrit-Project: chromium/src
      Gerrit-Branch: main
      Gerrit-Change-Id: I5f1c910cff33382e8c250351df8f10c2852d6ac0
      Gerrit-Change-Number: 7988580
      Gerrit-PatchSet: 6
      Gerrit-Owner: Yuwei Huang <yuw...@chromium.org>
      Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
      Gerrit-Reviewer: Lambros Lambrou <lambros...@chromium.org>
      Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
      Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
      Gerrit-CC: Joe Downing <joe...@chromium.org>
      Gerrit-CC: gwsq
      Gerrit-Attention: Yuwei Huang <yuw...@chromium.org>
      Gerrit-Comment-Date: Wed, 24 Jun 2026 23:38:43 +0000
      Gerrit-HasComments: Yes
      Gerrit-Has-Labels: Yes
      satisfied_requirement
      unsatisfied_requirement
      open
      diffy

      Yuwei Huang (Gerrit)

      unread,
      Jun 24, 2026, 8:12:23 PM (4 days ago) Jun 24
      to Daniel Cheng, Chromium IPC Reviews, Lambros Lambrou, Joe Downing, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org, ipc-securi...@chromium.org

      Yuwei Huang voted and added 3 comments

      Votes added by Yuwei Huang

      Commit-Queue+2

      3 comments

      Patchset-level comments
      Yuwei Huang . resolved

      Thanks!

      File remoting/host/desktop_session_agent.cc
      Line 284, Patchset 6 (Latest): security_key_auth_handler_
      .AsyncCall(&SecurityKeyAuthHandler::SetSendMessageCallback)
      .WithArgs(base::BindPostTaskToCurrentDefault(
      base::BindRepeating(&DesktopSessionAgent::OnSecurityKeyMessage,
      weak_factory_.GetWeakPtr())));
      Daniel Cheng . resolved

      I know this is pre-existing but it seems like this is probably better off as an additional constructor param rather than requiring two PostTasks to set up the object.

      Yuwei Huang

      In a follow-up CL, I'd expect `SetSendMessageCallback` to be called after the security key handler is created, so I don't think we can do it here.

      Line 291, Patchset 6 (Latest): &SecurityKeyAuthHandler::CreateSecurityKeyConnection);
      Daniel Cheng . resolved

      (And this could be combined as well)

      Yuwei Huang

      I'll clean that up later. For the legacy signaling code path in [SecurityKeyExtensionSession](https://source.chromium.org/chromium/chromium/src/+/main:remoting/host/security_key/security_key_extension_session.cc;l=146;drc=362dbaf3c1048a93929fff003e784d537f3ebfbc) `CreateSecurityKeyConnection` is called in response to a client message, but with the new WIP data channel approach, I think we should just create it immediately when the channel is open.

      Open in Gerrit

      Related details

      Attention set is empty
      Submit Requirements:
        • requirement satisfiedCode-Coverage
        • requirement satisfiedCode-Owners
        • requirement satisfiedCode-Review
        • requirement satisfiedReview-Enforcement
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: comment
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I5f1c910cff33382e8c250351df8f10c2852d6ac0
        Gerrit-Change-Number: 7988580
        Gerrit-PatchSet: 6
        Gerrit-Owner: Yuwei Huang <yuw...@chromium.org>
        Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
        Gerrit-Reviewer: Lambros Lambrou <lambros...@chromium.org>
        Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
        Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
        Gerrit-CC: Joe Downing <joe...@chromium.org>
        Gerrit-CC: gwsq
        Gerrit-Comment-Date: Thu, 25 Jun 2026 00:12:04 +0000
        Gerrit-HasComments: Yes
        Gerrit-Has-Labels: Yes
        Comment-In-Reply-To: Daniel Cheng <dch...@chromium.org>
        satisfied_requirement
        open
        diffy

        Yuwei Huang (Gerrit)

        unread,
        Jun 24, 2026, 8:15:01 PM (4 days ago) Jun 24
        to Daniel Cheng, Chromium IPC Reviews, Lambros Lambrou, Joe Downing, Chromium LUCI CQ, chromium...@chromium.org, chromotin...@chromium.org, ipc-securi...@chromium.org

        Yuwei Huang voted Commit-Queue+0

        Commit-Queue+0
        Gerrit-Comment-Date: Thu, 25 Jun 2026 00:14:47 +0000
        Gerrit-HasComments: No
        Gerrit-Has-Labels: Yes
        satisfied_requirement
        open
        diffy

        Chromium LUCI CQ (Gerrit)

        unread,
        Jun 24, 2026, 8:20:27 PM (4 days ago) Jun 24
        to Yuwei Huang, Daniel Cheng, Chromium IPC Reviews, Lambros Lambrou, Joe Downing, chromium...@chromium.org, chromotin...@chromium.org, ipc-securi...@chromium.org

        Chromium LUCI CQ submitted the change

        Change information

        Commit message:
        remoting: Introduce enable_security_key to DesktopEnvironmentOptions

        The motivation is to pass `security_key_extension_supported_` via
        DesktopEnvironmentOptions so that we don't need to plumb the flag
        through ChromotingHost, but Gemini suggests that I should also enforce
        it (i.e. not starting the UDS server) in the desktop process, so I just
        do both in this CL.

        Specifically:

        1. Adds enable_security_key getter/setter to DesktopEnvironmentOptions,
        defaulting to false.
        2. Updates DesktopEnvironmentOptions Mojo struct and traits to serialize
        the new option, and adds a round-trip serialization unit test.
        3. Hardens DesktopSessionAgent to check options.enable_security_key()
        and verify that the socket name is not empty. If it is empty (due to
        misconfiguration like missing XDG_RUNTIME_DIR), it gracefully logs a
        warning and disables forwarding rather than crashing.
        4. Hardens ClientSession::OnSecurityKeyConnection to check both
        enable_security_key() and the effective policy and reject binding
        request if the check fails.
        5. Consolidates the capability check in HostProcess to use the
        DesktopEnvironmentOptions container as the single source of truth,
        eliminating the redundant security_key_extension_supported_ member.

        BUG=517007701
        Change-Id: I5f1c910cff33382e8c250351df8f10c2852d6ac0
        Auto-Submit: Yuwei Huang <yuw...@chromium.org>
        Reviewed-by: Lambros Lambrou <lambros...@chromium.org>
        Reviewed-by: Daniel Cheng <dch...@chromium.org>
        Commit-Queue: Yuwei Huang <yuw...@chromium.org>
        Cr-Commit-Position: refs/heads/main@{#1652082}
        Files:
        • M remoting/host/base/desktop_environment_options.cc
        • M remoting/host/base/desktop_environment_options.h
        • M remoting/host/client_session.cc
        • M remoting/host/desktop_session_agent.cc
        • M remoting/host/mojom/desktop_session.mojom
        • M remoting/host/mojom/remoting_mojom_traits.cc
        • M remoting/host/mojom/remoting_mojom_traits.h
        • M remoting/host/mojom/remoting_mojom_traits_unittest.cc
        • M remoting/host/remoting_me2me_host.cc
        Change size: M
        Delta: 9 files changed, 72 insertions(+), 27 deletions(-)
        Branch: refs/heads/main
        Submit Requirements:
        • requirement satisfiedCode-Review: +1 by Lambros Lambrou, +1 by Daniel Cheng
        Open in Gerrit
        Inspect html for hidden footers to help with email filtering. To unsubscribe visit settings. DiffyGerrit
        Gerrit-MessageType: merged
        Gerrit-Project: chromium/src
        Gerrit-Branch: main
        Gerrit-Change-Id: I5f1c910cff33382e8c250351df8f10c2852d6ac0
        Gerrit-Change-Number: 7988580
        Gerrit-PatchSet: 7
        Gerrit-Owner: Yuwei Huang <yuw...@chromium.org>
        Gerrit-Reviewer: Chromium LUCI CQ <chromiu...@luci-project-accounts.iam.gserviceaccount.com>
        Gerrit-Reviewer: Daniel Cheng <dch...@chromium.org>
        Gerrit-Reviewer: Lambros Lambrou <lambros...@chromium.org>
        Gerrit-Reviewer: Yuwei Huang <yuw...@chromium.org>
        Gerrit-CC: Chromium IPC Reviews <chrome-ip...@google.com>
        open
        diffy
        satisfied_requirement
        Reply all
        Reply to author
        Forward
        0 new messages