Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(440)

Issue 2828713002: Enable client certificate patterns in device ONC policy (Closed)

Created:
3 years, 8 months ago by pmarko
Modified:
3 years, 7 months ago
Reviewers:
stevenjb, emaxx, fdoray, blundell
CC:
chromium-reviews, kalyank, stevenjb+watch_chromium.org, sadrul, oshima+watch_chromium.org, davemoore+watch_chromium.org
Target Ref:
refs/heads/master
Project:
chromium
Visibility:
Public.

Description

Enable client certificate patterns in device ONC policy Enables client certificate patterns for EAP-TLS networks in device ONC policy. Device-wide client certificate patterns are restricted to only match certificates which are present in the system token. This prevents the device from presenting the user's certificates involuntarily. Two supporting changes were made to achieve this: - CertLoader has been extended by the system_cert_list() method to retrieve available certificates which exist on the system token. - The ClientCertConfig struct has a new onc_source member which can be checked to see if the client cert pattern originates from device policy. BUG=655266 TEST=unit_tests && chromeos_unittests Manual test scenario: -- Prerequisites: Install a certificate (subject common name e.g.: “cert_user”) into the user token and a different certificate (subject common name e.g.: “cert_system”) into the system token. Have a EAP-TLS wifi network connected to a radius server which would accept both client certificates. -- Test Case 1: device policy ONC / user token certificate Configure a device policy OpenNetworkPolicy to connect to the EAP-TLS network with "ClientCertPattern": { "Subject": { "CommonName": "cert_user" } Expected result: The device does not try to auto-connect to the wifi network because the ClientCertPattern originating from device policy does not match user certificates. -- Test Case 2: device policy ONC / system token certificate Configure a device policy OpenNetworkPolicy to connect to the EAP-TLS network with "ClientCertPattern": { "Subject": { "CommonName": "cert_system" } Expected result: The device auto-connects to the wifi network because the ClientCertPattern originating from device policy matches certificates present on the system token. It authenticates with cert_system. -- Test Case 3: user policy ONC / user token certificate Configure a user policy OpenNetworkPolicy to connect to the EAP-TLS network with "ClientCertPattern": { "Subject": { "CommonName": "cert_user" } Expected result: The device auto-connects to the wifi network. It authenticates with cert_user. -- Test Case 4: user policy ONC / system token certificate Configure a user OpenNetworkPolicy to connect to the EAP-TLS network with "ClientCertPattern": { "Subject": { "CommonName": "cert_system" } Expected result: The device auto-connects to the wifi network. It authenticates with cert_system. Review-Url: https://codereview.chromium.org/2828713002 Cr-Commit-Position: refs/heads/master@{#467634} Committed: https://chromium.googlesource.com/chromium/src/+/93bc5d7c02d275d27c030ab15a8c68efc8efdd99

Patch Set 1 #

Patch Set 2 : Check for system token instead of !user token #

Patch Set 3 : Fixed tests, added tests. #

Patch Set 4 : Ensure no enrollment dialog on sign-in screen. #

Patch Set 5 : Rebase. #

Total comments: 40

Patch Set 6 : Addressed comments, extended logic to ResolveCertificatePatternSync. #

Patch Set 7 : Clean up. #

Total comments: 19

Patch Set 8 : Addressed comments. #

Total comments: 11

Patch Set 9 : Addressed comments. #

Total comments: 10

Patch Set 10 : Use BindOnce, PostTaskWithTraitsAndReplyWithResult. #

Total comments: 12

Patch Set 11 : Addressed comments - more DCHECKs, use PostTask..WithReply in client_cert_resolver.cc. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+507 lines, -168 lines) Patch
M ash/system/network/network_list.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chrome/browser/chromeos/enrollment_dialog_view.cc View 1 2 3 4 5 6 7 8 4 chunks +36 lines, -5 lines 0 comments Download
M chromeos/cert_loader.h View 1 2 3 4 5 6 7 8 9 10 4 chunks +26 lines, -7 lines 0 comments Download
M chromeos/cert_loader.cc View 1 2 3 4 5 6 7 8 9 10 8 chunks +86 lines, -16 lines 0 comments Download
M chromeos/cert_loader_unittest.cc View 1 2 3 4 5 6 7 16 chunks +68 lines, -15 lines 0 comments Download
M chromeos/network/auto_connect_handler.cc View 1 2 3 4 5 1 chunk +1 line, -1 line 0 comments Download
M chromeos/network/client_cert_resolver.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +3 lines, -2 lines 0 comments Download
M chromeos/network/client_cert_resolver.cc View 1 2 3 4 5 6 7 8 9 10 8 chunks +52 lines, -29 lines 0 comments Download
M chromeos/network/client_cert_resolver_unittest.cc View 1 2 3 4 5 6 7 16 chunks +177 lines, -25 lines 0 comments Download
M chromeos/network/client_cert_util.h View 1 2 3 4 5 3 chunks +5 lines, -0 lines 0 comments Download
M chromeos/network/client_cert_util.cc View 1 2 3 4 5 3 chunks +9 lines, -3 lines 0 comments Download
M chromeos/network/managed_network_configuration_handler.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -2 lines 0 comments Download
M chromeos/network/managed_network_configuration_handler_impl.h View 2 chunks +6 lines, -1 line 0 comments Download
M chromeos/network/managed_network_configuration_handler_impl.cc View 1 2 2 chunks +9 lines, -2 lines 0 comments Download
M chromeos/network/mock_managed_network_configuration_handler.h View 1 chunk +3 lines, -2 lines 0 comments Download
M chromeos/network/network_cert_migrator.cc View 1 2 3 4 5 6 7 1 chunk +1 line, -1 line 0 comments Download
M chromeos/network/network_cert_migrator_unittest.cc View 1 2 3 4 5 6 7 3 chunks +4 lines, -1 line 0 comments Download
M chromeos/network/network_connection_handler.cc View 1 2 3 4 5 4 chunks +10 lines, -8 lines 0 comments Download
M chromeos/network/network_connection_handler_unittest.cc View 1 2 3 4 5 6 7 3 chunks +4 lines, -1 line 0 comments Download
M chromeos/network/onc/onc_validator.h View 1 2 3 4 1 chunk +0 lines, -4 lines 0 comments Download
M chromeos/network/onc/onc_validator.cc View 1 2 3 4 2 chunks +0 lines, -14 lines 0 comments Download
M chromeos/network/onc/onc_validator_unittest.cc View 1 2 3 4 1 chunk +0 lines, -5 lines 0 comments Download
M chromeos/test/data/network/invalid_settings_with_repairs.json View 1 2 3 4 1 chunk +0 lines, -22 lines 0 comments Download
M components/sync_wifi/wifi_config_delegate_chromeos_unittest.cc View 1 chunk +2 lines, -1 line 0 comments Download

Messages

Total messages: 30 (12 generated)
pmarko
Hey Maksim, would you please take a look before I send this out? Thanks!!
3 years, 8 months ago (2017-04-20 17:16:08 UTC) #3
emaxx
Tried to provide an early feedback (not sure whether I reviewed everything thoroughly - but ...
3 years, 8 months ago (2017-04-20 20:10:40 UTC) #4
pmarko
Thank you for the excellent review, emaxx! I'll proceed to OWNERs as discussed, but I ...
3 years, 8 months ago (2017-04-24 14:49:56 UTC) #7
pmarko
stevenjb@chromium.org: Please review this CL. Thank you!
3 years, 8 months ago (2017-04-24 14:52:57 UTC) #9
stevenjb
Note: I'm not very familiar with the lower level certificate details, so please wait for ...
3 years, 8 months ago (2017-04-24 15:53:59 UTC) #10
emaxx
Two general notes: 1. Isn't there an update required in onc_spec.md? Or it doesn't say ...
3 years, 8 months ago (2017-04-24 21:23:13 UTC) #11
pmarko
Addressing general notes: (1) onc_spec.md: The restriction about client certificate patterns not being usable in ...
3 years, 8 months ago (2017-04-25 12:10:03 UTC) #13
emaxx
https://codereview.chromium.org/2828713002/diff/140001/chromeos/cert_loader.cc File chromeos/cert_loader.cc (right): https://codereview.chromium.org/2828713002/diff/140001/chromeos/cert_loader.cc#newcode252 chromeos/cert_loader.cc:252: return base::WorkerPool::GetTaskRunner(true /*task is slow*/); On 2017/04/25 12:10:02, pmarko ...
3 years, 8 months ago (2017-04-25 15:15:58 UTC) #14
pmarko
@fdoray: Would you please take a look at the propsed TaskScheduler / base::PostTaskWithTraitsAndReply use in ...
3 years, 8 months ago (2017-04-25 16:59:57 UTC) #16
fdoray
https://codereview.chromium.org/2828713002/diff/180001/chromeos/cert_loader.cc File chromeos/cert_loader.cc (right): https://codereview.chromium.org/2828713002/diff/180001/chromeos/cert_loader.cc#newcode201 chromeos/cert_loader.cc:201: CHECK(thread_checker_.CalledOnValidThread()); DCHECK? https://codereview.chromium.org/2828713002/diff/180001/chromeos/cert_loader.cc#newcode207 chromeos/cert_loader.cc:207: base::PostTaskWithTraitsAndReply( You could return a ...
3 years, 8 months ago (2017-04-25 17:40:25 UTC) #17
pmarko
https://codereview.chromium.org/2828713002/diff/180001/chromeos/cert_loader.cc File chromeos/cert_loader.cc (right): https://codereview.chromium.org/2828713002/diff/180001/chromeos/cert_loader.cc#newcode201 chromeos/cert_loader.cc:201: CHECK(thread_checker_.CalledOnValidThread()); On 2017/04/25 17:40:24, fdoray wrote: > DCHECK? Good ...
3 years, 8 months ago (2017-04-26 08:01:29 UTC) #18
pmarko
https://codereview.chromium.org/2828713002/diff/180001/chromeos/cert_loader.cc File chromeos/cert_loader.cc (right): https://codereview.chromium.org/2828713002/diff/180001/chromeos/cert_loader.cc#newcode207 chromeos/cert_loader.cc:207: base::PostTaskWithTraitsAndReply( On 2017/04/26 08:01:29, pmarko wrote: > On 2017/04/25 ...
3 years, 8 months ago (2017-04-26 11:34:17 UTC) #19
fdoray
lgtm https://codereview.chromium.org/2828713002/diff/180001/chromeos/cert_loader.cc File chromeos/cert_loader.cc (right): https://codereview.chromium.org/2828713002/diff/180001/chromeos/cert_loader.cc#newcode207 chromeos/cert_loader.cc:207: base::PostTaskWithTraitsAndReply( On 2017/04/26 11:34:17, pmarko wrote: > On ...
3 years, 8 months ago (2017-04-26 13:11:36 UTC) #20
emaxx
LGTM
3 years, 8 months ago (2017-04-26 14:43:58 UTC) #21
pmarko
blundell@chromium.org: Please review changes in components/sync_wifi/. Thanks! https://codereview.chromium.org/2828713002/diff/200001/chromeos/cert_loader.cc File chromeos/cert_loader.cc (right): https://codereview.chromium.org/2828713002/diff/200001/chromeos/cert_loader.cc#newcode62 chromeos/cert_loader.cc:62: // system_certs_ ...
3 years, 8 months ago (2017-04-27 08:51:56 UTC) #23
blundell
//components/sync_wifi lgtm
3 years, 8 months ago (2017-04-27 09:09:44 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at: https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2828713002/220001
3 years, 7 months ago (2017-04-27 10:29:30 UTC) #27
commit-bot: I haz the power
3 years, 7 months ago (2017-04-27 10:58:44 UTC) #30
Message was sent while issue was closed.
Committed patchset #11 (id:220001) as
https://chromium.googlesource.com/chromium/src/+/93bc5d7c02d275d27c030ab15a8c...

Powered by Google App Engine
This is Rietveld 408576698