aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLutz Justen <ljusten@chromium.org>2017-04-25 21:35:29 +0000
committerandroid-build-merger <android-build-merger@google.com>2017-04-25 21:35:29 +0000
commitdcc8c4dad8a3488ced04f4e78741618503c85bba (patch)
tree1eb86473facab8dcef7ddce81770fbf849a49992
parent5cf2009e6f8b5fce2493928fb1b9453627541849 (diff)
parent39d3527a0018069bbe7286febba118d0a6dbd6f0 (diff)
downloadsystem_api-dcc8c4dad8a3488ced04f4e78741618503c85bba.tar.gz
authpolicy: Add ActiveDirectoryUserStatus protobuf am: fd7d48e736
am: 39d3527a00 Change-Id: I0c2048fd3aa271ef26a4c3fef846225ea5e6d1cc
-rw-r--r--dbus/authpolicy/active_directory_account_data.proto3
-rw-r--r--dbus/authpolicy/active_directory_info.proto46
-rw-r--r--dbus/authpolicy/dbus-constants.h1
-rw-r--r--system_api.gyp6
4 files changed, 56 insertions, 0 deletions
diff --git a/dbus/authpolicy/active_directory_account_data.proto b/dbus/authpolicy/active_directory_account_data.proto
index 27d0c66..79325f6 100644
--- a/dbus/authpolicy/active_directory_account_data.proto
+++ b/dbus/authpolicy/active_directory_account_data.proto
@@ -8,6 +8,9 @@ option optimize_for = LITE_RUNTIME;
package authpolicy;
+// TODO(ljusten): Remove this file as soon as Chrome uses
+// active_directory_info.proto. crbug.com/712720.
+
// Message sent to Chromium by authpolicy service as a response of successful
// AuthenticateUser call. Contains information about authenticated user fetched
// from Active Directory server.
diff --git a/dbus/authpolicy/active_directory_info.proto b/dbus/authpolicy/active_directory_info.proto
new file mode 100644
index 0000000..f949866
--- /dev/null
+++ b/dbus/authpolicy/active_directory_info.proto
@@ -0,0 +1,46 @@
+// Copyright 2017 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+syntax = "proto2";
+
+option optimize_for = LITE_RUNTIME;
+
+package authpolicy;
+
+// Message sent to Chromium by authpolicy service as a response of a successful
+// AuthenticateUser call. Contains information about authenticated user fetched
+// from Active Directory server with "net ads search ...".
+message ActiveDirectoryAccountInfo {
+ // Unique id of the user account. Taken from the objectGUID property of the
+ // Active Directory user account information.
+ optional string account_id = 1;
+ // Display name of the user. Taken from the displayName property of the Active
+ // account information.
+ optional string display_name = 2;
+ // Given name of the user. AKA first name. Taken from the givenName property
+ // of the Active Directory user account information.
+ optional string given_name = 3;
+ // Logon name of the user (without @realm). Taken from the sAMAccountName
+ // property of the Active Directory user account information.
+ optional string sam_account_name = 4;
+ // Next ID to use: 5
+}
+
+// Message sent to Chromium by authpolicy service as a response to a successful
+// GetUserStatus call.
+message ActiveDirectoryUserStatus {
+ // Ticket-granting-ticket status.
+ enum TgtStatus {
+ TGT_VALID = 0; // Ticket is still valid.
+ TGT_EXPIRED = 1; // Ticket expired.
+ TGT_NOT_FOUND = 2; // Kerberos credentials cache not found.
+ // Next ID to use: 3
+ }
+
+ // User's account information, see above.
+ optional ActiveDirectoryAccountInfo account_info = 1;
+ // Status of the user's ticket-granting-ticket (TGT).
+ optional TgtStatus tgt_status = 2;
+ // Next ID to use: 3
+}
diff --git a/dbus/authpolicy/dbus-constants.h b/dbus/authpolicy/dbus-constants.h
index 6386239..2716728 100644
--- a/dbus/authpolicy/dbus-constants.h
+++ b/dbus/authpolicy/dbus-constants.h
@@ -12,6 +12,7 @@ const char kAuthPolicyServicePath[] = "/org/chromium/AuthPolicy";
const char kAuthPolicyServiceName[] = "org.chromium.AuthPolicy";
// Methods
const char kAuthPolicyAuthenticateUser[] = "AuthenticateUser";
+const char kAuthPolicyGetUserStatus[] = "GetUserStatus";
const char kAuthPolicyJoinADDomain[] = "JoinADDomain";
const char kAuthPolicyRefreshUserPolicy[] = "RefreshUserPolicy";
const char kAuthPolicyRefreshDevicePolicy[] = "RefreshDevicePolicy";
diff --git a/system_api.gyp b/system_api.gyp
index b05b95e..6981987 100644
--- a/system_api.gyp
+++ b/system_api.gyp
@@ -95,7 +95,10 @@
'proto_out_dir': 'include/authpolicy/proto_bindings',
},
'sources': [
+ # TODO(ljusten): Remove this file as soon as Chrome uses
+ # active_directory_info.proto. crbug.com/712720.
'<(proto_in_dir)/active_directory_account_data.proto',
+ '<(proto_in_dir)/active_directory_info.proto',
],
'includes': ['../../platform2/common-mk/protoc.gypi'],
},
@@ -107,7 +110,10 @@
'system_api-authpolicy-protos-gen',
],
'sources': [
+ # TODO(ljusten): Remove this file as soon as Chrome uses
+ # active_directory_info.proto. crbug.com/712720.
'<(SHARED_INTERMEDIATE_DIR)/include/authpolicy/proto_bindings/active_directory_account_data.pb.cc',
+ '<(SHARED_INTERMEDIATE_DIR)/include/authpolicy/proto_bindings/active_directory_info.pb.cc',
]
},
]