chaps: Add isolate support to the chaps daemon.

Modifies chaps to enable it to support isolated slot lists.
Each dbus request is modified to take an isolate credential, and
the request will only operate on slots which are part of the
isolate associated with the credential. When chaps starts, a default
isolate is created which has a well known credential, other
isolates can be created for each user with the OpenIsolate call.

Also fixed slot_manager_tests which were not compiling
(crosbug.com/224166) and added isolate specific tests.

TEST=Built and ran all chaps tests on Linux. Tested on remote buildbot.
BUG=chromium:224166
CQ-DEPEND=CL:49888, CL:49890

Change-Id: If775ab5def739acb9319521840ca8c5f7237edc9
Signed-off-by: Ross McIlroy <rmcilroy@google.com>
Reviewed-on: https://gerrit.chromium.org/gerrit/47856
Commit-Queue: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Tested-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Darren Krahn <dkrahn@chromium.org>
29 files changed
tree: d77b06dc8eb9ae2a967ae449a7284149359efaf3
  1. pkcs11/
  2. attributes.cc
  3. attributes.h
  4. attributes.proto
  5. chaps.cc
  6. chaps.h
  7. chaps_adaptor.cc
  8. chaps_adaptor.h
  9. chaps_client.cc
  10. chaps_factory.h
  11. chaps_factory_impl.cc
  12. chaps_factory_impl.h
  13. chaps_factory_mock.cc
  14. chaps_factory_mock.h
  15. chaps_interface.h
  16. chaps_interface.xml
  17. chaps_proxy.cc
  18. chaps_proxy.h
  19. chaps_proxy_mock.h
  20. chaps_service.cc
  21. chaps_service.h
  22. chaps_service_redirect.cc
  23. chaps_service_redirect.h
  24. chaps_service_test.cc
  25. chaps_test.cc
  26. chaps_utility.cc
  27. chaps_utility.h
  28. chapsd.cc
  29. chapsd.conf
  30. chapsd_test.cc
  31. common.mk
  32. handle_generator.h
  33. handle_generator_mock.h
  34. isolate.h
  35. isolate_chromeos.cc
  36. isolate_linux.cc
  37. LICENSE
  38. login_event_client.cc
  39. login_event_client.h
  40. login_event_listener.h
  41. Makefile
  42. object.h
  43. object_impl.cc
  44. object_impl.h
  45. object_importer.h
  46. object_importer_mock.cc
  47. object_importer_mock.h
  48. object_mock.cc
  49. object_mock.h
  50. object_policy.h
  51. object_policy_cert.cc
  52. object_policy_cert.h
  53. object_policy_common.cc
  54. object_policy_common.h
  55. object_policy_data.cc
  56. object_policy_data.h
  57. object_policy_key.cc
  58. object_policy_key.h
  59. object_policy_mock.cc
  60. object_policy_mock.h
  61. object_policy_private_key.cc
  62. object_policy_private_key.h
  63. object_policy_public_key.cc
  64. object_policy_public_key.h
  65. object_policy_secret_key.cc
  66. object_policy_secret_key.h
  67. object_policy_test.cc
  68. object_pool.h
  69. object_pool_impl.cc
  70. object_pool_impl.h
  71. object_pool_mock.cc
  72. object_pool_mock.h
  73. object_pool_test.cc
  74. object_store.h
  75. object_store_fake.h
  76. object_store_impl.cc
  77. object_store_impl.h
  78. object_store_mock.cc
  79. object_store_mock.h
  80. object_store_test.cc
  81. object_test.cc
  82. opencryptoki_importer.cc
  83. opencryptoki_importer.h
  84. opencryptoki_importer_test.cc
  85. opencryptoki_sample_token.tgz
  86. org.chromium.Chaps.conf
  87. org.chromium.Chaps.service
  88. OWNERS
  89. p11_replay.cc
  90. README
  91. session.h
  92. session_impl.cc
  93. session_impl.h
  94. session_mock.cc
  95. session_mock.h
  96. session_test.cc
  97. slot_manager.h
  98. slot_manager_impl.cc
  99. slot_manager_impl.h
  100. slot_manager_mock.cc
  101. slot_manager_mock.h
  102. slot_manager_test.cc
  103. tpm_utility.h
  104. tpm_utility_impl.cc
  105. tpm_utility_impl.h
  106. tpm_utility_mock.cc
  107. tpm_utility_mock.h
  108. tpm_utility_test.cc