1 00:00:01,760 --> 00:00:03,359 thank you 2 00:00:03,359 --> 00:00:05,600 everyone let's 3 00:00:05,600 --> 00:00:08,600 see 4 00:00:09,639 --> 00:00:13,480 okay oh just turn it 5 00:00:15,119 --> 00:00:17,710 on third 6 00:00:17,710 --> 00:00:19,480 [Music] 7 00:00:19,480 --> 00:00:22,760 but all right cool uh before I continue 8 00:00:22,760 --> 00:00:24,599 could you please raise your hand if you 9 00:00:24,599 --> 00:00:27,960 ever heard about or used Azure devops 10 00:00:27,960 --> 00:00:30,119 before okay then it's almost there 11 00:00:30,119 --> 00:00:32,680 everyone uh because it's kind of a 12 00:00:32,680 --> 00:00:35,120 beginner and intermediate and a lot of 13 00:00:35,120 --> 00:00:37,559 security controls so some of uh you 14 00:00:37,559 --> 00:00:41,120 might seen this 15 00:00:42,399 --> 00:00:44,879 before so I'm a managing security 16 00:00:44,879 --> 00:00:47,320 consultant and NCC group I'm specialized 17 00:00:47,320 --> 00:00:50,680 in cloud and cicd security I have some 18 00:00:50,680 --> 00:00:53,840 certifications uh Awards and so on and 19 00:00:53,840 --> 00:00:55,960 uh Last year me and my colleague gave a 20 00:00:55,960 --> 00:01:00,519 presentation about cicd compromises 21 00:01:00,519 --> 00:01:02,640 but that was more about the UN premise 22 00:01:02,640 --> 00:01:05,519 uh like Jenkins and gitlab and so on so 23 00:01:05,519 --> 00:01:07,960 I thought that this year uh we can move 24 00:01:07,960 --> 00:01:10,279 to 25 00:01:11,360 --> 00:01:14,520 Cloud so Azure is a Azure develops is a 26 00:01:14,520 --> 00:01:17,720 s solution uh from Microsoft that helps 27 00:01:17,720 --> 00:01:22,439 uh deploy and um build 28 00:01:22,640 --> 00:01:25,520 softwares and you basically know 29 00:01:25,520 --> 00:01:29,640 it so this is the usual devops symb you 30 00:01:29,640 --> 00:01:32,680 have the Azure report for storing the 31 00:01:32,680 --> 00:01:35,920 source code you have Azure pipeline for 32 00:01:35,920 --> 00:01:38,360 the pipeline and the tasks you have 33 00:01:38,360 --> 00:01:40,680 something called Azure boards where you 34 00:01:40,680 --> 00:01:44,960 can create the work items uh bugs or 35 00:01:44,960 --> 00:01:47,399 Sprints and so on you have something 36 00:01:47,399 --> 00:01:49,280 called the Azure artifacts when you 37 00:01:49,280 --> 00:01:51,719 build your software uh you basically 38 00:01:51,719 --> 00:01:53,880 create an artifact or you want to use 39 00:01:53,880 --> 00:01:56,119 third party libraries that will fall 40 00:01:56,119 --> 00:01:58,360 into these artifacts as 41 00:01:58,360 --> 00:02:01,320 well and one more thing is azure test 42 00:02:01,320 --> 00:02:03,960 plans that's where you can create and 43 00:02:03,960 --> 00:02:06,798 manage your test 44 00:02:07,039 --> 00:02:09,959 plans so just a very quick high level 45 00:02:09,959 --> 00:02:13,160 overview once you register Azure devops 46 00:02:13,160 --> 00:02:15,800 you will create an organization but 47 00:02:15,800 --> 00:02:17,840 later you can create more organizations 48 00:02:17,840 --> 00:02:20,480 as well within an organization you will 49 00:02:20,480 --> 00:02:23,360 create project and agent pools and 50 00:02:23,360 --> 00:02:26,040 groups so agent pool will contain all 51 00:02:26,040 --> 00:02:28,840 the agents where all the pipeline tasks 52 00:02:28,840 --> 00:02:30,319 will run 53 00:02:30,319 --> 00:02:32,200 the groups will contain obviously the 54 00:02:32,200 --> 00:02:34,760 users that you 55 00:02:34,760 --> 00:02:37,160 create So within the project you can 56 00:02:37,160 --> 00:02:39,120 create one more more repositories and 57 00:02:39,120 --> 00:02:41,440 one or more pipelines and you can have 58 00:02:41,440 --> 00:02:44,400 artifacts or 59 00:02:45,760 --> 00:02:48,200 feeds but there are other related 60 00:02:48,200 --> 00:02:51,800 Services that's not um built in or comes 61 00:02:51,800 --> 00:02:54,000 with Azure devops so you can buy the 62 00:02:54,000 --> 00:02:56,280 separately the first one is death test 63 00:02:56,280 --> 00:03:00,120 lab where you can scale and let your uh 64 00:03:00,120 --> 00:03:02,599 developers create their own machine 65 00:03:02,599 --> 00:03:04,400 where you can test your 66 00:03:04,400 --> 00:03:07,879 application the second one is Dev box 67 00:03:07,879 --> 00:03:11,519 where you can have your um viral machine 68 00:03:11,519 --> 00:03:14,560 for the developer with all the idees and 69 00:03:14,560 --> 00:03:16,760 tools that needed for creating and 70 00:03:16,760 --> 00:03:18,920 developing a 71 00:03:18,920 --> 00:03:21,959 software also it's very uh or highly 72 00:03:21,959 --> 00:03:23,959 recommended to integrate Azure devops 73 00:03:23,959 --> 00:03:26,400 with Azure active directory because it 74 00:03:26,400 --> 00:03:29,200 will come depending on your license but 75 00:03:29,200 --> 00:03:30,720 it will come 76 00:03:30,720 --> 00:03:33,040 with conditional access policy or 77 00:03:33,040 --> 00:03:36,040 privilege identity 78 00:03:36,159 --> 00:03:38,720 management and there is Defender for 79 00:03:38,720 --> 00:03:41,080 everything so devops is also not an 80 00:03:41,080 --> 00:03:43,159 exception so you will have something 81 00:03:43,159 --> 00:03:46,599 called Defender for devops that will um 82 00:03:46,599 --> 00:03:48,680 contain something like repository 83 00:03:48,680 --> 00:03:51,840 statistic infrastructure as as a as a 84 00:03:51,840 --> 00:03:54,959 code scanner credential scanner and all 85 00:03:54,959 --> 00:03:56,959 kinds of 86 00:03:56,959 --> 00:04:00,319 stuff and the last one is a keyword so 87 00:04:00,319 --> 00:04:02,720 if you don't want to use the buil-in uh 88 00:04:02,720 --> 00:04:05,159 secret Management in Azure devops you 89 00:04:05,159 --> 00:04:07,680 can use key and reference the secrets 90 00:04:07,680 --> 00:04:10,079 from from 91 00:04:10,079 --> 00:04:12,720 there so before I continue and talk 92 00:04:12,720 --> 00:04:15,199 about the uh most of the security 93 00:04:15,199 --> 00:04:18,918 controls I just want to like break down 94 00:04:18,918 --> 00:04:21,399 to three things that you might see 95 00:04:21,399 --> 00:04:23,960 before uh when we are talking about 96 00:04:23,960 --> 00:04:27,639 devop security or pipeline security so 97 00:04:27,639 --> 00:04:29,199 the first one is Security in the 98 00:04:29,199 --> 00:04:32,199 pipeline it's when you when you make 99 00:04:32,199 --> 00:04:35,600 sure that what you create or or or build 100 00:04:35,600 --> 00:04:38,039 uh code it's secure so you put in the 101 00:04:38,039 --> 00:04:41,520 pipeline like um a credential scanner or 102 00:04:41,520 --> 00:04:43,880 something like that or a SAS 103 00:04:43,880 --> 00:04:46,919 tool while security of the pipeline is 104 00:04:46,919 --> 00:04:49,120 about securing the pipeline itself so 105 00:04:49,120 --> 00:04:53,080 you make sure that like there is no uh 106 00:04:53,080 --> 00:04:55,880 publicly available repository or not 107 00:04:55,880 --> 00:04:57,800 everyone can read the secrets and these 108 00:04:57,800 --> 00:05:00,320 kind of things and recent recently I saw 109 00:05:00,320 --> 00:05:03,000 the last one which is security around 110 00:05:03,000 --> 00:05:05,960 the pipeline so basically everything 111 00:05:05,960 --> 00:05:08,720 that connected and outside of the 112 00:05:08,720 --> 00:05:10,800 pipeline that will fall under this 113 00:05:10,800 --> 00:05:14,680 category so for example if you uh deploy 114 00:05:14,680 --> 00:05:17,120 your web application into Azure Cloud 115 00:05:17,120 --> 00:05:20,759 then it will fall this 116 00:05:21,240 --> 00:05:25,000 category so I will have a demo video as 117 00:05:25,000 --> 00:05:27,479 well um after I talked about all the 118 00:05:27,479 --> 00:05:29,840 security controls and we will see what 119 00:05:29,840 --> 00:05:32,199 could uh 120 00:05:32,199 --> 00:05:34,960 happen so the first thing is you want to 121 00:05:34,960 --> 00:05:37,520 authenticate and uh read your Azure 122 00:05:37,520 --> 00:05:41,720 devops so you will do this by opening 123 00:05:41,720 --> 00:05:44,800 the dev. azure.com your organization 124 00:05:44,800 --> 00:05:45,960 name that you 125 00:05:45,960 --> 00:05:48,759 created and it will be a username and a 126 00:05:48,759 --> 00:05:51,000 credential so that's why 127 00:05:51,000 --> 00:05:53,880 it's it's highly recommended to 128 00:05:53,880 --> 00:05:56,680 integrate with Azure ad because then you 129 00:05:56,680 --> 00:05:59,560 will have the conditional access policy 130 00:05:59,560 --> 00:06:03,560 so you can enforce for example multi 131 00:06:03,560 --> 00:06:07,560 authentication uh so we want to avoid 132 00:06:07,560 --> 00:06:09,400 password spray attacks or any Brute 133 00:06:09,400 --> 00:06:12,639 Force attacks or unauthorized access to 134 00:06:12,639 --> 00:06:17,639 our organization or projects or uh 135 00:06:17,639 --> 00:06:20,400 repositories so here you can see uh two 136 00:06:20,400 --> 00:06:22,440 screenshots the first one is a 137 00:06:22,440 --> 00:06:24,919 conditional access policy you have two 138 00:06:24,919 --> 00:06:28,440 options um in this picture you can see I 139 00:06:28,440 --> 00:06:30,960 selected apps so it's just one apps so 140 00:06:30,960 --> 00:06:33,800 you you basically can choose Azure 141 00:06:33,800 --> 00:06:36,160 devops itself but if you choose all 142 00:06:36,160 --> 00:06:38,280 Cloud apps then Azure devops will be 143 00:06:38,280 --> 00:06:41,000 included as well but this is just one 144 00:06:41,000 --> 00:06:44,199 part of the job because in Azure devops 145 00:06:44,199 --> 00:06:46,599 within the organization settings you 146 00:06:46,599 --> 00:06:50,280 will have to U enable the security 147 00:06:50,280 --> 00:06:53,000 policy that says enable Azure active 148 00:06:53,000 --> 00:06:56,120 directory conditional access policy 149 00:06:56,120 --> 00:07:00,639 validation otherwise it won't work 150 00:07:00,639 --> 00:07:02,840 so the next things once you once you log 151 00:07:02,840 --> 00:07:05,919 in we want to allow people to do things 152 00:07:05,919 --> 00:07:06,879 there will 153 00:07:06,879 --> 00:07:09,840 be basically at any level or any 154 00:07:09,840 --> 00:07:12,360 component there will be a security tab 155 00:07:12,360 --> 00:07:15,160 so for example for project pipelines 156 00:07:15,160 --> 00:07:18,000 agent secrets so you can set who can 157 00:07:18,000 --> 00:07:21,400 read it uh write it modify it or delete 158 00:07:21,400 --> 00:07:22,759 it and so 159 00:07:22,759 --> 00:07:26,039 on but also like which pipeline can 160 00:07:26,039 --> 00:07:27,400 access which 161 00:07:27,400 --> 00:07:30,840 agent the next is privilege identity 162 00:07:30,840 --> 00:07:34,199 management so if you have a higher role 163 00:07:34,199 --> 00:07:36,080 for example the project collection 164 00:07:36,080 --> 00:07:37,759 administrator 165 00:07:37,759 --> 00:07:41,680 group then you can make sure that um you 166 00:07:41,680 --> 00:07:43,879 can use with with the privilege identity 167 00:07:43,879 --> 00:07:46,520 management so the user has to log into 168 00:07:46,520 --> 00:07:49,680 Azure portal and activate the role so it 169 00:07:49,680 --> 00:07:52,039 will be approved by for example two 170 00:07:52,039 --> 00:07:53,759 other 171 00:07:53,759 --> 00:07:57,120 people there is a role in Azure active 172 00:07:57,120 --> 00:07:58,800 directory called Azure devops 173 00:07:58,800 --> 00:07:59,960 administrator 174 00:07:59,960 --> 00:08:03,560 if you give this role to someone in aure 175 00:08:03,560 --> 00:08:05,960 devops then you will have additional 176 00:08:05,960 --> 00:08:08,720 settings that you can configure um I 177 00:08:08,720 --> 00:08:11,280 will have a screenshot for 178 00:08:11,280 --> 00:08:15,159 that so again we want to uh avoid an 179 00:08:15,159 --> 00:08:18,440 authorized access on different level so 180 00:08:18,440 --> 00:08:21,319 if you have a very sensitive source code 181 00:08:21,319 --> 00:08:23,919 or or pipeline you don't want to share 182 00:08:23,919 --> 00:08:26,759 the same agent with the less sensitive 183 00:08:26,759 --> 00:08:29,560 one because sometimes there can be a 184 00:08:29,560 --> 00:08:32,679 escalation pass or someone could inject 185 00:08:32,679 --> 00:08:35,919 a malicious code or just steal a source 186 00:08:35,919 --> 00:08:38,958 code from a different 187 00:08:39,958 --> 00:08:43,599 project uh hopefully you can see so this 188 00:08:43,599 --> 00:08:46,080 is the the permission TP with all the 189 00:08:46,080 --> 00:08:49,680 buil-in groups it's fairly well 190 00:08:49,680 --> 00:08:51,800 separated but you can create your own 191 00:08:51,800 --> 00:08:56,240 one this is an example for the project 192 00:08:56,240 --> 00:08:59,519 uh security tab so you might see that uh 193 00:08:59,519 --> 00:09:03,000 the build administrator group can create 194 00:09:03,000 --> 00:09:05,600 contribute to the code for example but 195 00:09:05,600 --> 00:09:08,720 uh can't manage the 196 00:09:10,000 --> 00:09:13,360 permissions this is an example for the 197 00:09:13,360 --> 00:09:14,920 again the security for build 198 00:09:14,920 --> 00:09:18,680 administrator but this time it's a 199 00:09:18,680 --> 00:09:21,079 pipeline and because it's a build 200 00:09:21,079 --> 00:09:23,560 administrator the group will be able to 201 00:09:23,560 --> 00:09:26,120 modify create destroy pipelines and 202 00:09:26,120 --> 00:09:28,120 builds and so 203 00:09:28,120 --> 00:09:30,160 on 204 00:09:30,160 --> 00:09:32,959 this is the example using privilege 205 00:09:32,959 --> 00:09:35,920 identity management so you create a 206 00:09:35,920 --> 00:09:40,519 group you put the member it and you you 207 00:09:40,519 --> 00:09:45,000 don't uh enable the active assignment so 208 00:09:45,000 --> 00:09:48,560 you have to uh log into the portal and 209 00:09:48,560 --> 00:09:51,119 activate the 210 00:09:53,240 --> 00:09:56,959 RO yes so this is what you will see when 211 00:09:56,959 --> 00:09:59,680 you um add that as develops 212 00:09:59,680 --> 00:10:02,279 administrator role to a user so in the 213 00:10:02,279 --> 00:10:04,640 organization settings within active 214 00:10:04,640 --> 00:10:07,480 directory uh menu you will see and 215 00:10:07,480 --> 00:10:10,399 configure who can create additional 216 00:10:10,399 --> 00:10:13,680 organization or personal access token 217 00:10:13,680 --> 00:10:16,880 life cycle and so 218 00:10:17,640 --> 00:10:21,560 on so once we log in and we have uh some 219 00:10:21,560 --> 00:10:24,440 permission to do things uh first we will 220 00:10:24,440 --> 00:10:28,440 create the project so by default um you 221 00:10:28,440 --> 00:10:30,839 can't create public projects so you can 222 00:10:30,839 --> 00:10:33,200 only create private that's only 223 00:10:33,200 --> 00:10:36,360 accessible within the 224 00:10:39,120 --> 00:10:41,399 organization oh 225 00:10:41,399 --> 00:10:44,320 sorry so once you created the project 226 00:10:44,320 --> 00:10:46,959 you will create a repository we want to 227 00:10:46,959 --> 00:10:49,480 avoid unknown changes or unauthorized 228 00:10:49,480 --> 00:10:52,480 changes so uh with the unknown changes 229 00:10:52,480 --> 00:10:55,399 what I referring is that in Azure boards 230 00:10:55,399 --> 00:10:58,880 you can create work items and you can uh 231 00:10:58,880 --> 00:11:01,800 when when you do a modification you can 232 00:11:01,800 --> 00:11:04,839 link the work items to the PO request or 233 00:11:04,839 --> 00:11:07,839 other things so it can be enforce that 234 00:11:07,839 --> 00:11:10,160 there will be no changes that we don't 235 00:11:10,160 --> 00:11:12,480 know about and there is no um 236 00:11:12,480 --> 00:11:14,200 description of 237 00:11:14,200 --> 00:11:17,600 it also we want to avoid like um 238 00:11:17,600 --> 00:11:20,040 introducing uh back door code or 239 00:11:20,040 --> 00:11:23,120 stealing repository code or the the code 240 00:11:23,120 --> 00:11:25,920 from the repository or just have over 241 00:11:25,920 --> 00:11:29,760 permissive privileges because we I saw 242 00:11:29,760 --> 00:11:31,800 sometimes that companies have the policy 243 00:11:31,800 --> 00:11:35,519 that all the developers will have a read 244 00:11:35,519 --> 00:11:37,800 um access so they will be able to read 245 00:11:37,800 --> 00:11:40,680 and access all the 246 00:11:41,800 --> 00:11:45,000 repository so again we will have the uh 247 00:11:45,000 --> 00:11:48,560 usual Security Options and there is 248 00:11:48,560 --> 00:11:51,639 something called pipeline access so we 249 00:11:51,639 --> 00:11:53,720 want to make sure that only certain 250 00:11:53,720 --> 00:11:56,200 pipelines or just one or two pipelines 251 00:11:56,200 --> 00:11:58,720 that we created are able to access the 252 00:11:58,720 --> 00:12:00,680 rep repository 253 00:12:00,680 --> 00:12:03,000 itself there is something called commit 254 00:12:03,000 --> 00:12:05,880 auor email validation that will make 255 00:12:05,880 --> 00:12:10,240 sure that um once you configure git uh 256 00:12:10,240 --> 00:12:12,760 you add the email address and you can 257 00:12:12,760 --> 00:12:15,360 see which specific email address or 258 00:12:15,360 --> 00:12:20,199 email patterns uh who can uh commit the 259 00:12:20,199 --> 00:12:23,680 code and uh you can also create 260 00:12:23,680 --> 00:12:26,880 branches so this is the screenshot for 261 00:12:26,880 --> 00:12:29,519 uh the security tab 262 00:12:29,519 --> 00:12:31,920 and you can see this time this is the 263 00:12:31,920 --> 00:12:34,680 the contributors group so they can 264 00:12:34,680 --> 00:12:37,120 contribute and and add things to the 265 00:12:37,120 --> 00:12:39,480 code and the repository but again they 266 00:12:39,480 --> 00:12:41,639 can't manage the permission and the 267 00:12:41,639 --> 00:12:44,399 repository 268 00:12:44,399 --> 00:12:47,560 itself this is the pipeline permission 269 00:12:47,560 --> 00:12:50,920 this will um say which pipeline can 270 00:12:50,920 --> 00:12:54,760 access which uh or this in this case uh 271 00:12:54,760 --> 00:12:57,040 which pipeline can access the repository 272 00:12:57,040 --> 00:13:00,199 itself uh so we with the three dots in 273 00:13:00,199 --> 00:13:02,160 the screenshot you will have the option 274 00:13:02,160 --> 00:13:04,880 for Open Access that will allow all the 275 00:13:04,880 --> 00:13:07,480 pipeline to access this repository by 276 00:13:07,480 --> 00:13:11,959 the plus sign uh you can choose one by 277 00:13:13,360 --> 00:13:17,639 one here you can see on the uh the 278 00:13:17,639 --> 00:13:19,880 repository the commit auor email 279 00:13:19,880 --> 00:13:22,040 validation so you have to enable the 280 00:13:22,040 --> 00:13:26,360 repository policy and then uh Define the 281 00:13:26,360 --> 00:13:30,760 the pattern for the email address 282 00:13:31,000 --> 00:13:32,519 so once you have repositories you 283 00:13:32,519 --> 00:13:34,839 usually create some uh 284 00:13:34,839 --> 00:13:37,720 branches um here we have the options for 285 00:13:37,720 --> 00:13:40,240 peer reviews uh link work items and 286 00:13:40,240 --> 00:13:41,240 branch 287 00:13:41,240 --> 00:13:43,440 controls 288 00:13:43,440 --> 00:13:46,600 um so here in the branch policy you will 289 00:13:46,600 --> 00:13:50,680 see hopefully that the the recommended 290 00:13:50,680 --> 00:13:54,519 reviewers are at least two and whoever 291 00:13:54,519 --> 00:13:56,560 uh makes the request shouldn't be able 292 00:13:56,560 --> 00:13:58,959 to approve itself so there should be 293 00:13:58,959 --> 00:14:01,480 additional two people who can approve it 294 00:14:01,480 --> 00:14:05,040 and the second option is U check for L 295 00:14:05,040 --> 00:14:08,839 linked work items so this is once you 296 00:14:08,839 --> 00:14:12,519 created a work item in Azure boards then 297 00:14:12,519 --> 00:14:15,800 you can link the work item so you will 298 00:14:15,800 --> 00:14:19,680 already have a description and um and 299 00:14:19,680 --> 00:14:22,160 text what will be the changes and who 300 00:14:22,160 --> 00:14:24,719 will do the 301 00:14:25,639 --> 00:14:28,560 changes so here you can see the example 302 00:14:28,560 --> 00:14:31,160 that but there is a work item it's uh in 303 00:14:31,160 --> 00:14:35,320 the right uh corner it's task 304 00:14:35,320 --> 00:14:40,199 seven that's um connected or or be it's 305 00:14:40,199 --> 00:14:44,480 there and it uh waits for two reviewers 306 00:14:44,480 --> 00:14:47,959 to review and approve it so otherwise 307 00:14:47,959 --> 00:14:51,920 the two the request and the merge won't 308 00:14:51,920 --> 00:14:53,920 uh be 309 00:14:53,920 --> 00:14:56,560 made so once you have the uh 310 00:14:56,560 --> 00:14:59,320 repositories and pipelines sorry the the 311 00:14:59,320 --> 00:15:01,800 branches you create pipelines to 312 00:15:01,800 --> 00:15:04,519 actually build your code you have two 313 00:15:04,519 --> 00:15:06,560 options the build and the release 314 00:15:06,560 --> 00:15:09,880 pipeline that's basically the CI and cd 315 00:15:09,880 --> 00:15:12,399 part uh for both of them you have the 316 00:15:12,399 --> 00:15:16,279 option for uh be a classical or yo based 317 00:15:16,279 --> 00:15:19,079 the classical is where in the web UI you 318 00:15:19,079 --> 00:15:21,480 click through and click what are the 319 00:15:21,480 --> 00:15:24,320 steps while the Y you actually type the 320 00:15:24,320 --> 00:15:27,079 code and by default now the classic 321 00:15:27,079 --> 00:15:30,599 build is disabled 322 00:15:31,240 --> 00:15:33,959 so for the pipelines uh there are a 323 00:15:33,959 --> 00:15:36,759 couple of things u i collected the first 324 00:15:36,759 --> 00:15:38,560 one is argument 325 00:15:38,560 --> 00:15:41,839 injection so you can have something like 326 00:15:41,839 --> 00:15:45,000 um in a pipeline step that you step into 327 00:15:45,000 --> 00:15:47,079 a directory and you will give the the 328 00:15:47,079 --> 00:15:50,519 directory name as an argument but um you 329 00:15:50,519 --> 00:15:53,399 can add additional codes and it will uh 330 00:15:53,399 --> 00:15:55,759 behave like SQL injection or command 331 00:15:55,759 --> 00:15:57,600 injection as 332 00:15:57,600 --> 00:16:01,079 well um you can do privilege escalation 333 00:16:01,079 --> 00:16:05,160 uh through pipeline or exfiltrate data 334 00:16:05,160 --> 00:16:06,880 or sometimes you don't want to 335 00:16:06,880 --> 00:16:08,079 automatically 336 00:16:08,079 --> 00:16:10,880 build and um you want to make sure that 337 00:16:10,880 --> 00:16:13,360 only it's either in business hours that 338 00:16:13,360 --> 00:16:15,079 the build happens or out of business 339 00:16:15,079 --> 00:16:18,399 hour so you don't mess uh anything up 340 00:16:18,399 --> 00:16:20,600 and we want to avoid introducing any 341 00:16:20,600 --> 00:16:22,800 malicious 342 00:16:22,800 --> 00:16:26,240 steps so instead of using arguments we 343 00:16:26,240 --> 00:16:27,759 can use something called runtime 344 00:16:27,759 --> 00:16:29,759 parameters in the next slide I will have 345 00:16:29,759 --> 00:16:34,000 a an example for this you can also have 346 00:16:34,000 --> 00:16:37,839 approvals so there will be pre approvals 347 00:16:37,839 --> 00:16:42,319 like two P who can approve the actual 348 00:16:42,319 --> 00:16:44,680 deployment the other thing is manual 349 00:16:44,680 --> 00:16:46,880 validation or intervention based on the 350 00:16:46,880 --> 00:16:50,759 pipeline type um that basically will 351 00:16:50,759 --> 00:16:53,120 what will happen is you have to log 352 00:16:53,120 --> 00:16:55,959 Azure devops and go to the pipeline and 353 00:16:55,959 --> 00:16:57,480 click on 354 00:16:57,480 --> 00:16:59,440 continue you have something called 355 00:16:59,440 --> 00:17:02,440 Branch control that will make that will 356 00:17:02,440 --> 00:17:05,919 say that only from certain Branch or 357 00:17:05,919 --> 00:17:07,880 branches that you are allowed to make 358 00:17:07,880 --> 00:17:10,079 the 359 00:17:10,880 --> 00:17:13,240 deployment so here is the example for 360 00:17:13,240 --> 00:17:14,439 the runtime 361 00:17:14,439 --> 00:17:19,000 parameter uh so it's a y based pipeline 362 00:17:19,000 --> 00:17:22,280 example um the parameter name image 363 00:17:22,280 --> 00:17:24,679 which is uh a string type so it can't be 364 00:17:24,679 --> 00:17:25,679 any 365 00:17:25,679 --> 00:17:29,039 numbers and it has three values only 366 00:17:29,039 --> 00:17:30,960 if you don't give any value then it will 367 00:17:30,960 --> 00:17:33,679 be the default value of one to 368 00:17:33,679 --> 00:17:36,799 latest so you can't you know Mass it up 369 00:17:36,799 --> 00:17:39,120 and and gave any other values because it 370 00:17:39,120 --> 00:17:42,080 won't be accepted and uh on the bottom 371 00:17:42,080 --> 00:17:45,120 of the picture you can see it's um the 372 00:17:45,120 --> 00:17:48,160 dollar sign and the two curly brackets 373 00:17:48,160 --> 00:17:50,520 how it's 374 00:17:51,280 --> 00:17:54,200 used this is just a screenshot for man 375 00:17:54,200 --> 00:17:57,080 manual validation and 376 00:17:57,080 --> 00:18:00,120 intervention here you you can see for 377 00:18:00,120 --> 00:18:03,080 the the release pipeline that there is a 378 00:18:03,080 --> 00:18:04,159 predeployment 379 00:18:04,159 --> 00:18:06,960 approvals again it's uh we usually 380 00:18:06,960 --> 00:18:10,520 recommend two people and again the 381 00:18:10,520 --> 00:18:12,559 requestor shouldn't be able to approve 382 00:18:12,559 --> 00:18:13,240 their 383 00:18:13,240 --> 00:18:16,520 own uh 384 00:18:17,000 --> 00:18:20,080 deployment so once you use pipelines you 385 00:18:20,080 --> 00:18:22,960 usually uh have to use or want to use 386 00:18:22,960 --> 00:18:25,440 Secrets the buildin solution is uh 387 00:18:25,440 --> 00:18:27,559 Library within the library called 388 00:18:27,559 --> 00:18:28,840 variable groups 389 00:18:28,840 --> 00:18:32,600 you can have secrets or files and again 390 00:18:32,600 --> 00:18:34,559 uh the secrets have the permission or 391 00:18:34,559 --> 00:18:37,840 security Tab and you can also choose and 392 00:18:37,840 --> 00:18:40,600 customize or make sure which pipeline or 393 00:18:40,600 --> 00:18:43,840 which agent or even which user can read 394 00:18:43,840 --> 00:18:45,960 or access the secret 395 00:18:45,960 --> 00:18:48,559 itself and if you don't want to use this 396 00:18:48,559 --> 00:18:52,400 then you have the option to use keyword 397 00:18:52,400 --> 00:18:55,440 integration um basically you will be 398 00:18:55,440 --> 00:18:57,559 referencing the secrets from the keyword 399 00:18:57,559 --> 00:19:00,360 so you will have auditing and Central 400 00:19:00,360 --> 00:19:03,960 management and rotation from 401 00:19:03,960 --> 00:19:08,440 there I just wanted to uh say two things 402 00:19:08,440 --> 00:19:10,240 um because I've seen this a couple of 403 00:19:10,240 --> 00:19:13,960 times that gitops doesn't equal storing 404 00:19:13,960 --> 00:19:17,480 b64 encoded Secret in git so I had this 405 00:19:17,480 --> 00:19:20,480 before that uh company said like oh yeah 406 00:19:20,480 --> 00:19:22,480 we are using gitops I said all that's 407 00:19:22,480 --> 00:19:25,200 very cool and once I logged in and 408 00:19:25,200 --> 00:19:29,480 checked things I was like oh no um the 409 00:19:29,480 --> 00:19:32,600 other one is that's uh usually 410 00:19:32,600 --> 00:19:34,880 missed is that once you commit to the 411 00:19:34,880 --> 00:19:37,440 secret and then you remove it it will be 412 00:19:37,440 --> 00:19:39,919 still in the history so if you have the 413 00:19:39,919 --> 00:19:43,520 option to recreate it then it's good but 414 00:19:43,520 --> 00:19:45,720 at least you need to revoke and rotate 415 00:19:45,720 --> 00:19:47,880 the 416 00:19:48,440 --> 00:19:51,039 key so again we want to prevent reading 417 00:19:51,039 --> 00:19:54,559 Secrets by anyone or reading like uh 418 00:19:54,559 --> 00:19:56,760 devel de from the development 419 00:19:56,760 --> 00:19:58,880 environmental production Secret that 420 00:19:58,880 --> 00:20:01,919 because sometimes like um if for example 421 00:20:01,919 --> 00:20:04,600 if it's an Azure Cloud managed 422 00:20:04,600 --> 00:20:07,640 identity uh with over pery privileges 423 00:20:07,640 --> 00:20:11,120 then you can have a privilege 424 00:20:11,159 --> 00:20:14,000 escalation so here is the example for 425 00:20:14,000 --> 00:20:17,039 the secret if you are using a variable 426 00:20:17,039 --> 00:20:19,480 and you want to make it as a real secret 427 00:20:19,480 --> 00:20:22,320 and encrypted and masquerade then you 428 00:20:22,320 --> 00:20:25,760 will have to use the little 429 00:20:25,840 --> 00:20:29,000 icon so the first picture is the 430 00:20:29,000 --> 00:20:31,440 pipeline permission for the secret so 431 00:20:31,440 --> 00:20:34,640 which pipeline can access this secret so 432 00:20:34,640 --> 00:20:37,159 for example you don't want from the dev 433 00:20:37,159 --> 00:20:40,440 environment to access the production 434 00:20:40,440 --> 00:20:43,840 secrets and the next one next uh picture 435 00:20:43,840 --> 00:20:47,080 is just the usual 436 00:20:47,320 --> 00:20:50,559 security once you have the pipeline you 437 00:20:50,559 --> 00:20:53,520 want to run the actual steps so you will 438 00:20:53,520 --> 00:20:56,520 use agents but to use uh or create 439 00:20:56,520 --> 00:20:58,840 agents you first need to use or create 440 00:20:58,840 --> 00:21:01,200 the agent pool which is basically just a 441 00:21:01,200 --> 00:21:03,919 container you have two options one is 442 00:21:03,919 --> 00:21:06,200 hosted the other one is selfhosted the 443 00:21:06,200 --> 00:21:09,200 hosted is created and managed by Azure 444 00:21:09,200 --> 00:21:11,760 itself while the S hosted is created and 445 00:21:11,760 --> 00:21:14,320 managed by yourself so once you have for 446 00:21:14,320 --> 00:21:17,559 example a v machine you have to create a 447 00:21:17,559 --> 00:21:20,640 personal access token and then um 448 00:21:20,640 --> 00:21:23,400 install the agent and the agent it will 449 00:21:23,400 --> 00:21:26,159 communicate with Azure devops on TCP 450 00:21:26,159 --> 00:21:27,039 Port 451 00:21:27,039 --> 00:21:29,320 443 452 00:21:29,320 --> 00:21:31,520 uh it's important because um the hosted 453 00:21:31,520 --> 00:21:34,080 one is uh decomissioned and only very 454 00:21:34,080 --> 00:21:36,919 few tools are installed while your self 455 00:21:36,919 --> 00:21:40,799 hosted one it will leave as long as you 456 00:21:40,799 --> 00:21:43,400 are allow 457 00:21:44,720 --> 00:21:48,520 it so you want to make sure uh what I 458 00:21:48,520 --> 00:21:51,360 mentioned in the early earlier in the 459 00:21:51,360 --> 00:21:54,279 talk that you don't want to share the 460 00:21:54,279 --> 00:21:57,200 agents especially if it's a sensitive 461 00:21:57,200 --> 00:22:00,600 project because the agent um can access 462 00:22:00,600 --> 00:22:03,120 different pipelines and different uh 463 00:22:03,120 --> 00:22:05,120 repositories so if you have two 464 00:22:05,120 --> 00:22:07,039 different project there is no connection 465 00:22:07,039 --> 00:22:09,799 between them uh except the agent that's 466 00:22:09,799 --> 00:22:13,080 shared then you will be able to access 467 00:22:13,080 --> 00:22:15,200 for example the second project source 468 00:22:15,200 --> 00:22:17,480 code and steal all the 469 00:22:17,480 --> 00:22:20,400 files you have some permission uh here 470 00:22:20,400 --> 00:22:22,960 as well like who can create or delete 471 00:22:22,960 --> 00:22:27,039 the agent itself and also it's important 472 00:22:27,039 --> 00:22:28,559 also 473 00:22:28,559 --> 00:22:31,520 um it's enabled by default the updating 474 00:22:31,520 --> 00:22:33,720 the agent because there were some 475 00:22:33,720 --> 00:22:37,840 security issues already found in 476 00:22:37,960 --> 00:22:40,720 them so again uh we want to avoid 477 00:22:40,720 --> 00:22:42,840 stealing Source codes through agents or 478 00:22:42,840 --> 00:22:46,279 reading environment variables or service 479 00:22:46,279 --> 00:22:50,559 connections can I ask a question uh 480 00:22:50,559 --> 00:22:55,600 yes can you um drop the agents into uh 481 00:22:55,600 --> 00:22:56,960 stre 482 00:22:56,960 --> 00:22:59,559 groups 483 00:22:59,559 --> 00:23:01,480 no you repeat the question yeah so the 484 00:23:01,480 --> 00:23:04,320 question sorry so the question was um if 485 00:23:04,320 --> 00:23:07,640 I can U drop the agents into security 486 00:23:07,640 --> 00:23:10,400 groups um 487 00:23:10,400 --> 00:23:15,039 no as far as I I know it's no uh so we 488 00:23:15,039 --> 00:23:17,520 want to avoid and make sure that only 489 00:23:17,520 --> 00:23:20,440 the certain pipelines and the the 490 00:23:20,440 --> 00:23:22,919 necessary people are reading the secrets 491 00:23:22,919 --> 00:23:26,240 and nobody exploits our 492 00:23:26,240 --> 00:23:28,559 agents so this is the example when you 493 00:23:28,559 --> 00:23:31,760 create the agent pools there is one uh 494 00:23:31,760 --> 00:23:34,200 security configuration here it says 495 00:23:34,200 --> 00:23:36,840 Grant access permission to all pipelines 496 00:23:36,840 --> 00:23:39,440 we don't want that because then uh all 497 00:23:39,440 --> 00:23:42,159 the agents can be used by all the 498 00:23:42,159 --> 00:23:45,200 pipelines and it could go to privilege 499 00:23:45,200 --> 00:23:47,440 escalation and other 500 00:23:47,440 --> 00:23:52,400 stuff here within the uh agent pool 501 00:23:52,400 --> 00:23:54,120 within the settings you will see it's 502 00:23:54,120 --> 00:23:56,400 automatically enabled agent update 503 00:23:56,400 --> 00:24:00,360 settings so you shouldn't turn this 504 00:24:01,360 --> 00:24:05,600 off so once you build your uh software 505 00:24:05,600 --> 00:24:07,880 you will create artifact or if you want 506 00:24:07,880 --> 00:24:11,960 to use uh third party libraries or uh 507 00:24:11,960 --> 00:24:15,360 Registries that will call Upstream 508 00:24:15,360 --> 00:24:18,000 sources um but if you use your own 509 00:24:18,000 --> 00:24:20,720 internal version of the software or 510 00:24:20,720 --> 00:24:22,919 package then it will be called feed and 511 00:24:22,919 --> 00:24:25,520 you can mix these things and here again 512 00:24:25,520 --> 00:24:29,480 you will have the permissions 513 00:24:29,480 --> 00:24:32,720 so I just um listed some of the attacks 514 00:24:32,720 --> 00:24:35,440 so confusion attack or poisoning attack 515 00:24:35,440 --> 00:24:40,200 or Hing attack and even typos sting 516 00:24:40,200 --> 00:24:43,559 attacks you will have two options to to 517 00:24:43,559 --> 00:24:47,520 prevent these attacks one is uh enabled 518 00:24:47,520 --> 00:24:49,480 by default it says additional 519 00:24:49,480 --> 00:24:53,080 protections when using public package 520 00:24:53,080 --> 00:24:55,399 Registries and the other one is when you 521 00:24:55,399 --> 00:24:59,640 create the feed you can um exclude uh 522 00:24:59,640 --> 00:25:02,600 the packages from common public 523 00:25:02,600 --> 00:25:05,799 resources um we have something called 524 00:25:05,799 --> 00:25:08,240 audit and loging by default it's turned 525 00:25:08,240 --> 00:25:11,000 off uh because it requires Azure active 526 00:25:11,000 --> 00:25:13,559 directory integration and only the 527 00:25:13,559 --> 00:25:15,240 organization owners and project 528 00:25:15,240 --> 00:25:19,039 collection admins um can look at these 529 00:25:19,039 --> 00:25:20,480 you have two options here once you 530 00:25:20,480 --> 00:25:23,640 enable it's audit log and audit stream 531 00:25:23,640 --> 00:25:25,919 the audit log is where you can scroll 532 00:25:25,919 --> 00:25:28,240 through in the web UI and see what 533 00:25:28,240 --> 00:25:31,520 happened like a pipeline were running or 534 00:25:31,520 --> 00:25:35,480 somebody uh deleted a secret and so on 535 00:25:35,480 --> 00:25:38,120 why the audit stream is to forwarding 536 00:25:38,120 --> 00:25:41,159 all the logs to an external loog system 537 00:25:41,159 --> 00:25:43,279 like 538 00:25:43,279 --> 00:25:45,520 sentina so we want this because of 539 00:25:45,520 --> 00:25:48,120 compliance and reasons or incidence 540 00:25:48,120 --> 00:25:50,000 response it's very helpful or just 541 00:25:50,000 --> 00:25:52,000 tracking 542 00:25:52,000 --> 00:25:54,360 changes um within the organization 543 00:25:54,360 --> 00:25:56,480 settings you will have to enable the log 544 00:25:56,480 --> 00:25:59,200 audit events in the security 545 00:25:59,200 --> 00:26:01,559 policies and this is how it will look 546 00:26:01,559 --> 00:26:03,120 like so you will have an additional 547 00:26:03,120 --> 00:26:06,639 auditing uh whenu 548 00:26:06,960 --> 00:26:09,880 options uh that's the last thing before 549 00:26:09,880 --> 00:26:13,159 the demo um you have Marketplace uh 550 00:26:13,159 --> 00:26:15,600 which is uh will allow you install 551 00:26:15,600 --> 00:26:18,880 extensions so like dashboard Widgets or 552 00:26:18,880 --> 00:26:22,080 additional uh build tasks and so on bad 553 00:26:22,080 --> 00:26:23,840 news is you can't turn this off good 554 00:26:23,840 --> 00:26:26,039 news is only the project collection 555 00:26:26,039 --> 00:26:28,960 administrator group members can uh 556 00:26:28,960 --> 00:26:31,039 install it 557 00:26:31,039 --> 00:26:33,679 it because these uh extensions are 558 00:26:33,679 --> 00:26:36,200 developed by third party uh people or 559 00:26:36,200 --> 00:26:38,200 companies you can easily install 560 00:26:38,200 --> 00:26:40,720 malicious or vulnerable 561 00:26:40,720 --> 00:26:43,520 extension and there was a small research 562 00:26:43,520 --> 00:26:46,640 about this uh by Jesse who found more 563 00:26:46,640 --> 00:26:47,520 than 564 00:26:47,520 --> 00:26:52,520 1,400 extensions for the pipeline and uh 565 00:26:52,520 --> 00:26:55,000 basically half of them had one or more 566 00:26:55,000 --> 00:26:59,240 vulnerabilities or vulnerable dependence 567 00:26:59,240 --> 00:27:01,840 is this is just an example that you can 568 00:27:01,840 --> 00:27:04,000 install or 569 00:27:04,000 --> 00:27:07,120 disable the option the only option I 570 00:27:07,120 --> 00:27:10,080 found is um in the pipeline settings you 571 00:27:10,080 --> 00:27:12,799 can disable Marketplace test so in the 572 00:27:12,799 --> 00:27:14,799 pipeline what's installed you won't be 573 00:27:14,799 --> 00:27:16,440 able to use 574 00:27:16,440 --> 00:27:20,679 them and I have a demo 575 00:27:24,600 --> 00:27:26,520 [Music] 576 00:27:26,520 --> 00:27:29,520 with 577 00:27:36,960 --> 00:27:39,360 so what you will see here is uh I will 578 00:27:39,360 --> 00:27:42,919 log in as infrastruct hopefully you will 579 00:27:42,919 --> 00:27:45,799 see infrastructure is a code developer 580 00:27:45,799 --> 00:27:48,360 and I can only create you know terraform 581 00:27:48,360 --> 00:27:50,840 codes and uh create the 582 00:27:50,840 --> 00:27:52,799 infrastructure because there are three 583 00:27:52,799 --> 00:27:56,080 projects one is called infra a code and 584 00:27:56,080 --> 00:27:59,919 devop but Dev here in this case is and 585 00:27:59,919 --> 00:28:02,120 the third one is Project 586 00:28:02,120 --> 00:28:05,640 two so in this infr a code I have two 587 00:28:05,640 --> 00:28:07,919 repositories and this 588 00:28:07,919 --> 00:28:10,840 repository is 589 00:28:10,840 --> 00:28:14,519 um about uh using terraform and I will 590 00:28:14,519 --> 00:28:17,720 do an argument injection so there is a 591 00:28:17,720 --> 00:28:20,840 step that says CD into the folder name 592 00:28:20,840 --> 00:28:24,399 and you can Define the fold Name by 593 00:28:24,399 --> 00:28:28,120 yourself so what will I do is I will 594 00:28:28,120 --> 00:28:31,120 uh step into the production or test 595 00:28:31,120 --> 00:28:35,279 folder but I also will because um an 596 00:28:35,279 --> 00:28:38,039 Azure credential is used I will also 597 00:28:38,039 --> 00:28:41,480 print out or double b64 and code the 598 00:28:41,480 --> 00:28:44,640 actual password otherwise it won't be uh 599 00:28:44,640 --> 00:28:46,800 seen in the 600 00:28:46,800 --> 00:28:49,080 [Music] 601 00:28:49,080 --> 00:28:52,120 output and I used C because this is a 602 00:28:52,120 --> 00:28:55,199 Windows selfhosted 603 00:28:56,399 --> 00:28:58,880 machine 604 00:28:58,880 --> 00:29:04,200 so here you will see the uh decoded 605 00:29:04,519 --> 00:29:10,039 password and I will log in uh to aure 606 00:29:10,399 --> 00:29:13,039 portal because we have the username and 607 00:29:13,039 --> 00:29:15,640 and also the password so I didn't edit 608 00:29:15,640 --> 00:29:17,840 the pipeline I only did an argument 609 00:29:17,840 --> 00:29:19,270 injection this 610 00:29:19,270 --> 00:29:21,720 [Music] 611 00:29:21,720 --> 00:29:25,960 time and because I'm very secate in area 612 00:29:25,960 --> 00:29:27,880 I forgot that uh it's it's an actual 613 00:29:27,880 --> 00:29:30,399 user and it's Azure portal and MFA is 614 00:29:30,399 --> 00:29:32,840 enabled so I have to go through this and 615 00:29:32,840 --> 00:29:35,200 we have to see this but if it's a 616 00:29:35,200 --> 00:29:36,200 managed 617 00:29:36,200 --> 00:29:38,760 identity where MFA is not enabled and 618 00:29:38,760 --> 00:29:41,799 not used then you are bypassing it and 619 00:29:41,799 --> 00:29:44,360 you can access it so in Azure portal I 620 00:29:44,360 --> 00:29:46,600 see this before as well that uh 621 00:29:46,600 --> 00:29:49,039 developers or users using automation 622 00:29:49,039 --> 00:29:51,240 accounts and they are hardcoding their 623 00:29:51,240 --> 00:29:53,840 own credentials I had this as well and I 624 00:29:53,840 --> 00:29:56,559 got access to multiple repositories and 625 00:29:56,559 --> 00:29:58,880 projects 626 00:29:58,880 --> 00:30:01,320 so before I continue with that there is 627 00:30:01,320 --> 00:30:03,679 a shared agent between project two that 628 00:30:03,679 --> 00:30:07,039 I don't have access and this uh infr 629 00:30:07,039 --> 00:30:10,399 code project and this time I have 630 00:30:10,399 --> 00:30:13,360 um um the permission to edit the 631 00:30:13,360 --> 00:30:16,480 pipeline and I will modify it no yes so 632 00:30:16,480 --> 00:30:18,240 basically what I'm doing is because it's 633 00:30:18,240 --> 00:30:22,279 a shared agent I will list what files 634 00:30:22,279 --> 00:30:24,799 are in the current directory and then I 635 00:30:24,799 --> 00:30:27,880 will go one level up and see what else 636 00:30:27,880 --> 00:30:28,720 is 637 00:30:28,720 --> 00:30:31,320 there and we will be able to see that 638 00:30:31,320 --> 00:30:36,158 there are three uh folders that's 639 00:30:37,279 --> 00:30:39,120 relevant and 640 00:30:39,120 --> 00:30:42,240 then um I make it short so I know that 641 00:30:42,240 --> 00:30:44,559 there is a secret do text file and I 642 00:30:44,559 --> 00:30:47,200 will get the content of the secret. text 643 00:30:47,200 --> 00:30:49,200 file which is in a different directory 644 00:30:49,200 --> 00:30:50,840 and a different 645 00:30:50,840 --> 00:30:54,080 project so here we can see I went one 646 00:30:54,080 --> 00:30:56,480 folder up and there are three folders 647 00:30:56,480 --> 00:30:58,840 and in folder one there is a secret text 648 00:30:58,840 --> 00:31:01,340 file and a source 649 00:31:01,340 --> 00:31:04,659 [Music] 650 00:31:05,080 --> 00:31:08,080 code and then at the 651 00:31:08,080 --> 00:31:10,639 end here here comes the secret which is 652 00:31:10,639 --> 00:31:14,120 a Devcon 31 653 00:31:14,720 --> 00:31:19,519 flag so now I will continue with the uh 654 00:31:19,519 --> 00:31:21,919 account itself so this will be a 655 00:31:21,919 --> 00:31:24,480 developer 656 00:31:24,600 --> 00:31:27,760 account and again so I'm logging into 657 00:31:27,760 --> 00:31:29,480 Azure devops and 658 00:31:29,480 --> 00:31:32,000 the conditional access validation is not 659 00:31:32,000 --> 00:31:35,480 enabled so MFA is not required and then 660 00:31:35,480 --> 00:31:38,039 Force this 661 00:31:38,890 --> 00:31:42,159 [Music] 662 00:31:42,279 --> 00:31:44,559 time and you can see there's a project 663 00:31:44,559 --> 00:31:46,600 tool that I have no access with 664 00:31:46,600 --> 00:31:48,360 infrastructure as a code 665 00:31:48,360 --> 00:31:51,240 developer here you might be able to see 666 00:31:51,240 --> 00:31:54,519 the secret. text file and again maybe 667 00:31:54,519 --> 00:31:56,320 it's not visible but it's the same Def 668 00:31:56,320 --> 00:31:59,210 concer One that we seen 669 00:31:59,210 --> 00:32:03,660 [Music] 670 00:32:04,240 --> 00:32:07,000 previously so here there is a pipeline 671 00:32:07,000 --> 00:32:10,440 step which uh uses a service connection 672 00:32:10,440 --> 00:32:13,679 uh that's a service princip for Azure 673 00:32:13,679 --> 00:32:18,480 cloud and the step is configured that 674 00:32:18,480 --> 00:32:21,720 the service principle ID and key can be 675 00:32:21,720 --> 00:32:25,840 used and called in the step so because 676 00:32:25,840 --> 00:32:27,720 I'm a developer and I have permission to 677 00:32:27,720 --> 00:32:32,039 edit the pipeline I will double base 64 678 00:32:32,039 --> 00:32:35,440 encode both the ID and the 679 00:32:35,440 --> 00:32:38,360 key and then I will at the end I will 680 00:32:38,360 --> 00:32:41,840 log in uh with the 681 00:32:42,200 --> 00:32:45,919 credential and this time I'm using uh 682 00:32:45,919 --> 00:32:48,760 hosted 683 00:32:50,100 --> 00:32:53,290 [Music] 684 00:32:55,360 --> 00:32:58,039 agent so it could be that even if I 685 00:32:58,039 --> 00:33:02,039 don't have access to read U the secret 686 00:33:02,039 --> 00:33:05,080 itself the pipeline will have access to 687 00:33:05,080 --> 00:33:08,600 read it and I have to double b 64 and 688 00:33:08,600 --> 00:33:11,240 code otherwise it won't be uh seen and 689 00:33:11,240 --> 00:33:13,679 displayed in the log you will just see 690 00:33:13,679 --> 00:33:15,919 like 691 00:33:18,810 --> 00:33:22,030 [Music] 692 00:33:24,679 --> 00:33:28,559 stars uh at button we will see two uh 693 00:33:28,559 --> 00:33:29,399 long 694 00:33:29,399 --> 00:33:31,919 strings uh unfortunately probably you 695 00:33:31,919 --> 00:33:34,080 can't see it but I will share the video 696 00:33:34,080 --> 00:33:36,600 itself and the slides are already 697 00:33:36,600 --> 00:33:40,639 uploaded to my uh GitHub 698 00:33:40,639 --> 00:33:43,960 repository so we will we can see here 699 00:33:43,960 --> 00:33:47,679 the this is the service principal ID and 700 00:33:47,679 --> 00:33:50,159 then the key which is basically the 701 00:33:50,159 --> 00:33:53,280 secret for the service uh 702 00:33:53,280 --> 00:33:55,960 [Music] 703 00:33:55,960 --> 00:33:57,880 principal 704 00:33:57,880 --> 00:34:00,080 and I have an additional credential for 705 00:34:00,080 --> 00:34:01,450 for the Azure Cloud 706 00:34:01,450 --> 00:34:05,880 [Music] 707 00:34:05,880 --> 00:34:08,399 environment so I just copy and paste the 708 00:34:08,399 --> 00:34:13,598 password and is the same ID and 709 00:34:13,880 --> 00:34:25,500 [Music] 710 00:34:25,879 --> 00:34:28,879 tenant 711 00:34:37,000 --> 00:34:40,199 so this is just a summary uh what 712 00:34:40,199 --> 00:34:43,520 happened um I'm short in time so I want 713 00:34:43,520 --> 00:34:45,879 go over uh this 714 00:34:45,879 --> 00:34:48,199 picture I just want to mention that I 715 00:34:48,199 --> 00:34:51,239 have like six 716 00:34:51,239 --> 00:34:53,879 slides uh about additional resources 717 00:34:53,879 --> 00:34:57,000 these are videos blog posts uh 718 00:34:57,000 --> 00:34:59,760 benchmarks and so on and even the last 719 00:34:59,760 --> 00:35:03,400 one is a Microsoft free um uh learning 720 00:35:03,400 --> 00:35:07,200 training how to use and how things 721 00:35:07,200 --> 00:35:10,000 works and that's it if you have any 722 00:35:10,000 --> 00:35:12,400 questions feel free to stop me or you 723 00:35:12,400 --> 00:35:15,079 can connect on X now or write me an 724 00:35:15,079 --> 00:35:17,480 email address write to my email address 725 00:35:17,480 --> 00:35:20,000 and the slide itself is already uploaded 726 00:35:20,000 --> 00:35:23,280 to that GitHub repository and I will 727 00:35:23,280 --> 00:35:24,960 share later the 728 00:35:24,960 --> 00:35:28,280 video Let's it 729 00:35:28,280 --> 00:35:31,280 than