| OLD | NEW |
| 1 // Copyright 2016 The LUCI Authors. All rights reserved. | 1 // Copyright 2016 The LUCI Authors. All rights reserved. |
| 2 // Use of this source code is governed under the Apache License, Version 2.0 | 2 // Use of this source code is governed under the Apache License, Version 2.0 |
| 3 // that can be found in the LICENSE file. | 3 // that can be found in the LICENSE file. |
| 4 | 4 |
| 5 syntax = "proto3"; | 5 syntax = "proto3"; |
| 6 | 6 |
| 7 package tokenserver.admin; | 7 package tokenserver.admin; |
| 8 | 8 |
| 9 | 9 |
| 10 // TokenServerConfig is read from tokenserver.cfg in luci-config. | 10 // TokenServerConfig is read from tokenserver.cfg in luci-config. |
| (...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 // * A service identity string ("service:<id>"). | 151 // * A service identity string ("service:<id>"). |
| 152 // * A special token "*" that mean "any LUCI service should accept the | 152 // * A special token "*" that mean "any LUCI service should accept the |
| 153 // token". | 153 // token". |
| 154 repeated string target_service = 6; | 154 repeated string target_service = 6; |
| 155 | 155 |
| 156 // Maximum allowed validity duration (sec) of minted delegation tokens. | 156 // Maximum allowed validity duration (sec) of minted delegation tokens. |
| 157 // | 157 // |
| 158 // Default is 12 hours. | 158 // Default is 12 hours. |
| 159 int64 max_validity_duration = 7; | 159 int64 max_validity_duration = 7; |
| 160 } | 160 } |
| 161 |
| 162 |
| 163 // ServiceAccountsPermissions is read from service_accounts.cfg in luci-config. |
| 164 message ServiceAccountsPermissions { |
| 165 // Rules specify how MintOAuthTokenViaGrant can be used. |
| 166 // |
| 167 // Rules are evaluated independently. One and only one rule should match the |
| 168 // request to allow the operation. If none rules or more than one rule match, |
| 169 // the request will be denied. |
| 170 // |
| 171 // See ServiceAccountRule comments for more details. |
| 172 repeated ServiceAccountRule rules = 1; |
| 173 } |
| 174 |
| 175 |
| 176 // ServiceAccountRule describes a single allowed case of using service accounts. |
| 177 // |
| 178 // TODO(vadimsh): Implement. |
| 179 message ServiceAccountRule { |
| 180 // A descriptive name of this rule, for the audit log. |
| 181 string name = 1; |
| 182 |
| 183 // Email of developers that owns this rule, to know who to contact. |
| 184 repeated string owner = 2; |
| 185 } |
| OLD | NEW |