@@ -111,7 +111,7 @@ private static void Main(string[] args)
111
111
private static void Setup ( )
112
112
{
113
113
ServiceAccountIds = new List < long > ( ) ;
114
- var perm = new Permission
114
+ var permProject = new Permission
115
115
{
116
116
Parts = { new RepeatedField < string > { "prj" , ProjectName , "*" } } ,
117
117
Verbs =
@@ -123,6 +123,18 @@ private static void Setup()
123
123
}
124
124
}
125
125
} ;
126
+
127
+ var permServices = new Permission
128
+ {
129
+ Parts = { new RepeatedField < string > { "srv" , "*" } } ,
130
+ Verbs =
131
+ {
132
+ new RepeatedField < Permission . Types . Verb >
133
+ {
134
+ Permission . Types . Verb . Read
135
+ }
136
+ }
137
+ } ;
126
138
127
139
Console . WriteLine ( "Setting up for the scenario by creating new service accounts..." ) ;
128
140
for ( var i = 0 ; i < NumberOfServiceAccountsToCreate ; i ++ )
@@ -131,7 +143,7 @@ private static void Setup()
131
143
{
132
144
Name = ServiceAccountName ,
133
145
ProjectName = ProjectName ,
134
- Permissions = { new RepeatedField < Permission > { perm } } ,
146
+ Permissions = { new RepeatedField < Permission > { permProject , permServices } } ,
135
147
Lifetime = Duration . FromTimeSpan ( new TimeSpan ( 1 , 0 , 0 , 0 ) ) // Let this service account live for one day
136
148
} ) ;
137
149
ServiceAccountIds . Add ( resp . Id ) ;
0 commit comments