| OLD | NEW |
| 1 // Copyright 2014 The Swarming Authors. All rights reserved. | 1 // Copyright 2014 The Swarming Authors. All rights reserved. |
| 2 // Use of this source code is governed by the Apache v2.0 license that can be | 2 // Use of this source code is governed by the Apache v2.0 license that can be |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 // This file is copied from luci-py.git: | 5 // This file is copied from luci-py.git: |
| 6 // appengine/components/components/auth/proto/replication.proto | 6 // appengine/components/components/auth/proto/replication.proto |
| 7 // Commit: fa51b14f344c2e31416f94b6f0d00e5129b4de3d | 7 // Commit: def5fc8357e1334184e34d08750c8a8ab17d3141 |
| 8 // | 8 // |
| 9 // Changes: renamed package to 'protocol'. | 9 // Changes: renamed package to 'protocol'. |
| 10 | 10 |
| 11 // Messages for Primary <-> Replica auth DB replication protocol. | 11 // Messages for Primary <-> Replica auth DB replication protocol. |
| 12 // Used from both Primary side (i.e. auth_service) and Replica side (any service | 12 // Used from both Primary side (i.e. auth_service) and Replica side (any service |
| 13 // that uses auth component). | 13 // that uses auth component). |
| 14 | 14 |
| 15 syntax = "proto2"; | 15 syntax = "proto2"; |
| 16 | 16 |
| 17 package protocol; | 17 package protocol; |
| (...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 // When the group was modified last time. Microseconds since epoch. | 108 // When the group was modified last time. Microseconds since epoch. |
| 109 required int64 modified_ts = 8; | 109 required int64 modified_ts = 8; |
| 110 // Who modified the group last time. | 110 // Who modified the group last time. |
| 111 required string modified_by = 9; | 111 required string modified_by = 9; |
| 112 | 112 |
| 113 // A name of the group that can modify or delete this group. | 113 // A name of the group that can modify or delete this group. |
| 114 optional string owners = 10; | 114 optional string owners = 10; |
| 115 } | 115 } |
| 116 | 116 |
| 117 | 117 |
| 118 // Some secret blob. Corresponds to AuthSecret entity in model.py. | |
| 119 message AuthSecret { | |
| 120 // Name of the secret. | |
| 121 required string name = 1; | |
| 122 // Last several values of a secret, with current value in front. | |
| 123 repeated bytes values = 2; | |
| 124 // When secret was modified last time. Microseconds since epoch. | |
| 125 required int64 modified_ts = 3; | |
| 126 // Who modified the secret last time. | |
| 127 required string modified_by = 4; | |
| 128 } | |
| 129 | |
| 130 | |
| 131 // A named set of whitelisted IP addresses. Corresponds to AuthIPWhitelist | 118 // A named set of whitelisted IP addresses. Corresponds to AuthIPWhitelist |
| 132 // entity in model.py. | 119 // entity in model.py. |
| 133 message AuthIPWhitelist { | 120 message AuthIPWhitelist { |
| 134 // Name of the IP whitelist. | 121 // Name of the IP whitelist. |
| 135 required string name = 1; | 122 required string name = 1; |
| 136 | 123 |
| 137 // The list of IP subnets. | 124 // The list of IP subnets. |
| 138 repeated string subnets = 2; | 125 repeated string subnets = 2; |
| 139 | 126 |
| 140 // Human readable description. | 127 // Human readable description. |
| (...skipping 21 matching lines...) Expand all Loading... |
| 162 // Why the assignment was created. | 149 // Why the assignment was created. |
| 163 required string comment = 3; | 150 required string comment = 3; |
| 164 // When the assignment was created. Microseconds since epoch. | 151 // When the assignment was created. Microseconds since epoch. |
| 165 required int64 created_ts = 4; | 152 required int64 created_ts = 4; |
| 166 // Who created the assignment. | 153 // Who created the assignment. |
| 167 required string created_by = 5; | 154 required string created_by = 5; |
| 168 } | 155 } |
| 169 | 156 |
| 170 | 157 |
| 171 // An entire database of auth configuration that is being replicated. | 158 // An entire database of auth configuration that is being replicated. |
| 172 // Corresponds to AuthGlobalConfig entity in model.py, plus a list of all groups | |
| 173 // and a list of global secrets. | |
| 174 message AuthDB { | 159 message AuthDB { |
| 160 reserved 5; // used to be 'secrets', no longer used |
| 161 |
| 175 // OAuth2 client_id to use to mint new OAuth2 tokens. | 162 // OAuth2 client_id to use to mint new OAuth2 tokens. |
| 176 required string oauth_client_id = 1; | 163 required string oauth_client_id = 1; |
| 177 // OAuth2 client secret. Not so secret really, since it's passed to clients. | 164 // OAuth2 client secret. Not so secret really, since it's passed to clients. |
| 178 required string oauth_client_secret = 2; | 165 required string oauth_client_secret = 2; |
| 179 // Additional OAuth2 client_ids allowed to access the services. | 166 // Additional OAuth2 client_ids allowed to access the services. |
| 180 repeated string oauth_additional_client_ids = 3; | 167 repeated string oauth_additional_client_ids = 3; |
| 181 // All groups. | 168 // All groups. |
| 182 repeated AuthGroup groups = 4; | 169 repeated AuthGroup groups = 4; |
| 183 // Global secrets shared between services. | |
| 184 repeated AuthSecret secrets = 5; | |
| 185 // All IP whitelists. | 170 // All IP whitelists. |
| 186 repeated AuthIPWhitelist ip_whitelists = 6; | 171 repeated AuthIPWhitelist ip_whitelists = 6; |
| 187 // Mapping 'account -> IP whitlist to use for that account'. | 172 // Mapping 'account -> IP whitlist to use for that account'. |
| 188 repeated AuthIPWhitelistAssignment ip_whitelist_assignments = 7; | 173 repeated AuthIPWhitelistAssignment ip_whitelist_assignments = 7; |
| 189 // URL of a token server to use to generate delegation tokens. | 174 // URL of a token server to use to generate delegation tokens. |
| 190 optional string token_server_url = 8; | 175 optional string token_server_url = 8; |
| 191 } | 176 } |
| 192 | 177 |
| 193 | 178 |
| 194 // Information about some particular revision of auth DB. | 179 // Information about some particular revision of auth DB. |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 | 243 |
| 259 // Overall status of the operation. | 244 // Overall status of the operation. |
| 260 required Status status = 1; | 245 required Status status = 1; |
| 261 // Revision known by Replica (set for APPLIED and SKIPPED statuses). | 246 // Revision known by Replica (set for APPLIED and SKIPPED statuses). |
| 262 optional AuthDBRevision current_revision = 2; | 247 optional AuthDBRevision current_revision = 2; |
| 263 // Present for TRANSIENT_ERROR and FATAL_ERROR statuses. | 248 // Present for TRANSIENT_ERROR and FATAL_ERROR statuses. |
| 264 optional ErrorCode error_code = 3; | 249 optional ErrorCode error_code = 3; |
| 265 // Version of 'auth' component on Replica, see components/auth/version.py. | 250 // Version of 'auth' component on Replica, see components/auth/version.py. |
| 266 optional string auth_code_version = 4; | 251 optional string auth_code_version = 4; |
| 267 } | 252 } |
| OLD | NEW |