@@ -111,7 +111,7 @@ private static void Main(string[] args)
111111 private static void Setup ( )
112112 {
113113 ServiceAccountIds = new List < long > ( ) ;
114- var perm = new Permission
114+ var permProject = new Permission
115115 {
116116 Parts = { new RepeatedField < string > { "prj" , ProjectName , "*" } } ,
117117 Verbs =
@@ -123,6 +123,18 @@ private static void Setup()
123123 }
124124 }
125125 } ;
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+ } ;
126138
127139 Console . WriteLine ( "Setting up for the scenario by creating new service accounts..." ) ;
128140 for ( var i = 0 ; i < NumberOfServiceAccountsToCreate ; i ++ )
@@ -131,7 +143,7 @@ private static void Setup()
131143 {
132144 Name = ServiceAccountName ,
133145 ProjectName = ProjectName ,
134- Permissions = { new RepeatedField < Permission > { perm } } ,
146+ Permissions = { new RepeatedField < Permission > { permProject , permServices } } ,
135147 Lifetime = Duration . FromTimeSpan ( new TimeSpan ( 1 , 0 , 0 , 0 ) ) // Let this service account live for one day
136148 } ) ;
137149 ServiceAccountIds . Add ( resp . Id ) ;
0 commit comments