go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/swarming/proto/config/realms.proto (about) 1 // Copyright 2020 The LUCI Authors. All rights reserved. 2 // Use of this source code is governed under the Apache License, Version 2.0 3 // that can be found in the LICENSE file. 4 5 syntax = "proto3"; 6 7 package swarming.config; 8 9 option go_package = "go.chromium.org/luci/swarming/proto/config;configpb"; 10 11 // Realm permissions used in Swarming. 12 // The enums are converted to string names using get_permission_name 13 // in server/realms.py 14 // NEXT_ID: 12 15 enum RealmPermission { 16 REALM_PERMISSION_UNSPECIFIED = 0; 17 18 // Pools permissions 19 20 // Permission 'swarming.pools.createTask' 21 // This is required to create a task in the pool. 22 // It will be checked at the new task API. 23 REALM_PERMISSION_POOLS_CREATE_TASK = 1; 24 25 // Permission 'swarming.pools.listTasks' 26 // This is required to list/count tasks in the pool. 27 // It will be checked at tasks list/count APIs. 28 REALM_PERMISSION_POOLS_LIST_TASKS = 4; 29 30 // Permission 'swarming.pools.cancelTask' 31 // This is required to cancel a task in the pool. 32 // It will be checked at task cancel APIs. 33 REALM_PERMISSION_POOLS_CANCEL_TASK = 5; 34 35 // Permission 'swarming.pools.createBot' 36 // This is required to create a bot in the pool. 37 // It will be checked at bot bootstrap, bot code APIs. 38 REALM_PERMISSION_POOLS_CREATE_BOT = 6; 39 40 // Permission 'swarming.pools.listBots' 41 // This is required to list/count bots in the pool. 42 // It will be checked at bots list/count APIs. 43 REALM_PERMISSION_POOLS_LIST_BOTS = 7; 44 45 // Permission 'swarming.pools.terminateBot' 46 // This is required to terminate a bot in the pool. 47 // It will be checked at bot terminate API. 48 REALM_PERMISSION_POOLS_TERMINATE_BOT = 8; 49 50 // Permission 'swarming.pools.deleteBot' 51 // This is required to delete a bot in the pool. 52 // It will be checked at bot delete API. 53 REALM_PERMISSION_POOLS_DELETE_BOT = 9; 54 55 // Tasks permissions 56 57 // Permission 'swarming.tasks.createInRealm' 58 // This is required to create a task in the realm. 59 // It will be checked at the new task API. 60 REALM_PERMISSION_TASKS_CREATE_IN_REALM = 2; 61 62 // Permission 'swarming.tasks.actAs' 63 // This is required to use a task service account in the realm. 64 // It will be checked at the new task API. 65 REALM_PERMISSION_TASKS_ACT_AS = 3; 66 67 // Permission 'swarming.tasks.get' 68 // This is required to get task request, result, outputs. 69 // It will be checked at task request, result, stdout GET APIs. 70 REALM_PERMISSION_TASKS_GET = 10; 71 72 // Permission 'swarming.tasks.cancel' 73 // This is required to cancel a task. 74 // It will be checked at task cancel API. 75 REALM_PERMISSION_TASKS_CANCEL = 11; 76 }