1 00:00:00,599 --> 00:00:02,040 there are two industry professionals 2 00:00:02,040 --> 00:00:04,240 focusing in the devc Ops domain uh and 3 00:00:04,240 --> 00:00:06,040 today they're going to walk us through a 4 00:00:06,040 --> 00:00:08,119 comprehensive and practical introduction 5 00:00:08,119 --> 00:00:09,920 to securing container images with 6 00:00:09,920 --> 00:00:12,400 sigstore and cosign uh the title of the 7 00:00:12,400 --> 00:00:14,599 workshop is handson container image 8 00:00:14,599 --> 00:00:16,359 security mastering Sig store for 9 00:00:16,359 --> 00:00:18,800 unbreachable integrity please welcome 10 00:00:18,800 --> 00:00:21,119 Muhammad and say thank 11 00:00:21,119 --> 00:00:23,840 you m thanks for having 12 00:00:23,840 --> 00:00:26,640 us make sure yeah I know make sure you 13 00:00:26,640 --> 00:00:30,480 stay pretty close to the m 14 00:00:30,640 --> 00:00:33,280 well uh good afternoon good evening 15 00:00:33,280 --> 00:00:36,760 everyone thanks for joining us uh we are 16 00:00:36,760 --> 00:00:39,680 here to present uh our talk as well as 17 00:00:39,680 --> 00:00:42,559 workshop on Hands-On container security 18 00:00:42,559 --> 00:00:45,760 uh for those who we are like you know 19 00:00:45,760 --> 00:00:47,840 industry professions from clouds devops 20 00:00:47,840 --> 00:00:49,719 domain and we have been in this field 21 00:00:49,719 --> 00:00:54,160 for almost a decade and uh like you know 22 00:00:54,160 --> 00:00:56,680 we are going to talk about a different 23 00:00:56,680 --> 00:00:58,600 container security how we can breach and 24 00:00:58,600 --> 00:01:00,719 how we can like you know mitigate the 25 00:01:00,719 --> 00:01:03,120 breaches so but don't worry that isn't 26 00:01:03,120 --> 00:01:05,519 just another Cloud talk uh there are 27 00:01:05,519 --> 00:01:07,000 zero chance of frames so we'll try to 28 00:01:07,000 --> 00:01:10,960 stay above the fog here and um can I 29 00:01:10,960 --> 00:01:12,000 change 30 00:01:12,000 --> 00:01:16,680 the well who we are so yeah I'm a devops 31 00:01:16,680 --> 00:01:18,799 architect and I'm not her adviser and as 32 00:01:18,799 --> 00:01:21,799 well as speaker so I have uh delivered 33 00:01:21,799 --> 00:01:24,280 my talks at bunch of other conferences 34 00:01:24,280 --> 00:01:26,360 like starting from Boston Paris and as 35 00:01:26,360 --> 00:01:28,920 well as other uh places like the cube 36 00:01:28,920 --> 00:01:30,560 con Cloud native cloud 37 00:01:30,560 --> 00:01:33,000 and other conferences too um before we 38 00:01:33,000 --> 00:01:35,399 jump in um quick show up our hands how 39 00:01:35,399 --> 00:01:36,840 many of you are attending Devcon For the 40 00:01:36,840 --> 00:01:37,960 First 41 00:01:37,960 --> 00:01:40,720 Time cool how many of you are attending 42 00:01:40,720 --> 00:01:43,840 the phone for almost like like 5 years 43 00:01:43,840 --> 00:01:45,479 awesome for a 44 00:01:45,479 --> 00:01:47,600 decade oh 45 00:01:47,600 --> 00:01:49,840 cool well all righty all righty let's 46 00:01:49,840 --> 00:01:51,200 get 47 00:01:51,200 --> 00:01:54,200 started you want to 48 00:01:54,200 --> 00:01:56,680 go 49 00:01:56,680 --> 00:02:00,479 I'm go by so uh 50 00:02:00,479 --> 00:02:02,439 which as you can see a brief 51 00:02:02,439 --> 00:02:04,520 introduction there is cloud architect 52 00:02:04,520 --> 00:02:07,560 and speaker stuff so I'm actually mostly 53 00:02:07,560 --> 00:02:10,239 relying mostly to focus on supply chain 54 00:02:10,239 --> 00:02:12,560 security nowaday but initially I started 55 00:02:12,560 --> 00:02:14,480 as a develop engine and then move on 56 00:02:14,480 --> 00:02:17,480 into cloud and now mov into supply chain 57 00:02:17,480 --> 00:02:21,959 I have also been a speaker as well as 58 00:02:21,959 --> 00:02:23,720 co-chair on various technical 59 00:02:23,720 --> 00:02:26,400 conferences back in India and yeah 60 00:02:26,400 --> 00:02:29,040 that's a brief about me we will be uh 61 00:02:29,040 --> 00:02:31,480 going through uh container security 62 00:02:31,480 --> 00:02:35,599 starting from what is containers so uh 63 00:02:35,599 --> 00:02:39,720 basically if you have work 64 00:02:40,440 --> 00:02:45,480 with Okay okay so yeah do you want to no 65 00:02:45,480 --> 00:02:49,319 that's okay so uh basic basically U with 66 00:02:49,319 --> 00:02:51,680 the containers if you have work as work 67 00:02:51,680 --> 00:02:54,480 with any virtual machine be it virtual 68 00:02:54,480 --> 00:02:59,200 box or VMware you have been using some 69 00:02:59,200 --> 00:03:02,599 hypervisor is there but in those cases 70 00:03:02,599 --> 00:03:04,959 although those are also reusable and use 71 00:03:04,959 --> 00:03:06,920 use and throw resources but in those 72 00:03:06,920 --> 00:03:10,239 case you are your laptops or system 73 00:03:10,239 --> 00:03:12,720 resource is still blocked so there is 74 00:03:12,720 --> 00:03:15,599 another another level of hyper 75 00:03:15,599 --> 00:03:17,840 hypervisor which has been introduced 76 00:03:17,840 --> 00:03:19,959 with virtualization which is actually 77 00:03:19,959 --> 00:03:22,480 containers where which is also a form of 78 00:03:22,480 --> 00:03:25,840 Opera system a single container can have 79 00:03:25,840 --> 00:03:28,519 one operating system that that operating 80 00:03:28,519 --> 00:03:30,439 system will be using anything from 81 00:03:30,439 --> 00:03:33,000 microservices to API calls and those 82 00:03:33,000 --> 00:03:35,360 processes will be triggering trigger 83 00:03:35,360 --> 00:03:38,319 another another software application 84 00:03:38,319 --> 00:03:41,760 from it so this can be a a simple user 85 00:03:41,760 --> 00:03:45,120 user mode call and sometime it's also um 86 00:03:45,120 --> 00:03:47,879 trying to it can also make a colel Mode 87 00:03:47,879 --> 00:03:50,360 card but it depends on what kind of what 88 00:03:50,360 --> 00:03:53,400 kind of access and priv provided for to 89 00:03:53,400 --> 00:03:56,640 those containers so that's essentially 90 00:03:56,640 --> 00:03:58,599 is the basic of container for example 91 00:03:58,599 --> 00:04:02,760 the uh if you get the names from Dockers 92 00:04:02,760 --> 00:04:06,159 to kubernets these are essentially part 93 00:04:06,159 --> 00:04:09,280 of the containers life cycle the Dockers 94 00:04:09,280 --> 00:04:13,159 are the specifically containers which is 95 00:04:13,159 --> 00:04:17,560 used to intiate or initiate U new 96 00:04:17,560 --> 00:04:21,000 instances of containers and you can use 97 00:04:21,000 --> 00:04:23,840 container or orchestrator like cuber 98 00:04:23,840 --> 00:04:27,919 netics to deploy and also manage that uh 99 00:04:27,919 --> 00:04:30,039 that with with in a scale scalable 100 00:04:30,039 --> 00:04:33,120 forming so that scalability is the key 101 00:04:33,120 --> 00:04:36,199 when we talk about cuber netics but if 102 00:04:36,199 --> 00:04:38,560 we are just looking for having certain 103 00:04:38,560 --> 00:04:40,479 uh individual instance of operating 104 00:04:40,479 --> 00:04:43,440 system or system systems running there 105 00:04:43,440 --> 00:04:45,759 then we will be just focusing on Docker 106 00:04:45,759 --> 00:04:49,080 or related uh containers so key features 107 00:04:49,080 --> 00:04:51,000 of 108 00:04:51,000 --> 00:04:54,759 containers um so yeah key features of 109 00:04:54,759 --> 00:04:56,880 containers are as you understand it is 110 00:04:56,880 --> 00:05:00,360 isolation lightweight and consistency so 111 00:05:00,360 --> 00:05:02,720 essentially making it even light mode as 112 00:05:02,720 --> 00:05:06,320 it was with the virtual uh machine uh 113 00:05:06,320 --> 00:05:09,680 having more more focus on uh having the 114 00:05:09,680 --> 00:05:12,960 full instances but in terms of security 115 00:05:12,960 --> 00:05:16,440 this actually helps to to start with a 116 00:05:16,440 --> 00:05:19,560 base instance and then you can initiate 117 00:05:19,560 --> 00:05:21,639 That Base instance with that base 118 00:05:21,639 --> 00:05:24,440 instance or the B based base container 119 00:05:24,440 --> 00:05:25,880 won't be any and won't be having 120 00:05:25,880 --> 00:05:28,000 anything and we call those as base 121 00:05:28,000 --> 00:05:30,400 images those base images can 122 00:05:30,400 --> 00:05:34,120 run with bare metal bare metal services 123 00:05:34,120 --> 00:05:36,319 and depending on the requirement of the 124 00:05:36,319 --> 00:05:40,120 application we can have ISC codes which 125 00:05:40,120 --> 00:05:43,000 can run over when whenever it is 126 00:05:43,000 --> 00:05:46,639 required so that's also making it very 127 00:05:46,639 --> 00:05:48,800 lightweight as well as running in the 128 00:05:48,800 --> 00:05:51,080 isolation because we will be having that 129 00:05:51,080 --> 00:05:54,280 those those containers running only for 130 00:05:54,280 --> 00:05:56,759 the VPC in which it is running or the 131 00:05:56,759 --> 00:05:58,720 network isolation it it will be running 132 00:05:58,720 --> 00:06:00,680 so we can have those Network isolation 133 00:06:00,680 --> 00:06:04,000 in our uh in inside our own operating 134 00:06:04,000 --> 00:06:07,039 system so based on of where on which 135 00:06:07,039 --> 00:06:09,240 Port we are running as well as you can 136 00:06:09,240 --> 00:06:11,759 attach it to your host as well as host 137 00:06:11,759 --> 00:06:13,560 IP address and it will be only running 138 00:06:13,560 --> 00:06:16,639 on those so you can actually com you can 139 00:06:16,639 --> 00:06:19,440 actually compart compartmentalize your 140 00:06:19,440 --> 00:06:22,840 uh your in your uh external network into 141 00:06:22,840 --> 00:06:25,960 internal Network to provide to splice 142 00:06:25,960 --> 00:06:30,039 the the uh the IP address uh uh IP 143 00:06:30,039 --> 00:06:33,000 address into multiple for running those 144 00:06:33,000 --> 00:06:36,240 Docker in your do container in your 145 00:06:36,240 --> 00:06:39,000 environment so that's pretty much is the 146 00:06:39,000 --> 00:06:42,039 basic of containers so there is a um the 147 00:06:42,039 --> 00:06:44,360 case study which we are discussing is 148 00:06:44,360 --> 00:06:48,160 very interesting with Docker Hub is one 149 00:06:48,160 --> 00:06:51,039 of the docker Hub is a container 150 00:06:51,039 --> 00:06:53,720 registry U when you talk about registry 151 00:06:53,720 --> 00:06:56,000 as in name register so what is the 152 00:06:56,000 --> 00:06:58,520 register in previous days register TR is 153 00:06:58,520 --> 00:07:01,599 was used to record something so you can 154 00:07:01,599 --> 00:07:03,879 you keep the record of whatever you want 155 00:07:03,879 --> 00:07:07,639 to use uh whatever you want to uh just 156 00:07:07,639 --> 00:07:10,520 just postpone for later time and those 157 00:07:10,520 --> 00:07:12,560 will be there in the registry so 158 00:07:12,560 --> 00:07:14,759 ultimately Docker Docker Hub is one of 159 00:07:14,759 --> 00:07:17,039 the container regist it will be having 160 00:07:17,039 --> 00:07:21,199 all the images with its resource details 161 00:07:21,199 --> 00:07:25,319 and those and so the case study which we 162 00:07:25,319 --> 00:07:28,680 are discussing is that how vulnerable 163 00:07:28,680 --> 00:07:32,520 are these container registry is so 164 00:07:32,520 --> 00:07:34,879 dockerhub is one of the one of the open 165 00:07:34,879 --> 00:07:36,199 source although there is a premium 166 00:07:36,199 --> 00:07:38,639 version but you can you can create your 167 00:07:38,639 --> 00:07:42,360 your own uh account for free and use it 168 00:07:42,360 --> 00:07:45,560 with this it is a very open environment 169 00:07:45,560 --> 00:07:49,080 where you can uh you can push your 170 00:07:49,080 --> 00:07:52,879 images on dockerhub and those images if 171 00:07:52,879 --> 00:07:56,000 it is um it's make a public you can have 172 00:07:56,000 --> 00:07:58,720 your public uh public it you can have it 173 00:07:58,720 --> 00:08:00,479 as a public as well as a private 174 00:08:00,479 --> 00:08:02,440 registry if you if it is a public 175 00:08:02,440 --> 00:08:05,400 registry then it's accessible to uh 176 00:08:05,400 --> 00:08:09,080 public so in 2023 this was a reiteration 177 00:08:09,080 --> 00:08:11,400 of another attack which happened in 20 178 00:08:11,400 --> 00:08:14,400 2016 a researcher actually found a 179 00:08:14,400 --> 00:08:17,080 thousand of images with the in the 180 00:08:17,080 --> 00:08:20,360 public in the docker Hub which actually 181 00:08:20,360 --> 00:08:22,840 was providing authenticated 182 00:08:22,840 --> 00:08:26,400 authenticated Keys as well as secrets so 183 00:08:26,400 --> 00:08:29,520 these this was this was due to the 184 00:08:29,520 --> 00:08:33,559 misconfiguration of um repository the 185 00:08:33,559 --> 00:08:35,958 basic the some of the Mis configuration 186 00:08:35,958 --> 00:08:38,360 can be with the rule set in in the 187 00:08:38,360 --> 00:08:41,320 docker Hub you you need to you need to 188 00:08:41,320 --> 00:08:45,600 have those um you need to have those um 189 00:08:45,600 --> 00:08:48,680 public registry being signed with uh 190 00:08:48,680 --> 00:08:51,040 with those public registry will be 191 00:08:51,040 --> 00:08:52,920 storing your images and those images 192 00:08:52,920 --> 00:08:55,000 need to be further having some 193 00:08:55,000 --> 00:08:57,399 recognition or some Integrity check if 194 00:08:57,399 --> 00:08:59,440 there is no Integrity check of those IM 195 00:08:59,440 --> 00:09:02,279 Imes then you can have those images just 196 00:09:02,279 --> 00:09:04,920 pulled by a Docker pull into your 197 00:09:04,920 --> 00:09:08,279 environment and you can just have some 198 00:09:08,279 --> 00:09:10,560 changes on those uh images and then push 199 00:09:10,560 --> 00:09:12,920 it because there is just a simple hash 200 00:09:12,920 --> 00:09:14,920 check which is uh which is not checking 201 00:09:14,920 --> 00:09:17,480 for the previous image is been is been 202 00:09:17,480 --> 00:09:21,079 Ted or match or not so we have to have 203 00:09:21,079 --> 00:09:24,760 that further further uh check for image 204 00:09:24,760 --> 00:09:28,200 tamper only then we can uh we can 205 00:09:28,200 --> 00:09:31,320 actually proceed to have the uh have the 206 00:09:31,320 --> 00:09:34,480 Safeguard to stop those these kind of 207 00:09:34,480 --> 00:09:36,800 this kind of Integrity uh Integrity 208 00:09:36,800 --> 00:09:40,120 problem so you as we understand a CIA is 209 00:09:40,120 --> 00:09:44,120 one of one of one of the uh one of the 210 00:09:44,120 --> 00:09:47,360 um Cornerstone is I so we have to have 211 00:09:47,360 --> 00:09:50,480 that Integrity Integrity of the of the 212 00:09:50,480 --> 00:09:54,560 environment as well so 213 00:09:57,640 --> 00:10:01,839 yeah uh so that's we have covered and 214 00:10:01,839 --> 00:10:04,560 yeah so these are the common containers 215 00:10:04,560 --> 00:10:08,240 which you can CH so I think we have also 216 00:10:08,240 --> 00:10:12,279 uh cover this and uh 217 00:10:12,279 --> 00:10:15,800 yeah so why we talk why we are talking 218 00:10:15,800 --> 00:10:17,800 about container security container 219 00:10:17,800 --> 00:10:21,880 security is will work just just like if 220 00:10:21,880 --> 00:10:24,720 you have if you have your your own 221 00:10:24,720 --> 00:10:29,839 laptop connected to your work WiFi 222 00:10:29,839 --> 00:10:31,920 although your work wi-fi is much very 223 00:10:31,920 --> 00:10:35,760 much secure but your laptop if it is not 224 00:10:35,760 --> 00:10:38,720 not doesn't have the provider security 225 00:10:38,720 --> 00:10:41,320 control having having a weak password as 226 00:10:41,320 --> 00:10:45,040 well as uh having is not using the VPN 227 00:10:45,040 --> 00:10:47,720 as well so in the remote environment we 228 00:10:47,720 --> 00:10:52,200 can have those aspects which we have to 229 00:10:52,200 --> 00:10:55,079 gain here the key aspects basically is 230 00:10:55,079 --> 00:10:58,360 the image security uh in the image 231 00:10:58,360 --> 00:11:01,079 security need to have the base image 232 00:11:01,079 --> 00:11:03,760 hygiene or hardening um as I was 233 00:11:03,760 --> 00:11:06,720 initially saying that the container 234 00:11:06,720 --> 00:11:10,800 images are build in are are need to be 235 00:11:10,800 --> 00:11:13,880 buil in from trusted source and those 236 00:11:13,880 --> 00:11:16,880 trusted and verified sources can be me 237 00:11:16,880 --> 00:11:20,160 uh Docker cont content trust or can be 238 00:11:20,160 --> 00:11:22,959 any trust repository or you have to have 239 00:11:22,959 --> 00:11:26,160 the have to have uh Trust of root of 240 00:11:26,160 --> 00:11:30,040 trust established for the image to be 241 00:11:30,040 --> 00:11:32,560 stored in the container so either you 242 00:11:32,560 --> 00:11:34,399 will be using a St store which will be 243 00:11:34,399 --> 00:11:36,360 verifying the images which you are 244 00:11:36,360 --> 00:11:38,440 pushing or you are you will be verifying 245 00:11:38,440 --> 00:11:40,720 first and then pushing it and then again 246 00:11:40,720 --> 00:11:42,399 in the pull you will be again verifying 247 00:11:42,399 --> 00:11:45,920 it so it can be either of the either of 248 00:11:45,920 --> 00:11:49,040 the points so uh similarly configuration 249 00:11:49,040 --> 00:11:52,279 management is one of the keys here so um 250 00:11:52,279 --> 00:11:54,279 secret management as well as a secure 251 00:11:54,279 --> 00:11:56,079 configuration secret management from 252 00:11:56,079 --> 00:12:00,240 having the secrets managed on the the uh 253 00:12:00,240 --> 00:12:03,480 on secret the the secrets can be so 254 00:12:03,480 --> 00:12:05,399 sometimes the misconfiguration which we 255 00:12:05,399 --> 00:12:07,760 had in the previous uh previous Slide 256 00:12:07,760 --> 00:12:11,079 the misconfiguration is mostly due to 257 00:12:11,079 --> 00:12:13,920 programmer a mistake or not 258 00:12:13,920 --> 00:12:16,880 understanding security uh security point 259 00:12:16,880 --> 00:12:19,160 of view of sensitive data so what 260 00:12:19,160 --> 00:12:20,839 exactly is sensitive information for 261 00:12:20,839 --> 00:12:22,920 that so maybe they understand that 262 00:12:22,920 --> 00:12:24,959 password is a sensitive sensitive 263 00:12:24,959 --> 00:12:28,120 information but maybe doesn't understand 264 00:12:28,120 --> 00:12:29,800 that uh 265 00:12:29,800 --> 00:12:33,920 uh get up secret or or just uh just API 266 00:12:33,920 --> 00:12:37,199 key is also a secret so these secret can 267 00:12:37,199 --> 00:12:39,920 be dang dangling on or can be put in on 268 00:12:39,920 --> 00:12:42,680 a Docker file or on any configuration 269 00:12:42,680 --> 00:12:45,760 management file sometime it is also just 270 00:12:45,760 --> 00:12:48,399 hardcoded there or provided as a 271 00:12:48,399 --> 00:12:51,760 environment file which can be retrieved 272 00:12:51,760 --> 00:12:55,320 if you pull your image and then uh from 273 00:12:55,320 --> 00:13:00,160 the image you are uh you are just uh 274 00:13:00,160 --> 00:13:01,880 when you are pulling the image when you 275 00:13:01,880 --> 00:13:04,760 you can find out the orchestrator conf 276 00:13:04,760 --> 00:13:07,240 information out of that and then based 277 00:13:07,240 --> 00:13:10,320 on the lateral movement of various 278 00:13:10,320 --> 00:13:13,440 lateral various lateral lateral lateral 279 00:13:13,440 --> 00:13:15,279 information which you can give gain from 280 00:13:15,279 --> 00:13:19,040 the images you can go for a container 281 00:13:19,040 --> 00:13:22,040 orchestrator attack where which which 282 00:13:22,040 --> 00:13:25,199 will be very critical to find these the 283 00:13:25,199 --> 00:13:26,959 secret as well as in the previous talk 284 00:13:26,959 --> 00:13:29,240 we have seen that there are tools which 285 00:13:29,240 --> 00:13:31,079 actually you have to run over the 286 00:13:31,079 --> 00:13:33,440 repository and they will just just dump 287 00:13:33,440 --> 00:13:36,440 you those Secrets U you can as you can 288 00:13:36,440 --> 00:13:39,800 also use truffle hog which is another 289 00:13:39,800 --> 00:13:43,079 open source so these are very critical 290 00:13:43,079 --> 00:13:45,199 points which you have to uh look for 291 00:13:45,199 --> 00:13:47,800 when whenever you are focusing on 292 00:13:47,800 --> 00:13:51,480 container security so that's pretty much 293 00:13:51,480 --> 00:13:54,240 it so the common vulnerabilities of the 294 00:13:54,240 --> 00:13:57,759 container environment is insecure 295 00:13:57,759 --> 00:13:59,680 container image and and then 296 00:13:59,680 --> 00:14:02,880 insufficient isolation in insecured 297 00:14:02,880 --> 00:14:05,639 default so insecure default is mainly 298 00:14:05,639 --> 00:14:08,399 the misconfiguration insecure container 299 00:14:08,399 --> 00:14:11,320 uh image is mainly targeting or pointing 300 00:14:11,320 --> 00:14:13,880 to the image Integrity so we will be 301 00:14:13,880 --> 00:14:16,959 focusing on in this workshop basally on 302 00:14:16,959 --> 00:14:19,160 that how uh the outdated or the 303 00:14:19,160 --> 00:14:21,560 vulnerable vulnerable software cont 304 00:14:21,560 --> 00:14:24,680 content including the binary which might 305 00:14:24,680 --> 00:14:28,000 be having known known security flaws can 306 00:14:28,000 --> 00:14:30,959 be detrimental for the 307 00:14:30,959 --> 00:14:33,959 en 308 00:14:44,759 --> 00:14:47,680 so well um continuing to it the common 309 00:14:47,680 --> 00:14:49,079 vulnerabilities in containerized 310 00:14:49,079 --> 00:14:52,120 environment so as my friend mentioned we 311 00:14:52,120 --> 00:14:53,920 have different images pulled and they 312 00:14:53,920 --> 00:14:57,480 compromised so let's say for example uh 313 00:14:57,480 --> 00:14:59,320 the hardcode secrets are there and again 314 00:14:59,320 --> 00:15:00,959 we have untrusted container uh 315 00:15:00,959 --> 00:15:03,000 Registries and insecure Communications 316 00:15:03,000 --> 00:15:05,360 so how are we going to handle this um 317 00:15:05,360 --> 00:15:06,800 how many of you are aware of the 318 00:15:06,800 --> 00:15:09,240 privilege access 319 00:15:09,240 --> 00:15:12,800 management well I got one so how are we 320 00:15:12,800 --> 00:15:15,759 going to handle the secret Keys stored 321 00:15:15,759 --> 00:15:19,120 password hardcoded passwords and uh 322 00:15:19,120 --> 00:15:21,720 let's say for example SSH keys so in 323 00:15:21,720 --> 00:15:24,199 that passion if I if I like to dwell 324 00:15:24,199 --> 00:15:26,839 towards the common vulnerabilities there 325 00:15:26,839 --> 00:15:30,480 we can have those in the environment and 326 00:15:30,480 --> 00:15:32,120 then retrieve from the environment 327 00:15:32,120 --> 00:15:35,240 whenever needed so let's say Hashi cop 328 00:15:35,240 --> 00:15:38,399 VA we have an apis correct so we can 329 00:15:38,399 --> 00:15:41,079 retrieve using those apis we can store 330 00:15:41,079 --> 00:15:43,639 them and we can like you know Implement 331 00:15:43,639 --> 00:15:46,519 a monitoring tool uh which can direct 332 00:15:46,519 --> 00:15:48,600 and redirect the uh suspicious 333 00:15:48,600 --> 00:15:50,240 activities and potential attacks what's 334 00:15:50,240 --> 00:15:53,160 going on and when coming to the insecure 335 00:15:53,160 --> 00:15:55,199 uh communication thing so probably we 336 00:15:55,199 --> 00:15:58,240 can have uh strict EDR tools where we 337 00:15:58,240 --> 00:16:01,399 can have uh any sort of uh attacks going 338 00:16:01,399 --> 00:16:03,759 on any sort of like you know uh uh 339 00:16:03,759 --> 00:16:05,959 errors or any sort of flaws coming in so 340 00:16:05,959 --> 00:16:07,639 that can alert your environment and an 341 00:16:07,639 --> 00:16:09,399 admin control so that's something you 342 00:16:09,399 --> 00:16:11,880 can have leveraged and you can take 343 00:16:11,880 --> 00:16:14,360 proactive steps before you uh like you 344 00:16:14,360 --> 00:16:17,880 know hit the production or development 345 00:16:18,040 --> 00:16:21,279 stage uh now the privilege escalation 346 00:16:21,279 --> 00:16:23,079 thing the most important thing we we can 347 00:16:23,079 --> 00:16:24,920 exploit and gain control and access to 348 00:16:24,920 --> 00:16:27,759 it so have like you know a use case with 349 00:16:27,759 --> 00:16:29,800 development team pull support popular 350 00:16:29,800 --> 00:16:32,399 image based from a public repository um 351 00:16:32,399 --> 00:16:34,720 and as well as a microservices so if at 352 00:16:34,720 --> 00:16:36,440 all if you have open and vulnerability 353 00:16:36,440 --> 00:16:39,480 syncr you can attackers can exploit it 354 00:16:39,480 --> 00:16:41,680 um and intercept uh and decrypt the 355 00:16:41,680 --> 00:16:43,560 sensitive information too so the 356 00:16:43,560 --> 00:16:46,399 commonly uh the common the company uses 357 00:16:46,399 --> 00:16:48,839 outdated uh sort of Docker like you know 358 00:16:48,839 --> 00:16:50,240 let's take an example Docker form with 359 00:16:50,240 --> 00:16:52,920 known vulnerabilities so how uh the 360 00:16:52,920 --> 00:16:54,399 attackers can exploit these 361 00:16:54,399 --> 00:16:56,800 vulnerabilities and take a control and 362 00:16:56,800 --> 00:16:59,160 orchestrator uh disrupting and deploying 363 00:16:59,160 --> 00:17:02,319 the malous containers and then also um 364 00:17:02,319 --> 00:17:05,000 like you know uh which can uh which can 365 00:17:05,000 --> 00:17:06,839 also control the plane very permissive 366 00:17:06,839 --> 00:17:09,439 and accessive controls so from The 367 00:17:09,439 --> 00:17:12,280 Insider perspective there are basic 368 00:17:12,280 --> 00:17:14,520 exploits as well as privilege exploits 369 00:17:14,520 --> 00:17:16,480 from the misconfiguration things so we 370 00:17:16,480 --> 00:17:18,439 deeply unauthorized containers and 371 00:17:18,439 --> 00:17:20,919 leading to the 372 00:17:21,720 --> 00:17:23,760 breaches and then coming to the 373 00:17:23,760 --> 00:17:26,480 mitigation strategies uh as you can see 374 00:17:26,480 --> 00:17:29,240 we have bunch of like uh a couple of 375 00:17:29,240 --> 00:17:30,960 listed out here so besides this I'm 376 00:17:30,960 --> 00:17:32,799 going to talk what's not on not in the 377 00:17:32,799 --> 00:17:35,520 pp deck so for example let's say you 378 00:17:35,520 --> 00:17:39,559 have uh a base image from the considered 379 00:17:39,559 --> 00:17:41,080 uh tested Source like an official 380 00:17:41,080 --> 00:17:43,720 repository so let's say you have to scan 381 00:17:43,720 --> 00:17:46,280 an image regularly scanning of image 382 00:17:46,280 --> 00:17:47,640 that keep that keeps you away from 383 00:17:47,640 --> 00:17:49,720 vulnerabilities and as well as tools 384 00:17:49,720 --> 00:17:52,200 like uh trivia and CA and another anchor 385 00:17:52,200 --> 00:17:53,720 tools where you can minimize attack 386 00:17:53,720 --> 00:17:56,880 surface so next coming uh to the uh 387 00:17:56,880 --> 00:18:00,440 other other medic strategies uh are like 388 00:18:00,440 --> 00:18:03,120 use minimal base images like Al to 389 00:18:03,120 --> 00:18:04,799 reduce the number of potential 390 00:18:04,799 --> 00:18:07,520 vulnerabilities um and also you can 391 00:18:07,520 --> 00:18:09,200 exclude unnecessary packages and tools 392 00:18:09,200 --> 00:18:11,120 from your image instead of having all 393 00:18:11,120 --> 00:18:13,919 those deployed in an environment um and 394 00:18:13,919 --> 00:18:16,600 then you can Implement least privileg uh 395 00:18:16,600 --> 00:18:19,200 role based access controls too um most 396 00:18:19,200 --> 00:18:21,799 of the things uh the secret management 397 00:18:21,799 --> 00:18:23,559 where you can store sensitive data and 398 00:18:23,559 --> 00:18:26,039 as well as the like you know uh a data 399 00:18:26,039 --> 00:18:29,200 where you can have passwords API key and 400 00:18:29,200 --> 00:18:31,440 as well as the certificate for the cuity 401 00:18:31,440 --> 00:18:33,480 secrets um you can have this 402 00:18:33,480 --> 00:18:36,280 environmental variables uh stored in a 403 00:18:36,280 --> 00:18:38,240 hardc sec code or a configuration files 404 00:18:38,240 --> 00:18:40,559 to and as I mentioned you can s in a w 405 00:18:40,559 --> 00:18:42,400 or any sort of dedicated watering system 406 00:18:42,400 --> 00:18:44,799 Technologies um then coming to the uh 407 00:18:44,799 --> 00:18:46,919 the service mesh so using a service mesh 408 00:18:46,919 --> 00:18:48,919 like uh there is a secure authenticated 409 00:18:48,919 --> 00:18:50,520 encrypted service mesh we have in the 410 00:18:50,520 --> 00:18:52,919 docker Hub so you can leverage that and 411 00:18:52,919 --> 00:18:54,880 have regular scanning and regular checks 412 00:18:54,880 --> 00:18:57,760 across your Docker images too um now 413 00:18:57,760 --> 00:18:59,520 implementing a runtime security so 414 00:18:59,520 --> 00:19:01,039 that's something a different thing uh 415 00:19:01,039 --> 00:19:02,720 where you can have SSD as well as the 416 00:19:02,720 --> 00:19:04,880 aqua security to monitor it uh if 417 00:19:04,880 --> 00:19:06,440 container activities are going beyond 418 00:19:06,440 --> 00:19:08,000 the thresholder capacity what you have 419 00:19:08,000 --> 00:19:10,240 set then you can Implement uh the 420 00:19:10,240 --> 00:19:11,880 vertical scaling as an horizontal 421 00:19:11,880 --> 00:19:14,480 scaling too where you can uh like you 422 00:19:14,480 --> 00:19:16,120 scale up the resources vertically based 423 00:19:16,120 --> 00:19:19,039 on the CPU memory and as well as um the 424 00:19:19,039 --> 00:19:20,520 storage limitations whatever you have 425 00:19:20,520 --> 00:19:23,080 set according to the prodction needs and 426 00:19:23,080 --> 00:19:24,880 the last thing is securely uh having the 427 00:19:24,880 --> 00:19:27,000 cicd pipelines there's another thing we 428 00:19:27,000 --> 00:19:28,799 can uh manage using the tools like J you 429 00:19:28,799 --> 00:19:33,640 can get lab Ci or Circle Ci or um um 430 00:19:33,640 --> 00:19:35,840 like you know Chef so with proper access 431 00:19:35,840 --> 00:19:37,799 controls everything can be managed and 432 00:19:37,799 --> 00:19:40,480 for the image signing St uh standpoint 433 00:19:40,480 --> 00:19:42,600 use image signing tools like notary or 434 00:19:42,600 --> 00:19:46,280 coign to verify the image signing 435 00:19:46,360 --> 00:19:49,880 Refractories yeah there's other thing uh 436 00:19:49,880 --> 00:19:51,320 as you can see there is a yaml script 437 00:19:51,320 --> 00:19:53,919 over there uh so the kubernetes SP what 438 00:19:53,919 --> 00:19:57,520 we have we are enforcing here with an uh 439 00:19:57,520 --> 00:20:01,080 isolation policy reforce isolation so 440 00:20:01,080 --> 00:20:03,640 once you define a part security policy 441 00:20:03,640 --> 00:20:07,080 um on the step four if you see I have 442 00:20:07,080 --> 00:20:09,200 restricted it to name and then I'm using 443 00:20:09,200 --> 00:20:11,080 a a privilege allowed privilege 444 00:20:11,080 --> 00:20:13,280 escalation to false and this is how like 445 00:20:13,280 --> 00:20:14,720 you know you can mitigate another sort 446 00:20:14,720 --> 00:20:17,360 of strategies 447 00:20:17,440 --> 00:20:19,880 too and then next for the insecure 448 00:20:19,880 --> 00:20:23,960 defaults um you can declare the uh API 449 00:20:23,960 --> 00:20:26,039 server settings where you can see name 450 00:20:26,039 --> 00:20:28,360 is secure API this is like you know a 451 00:20:28,360 --> 00:20:30,200 common like a friendly name I have given 452 00:20:30,200 --> 00:20:33,640 it there and then you can declare what 453 00:20:33,640 --> 00:20:35,400 arguments you are going to declare in 454 00:20:35,400 --> 00:20:38,280 that under the arguments variable and 455 00:20:38,280 --> 00:20:40,799 then you can have that particular part 456 00:20:40,799 --> 00:20:42,880 restricted to role based access controls 457 00:20:42,880 --> 00:20:45,840 whatever you defined in the uh rb. yaml 458 00:20:45,840 --> 00:20:47,440 file and then same thing you can 459 00:20:47,440 --> 00:20:49,159 restrict by using tlser as well as a 460 00:20:49,159 --> 00:20:51,520 private key too so based on tlser and 461 00:20:51,520 --> 00:20:53,559 the private key you can restrict the 462 00:20:53,559 --> 00:20:55,720 configuration of the kubernetes apis and 463 00:20:55,720 --> 00:21:00,600 as well as um doer images too 464 00:21:01,679 --> 00:21:03,880 uh coming to the rbac so how we can 465 00:21:03,880 --> 00:21:05,679 Implement rbac role based access 466 00:21:05,679 --> 00:21:08,799 controls so if you see um I have 467 00:21:08,799 --> 00:21:11,159 declared the the verbs and under the 468 00:21:11,159 --> 00:21:13,120 rules you see get watch list it's kind 469 00:21:13,120 --> 00:21:16,360 of a create update read and delete uh 470 00:21:16,360 --> 00:21:19,039 format so I have used a get watch and 471 00:21:19,039 --> 00:21:22,799 list friendly uh parameters so we can 472 00:21:22,799 --> 00:21:25,240 like you know have the access restricted 473 00:21:25,240 --> 00:21:27,039 and we can have a least privilege 474 00:21:27,039 --> 00:21:31,000 escalation uh least privilege um access 475 00:21:31,000 --> 00:21:33,120 to the users and then we can manage the 476 00:21:33,120 --> 00:21:36,159 uh like you know uh improper access 477 00:21:36,159 --> 00:21:38,400 controls and what are the best practices 478 00:21:38,400 --> 00:21:40,320 so let's s like use of minimal image 479 00:21:40,320 --> 00:21:42,840 space and and also resource quotas and 480 00:21:42,840 --> 00:21:44,400 limits for example let's say set your 481 00:21:44,400 --> 00:21:48,480 CPU and memory uh limits to prevent uh 482 00:21:48,480 --> 00:21:50,559 to prevent resource exhaustion attacks 483 00:21:50,559 --> 00:21:52,400 and then we can have also have the quota 484 00:21:52,400 --> 00:21:54,200 management like use kubernetes and as 485 00:21:54,200 --> 00:21:55,760 well as resource qua to limit the number 486 00:21:55,760 --> 00:21:57,960 of resources but we are we have an 487 00:21:57,960 --> 00:22:01,520 environment anomalies and and also uh 488 00:22:01,520 --> 00:22:03,600 regularly updating and patching um the 489 00:22:03,600 --> 00:22:06,750 base images and and application 490 00:22:06,750 --> 00:22:08,120 [Music] 491 00:22:08,120 --> 00:22:10,159 dependencies yeah here are the few 492 00:22:10,159 --> 00:22:12,360 action items we uh focusing on like 493 00:22:12,360 --> 00:22:15,320 let's say uh you can review uh Docker 494 00:22:15,320 --> 00:22:17,679 repositories for the misconfigurations 495 00:22:17,679 --> 00:22:19,400 on at least quarterly basis or 496 00:22:19,400 --> 00:22:21,600 periodically whatever you have and then 497 00:22:21,600 --> 00:22:24,159 you can Implement uh image management 498 00:22:24,159 --> 00:22:25,520 patches where you can have an 499 00:22:25,520 --> 00:22:28,600 authenticated uh images uh kind of let's 500 00:22:28,600 --> 00:22:30,440 say for example PDF you have password 501 00:22:30,440 --> 00:22:32,840 prot PDF to in a similar fashion you can 502 00:22:32,840 --> 00:22:34,919 have them like you know the the password 503 00:22:34,919 --> 00:22:37,279 prot as Implement similar incidents here 504 00:22:37,279 --> 00:22:39,600 in the images too and the last thing you 505 00:22:39,600 --> 00:22:41,760 can conduct regular security audits 506 00:22:41,760 --> 00:22:43,919 locks locks is all something like you 507 00:22:43,919 --> 00:22:46,840 know we can go go after and we canate uh 508 00:22:46,840 --> 00:22:48,360 resources and as well as for example 509 00:22:48,360 --> 00:22:49,880 let's say Splunk we have many other 510 00:22:49,880 --> 00:22:52,799 tools Splunk is just an 511 00:22:52,799 --> 00:22:56,799 example um what is image Integrity so 512 00:22:56,799 --> 00:22:58,320 image Integrity is something like you 513 00:22:58,320 --> 00:23:01,000 know know where we have accuracy 514 00:23:01,000 --> 00:23:03,559 consistency of data and as well as the 515 00:23:03,559 --> 00:23:05,400 in the context of cyber security and 516 00:23:05,400 --> 00:23:08,559 digital forensics um it's it involves 517 00:23:08,559 --> 00:23:11,120 ensuring that an image such as a digital 518 00:23:11,120 --> 00:23:14,320 video desk or a photo um has not been 519 00:23:14,320 --> 00:23:16,760 altered or tampered um and this creation 520 00:23:16,760 --> 00:23:18,919 is uh the creation and the data is not 521 00:23:18,919 --> 00:23:21,200 lost and it's verified uh until it's 522 00:23:21,200 --> 00:23:23,720 stored so hashing is another technique 523 00:23:23,720 --> 00:23:25,679 where you can have an image Integrity 524 00:23:25,679 --> 00:23:27,880 where uh one common method to verify 525 00:23:27,880 --> 00:23:30,960 image uh integrated through hashing is 526 00:23:30,960 --> 00:23:32,520 by generating a unique string of 527 00:23:32,520 --> 00:23:35,360 characters and then by comparing uh the 528 00:23:35,360 --> 00:23:37,919 hash current file with the uh hash of 529 00:23:37,919 --> 00:23:39,840 the original file like md5 some kind of 530 00:23:39,840 --> 00:23:41,760 stuff and then we can have the digital 531 00:23:41,760 --> 00:23:44,559 signatures too um where you can provide 532 00:23:44,559 --> 00:23:47,320 a way to verify uh verify the 533 00:23:47,320 --> 00:23:49,360 authenticity and integrity of the uh of 534 00:23:49,360 --> 00:23:51,760 an image and then metadata of an image 535 00:23:51,760 --> 00:23:54,080 is something where you can have uh 536 00:23:54,080 --> 00:23:55,799 transparency as well as like provide 537 00:23:55,799 --> 00:23:58,120 information about the images and and 538 00:23:58,120 --> 00:24:00,960 modif ification of History so this image 539 00:24:00,960 --> 00:24:02,440 can be signed with the private key and 540 00:24:02,440 --> 00:24:05,760 as well as uh anyone uh using uh the 541 00:24:05,760 --> 00:24:07,320 corresponding public key to verify that 542 00:24:07,320 --> 00:24:11,039 image too and integrity check tools uh 543 00:24:11,039 --> 00:24:12,600 coming to the tools with the specialized 544 00:24:12,600 --> 00:24:14,760 tools in the market so I I don't have 545 00:24:14,760 --> 00:24:17,120 any specific tool to go after but then 546 00:24:17,120 --> 00:24:18,760 you can use any whatever tool you want 547 00:24:18,760 --> 00:24:20,840 to and the software that can help 548 00:24:20,840 --> 00:24:23,360 monitor the image integr file is 549 00:24:23,360 --> 00:24:25,399 corruption unauthorized changes files 550 00:24:25,399 --> 00:24:26,679 where you can have another issues 551 00:24:26,679 --> 00:24:28,840 arising with uh handling the Integrity 552 00:24:28,840 --> 00:24:31,440 check checking 553 00:24:31,440 --> 00:24:33,840 tools so here are the few examples like 554 00:24:33,840 --> 00:24:36,640 can use cases for the image Integrity 555 00:24:36,640 --> 00:24:38,279 let's say uh you have an automobile 556 00:24:38,279 --> 00:24:40,120 industry where you have you need to Pro 557 00:24:40,120 --> 00:24:42,679 the firware updates let's say we have 558 00:24:42,679 --> 00:24:44,799 bunch of other organizations like Tesla 559 00:24:44,799 --> 00:24:47,880 so it completely runs on Nvidia chips 560 00:24:47,880 --> 00:24:49,880 and all so the firmware so when you push 561 00:24:49,880 --> 00:24:52,640 a firmware update it has vehicle control 562 00:24:52,640 --> 00:24:55,760 ecus and as well as over the a uh uh 563 00:24:55,760 --> 00:24:58,760 over the a updates so uh you you need to 564 00:24:58,760 --> 00:25:00,399 have you need to validate the Integrity 565 00:25:00,399 --> 00:25:03,240 for images with the with the SEC of 566 00:25:03,240 --> 00:25:05,360 practices and applying updates uh like 567 00:25:05,360 --> 00:25:07,039 you know regularly that can like help 568 00:25:07,039 --> 00:25:10,480 you uh uh like you know secure your 569 00:25:10,480 --> 00:25:12,840 images and then in the food food 570 00:25:12,840 --> 00:25:15,360 industry we have like you know let's we 571 00:25:15,360 --> 00:25:17,480 have secure securing the recipes and 572 00:25:17,480 --> 00:25:19,600 ingredient data for example let's in a 573 00:25:19,600 --> 00:25:22,159 KFC or ma McDonald's so we don't know 574 00:25:22,159 --> 00:25:24,279 the recipe of KFC yet right so the 575 00:25:24,279 --> 00:25:25,880 similar way so how are they trying to 576 00:25:25,880 --> 00:25:28,039 manage their data efficiently inside the 577 00:25:28,039 --> 00:25:30,200 data database so we need to have like 578 00:25:30,200 --> 00:25:32,279 CSD pipelines and a manufacturing 579 00:25:32,279 --> 00:25:33,360 software which can prevent the 580 00:25:33,360 --> 00:25:35,480 unauthorized data leaking out of their 581 00:25:35,480 --> 00:25:37,240 [Music] 582 00:25:37,240 --> 00:25:39,720 company um in the supply chain container 583 00:25:39,720 --> 00:25:41,600 industry firm uh there's another thing 584 00:25:41,600 --> 00:25:43,720 where we need to focus on where we have 585 00:25:43,720 --> 00:25:45,399 materials and loads of capacities coming 586 00:25:45,399 --> 00:25:48,159 in and out day in day out so how you how 587 00:25:48,159 --> 00:25:50,840 are you handling those data and then um 588 00:25:50,840 --> 00:25:52,480 how are you uh like you know taking the 589 00:25:52,480 --> 00:25:54,760 container meting a digital records of 590 00:25:54,760 --> 00:25:56,919 everything and being the making sure the 591 00:25:56,919 --> 00:25:58,760 containers are not compromised 592 00:25:58,760 --> 00:26:00,360 uh as long as like there is a flow of 593 00:26:00,360 --> 00:26:03,960 data so we have uh digital water mark 594 00:26:03,960 --> 00:26:04,960 digital water marking and the 595 00:26:04,960 --> 00:26:06,360 cryptographic hashing is another 596 00:26:06,360 --> 00:26:08,360 important technique where you can uh 597 00:26:08,360 --> 00:26:11,520 prevent this supply chain security uh uh 598 00:26:11,520 --> 00:26:13,760 supply chain container 599 00:26:13,760 --> 00:26:18,158 industry you want to go 600 00:26:28,110 --> 00:26:31,120 [Music] 601 00:26:31,120 --> 00:26:34,039 right 602 00:26:34,039 --> 00:26:36,000 right yeah 603 00:26:36,000 --> 00:26:39,919 so with the image image integ we 604 00:26:39,919 --> 00:26:42,600 understand that the understands uh the 605 00:26:42,600 --> 00:26:46,279 importance of Imaging integ uh six store 606 00:26:46,279 --> 00:26:48,480 is an organization which actually which 607 00:26:48,480 --> 00:26:51,440 is a open source project and they have 608 00:26:51,440 --> 00:26:55,399 provided a couple of tools which helps 609 00:26:55,399 --> 00:26:58,520 or focus on Improvement of security been 610 00:26:58,520 --> 00:27:02,760 securing these software supply chain and 611 00:27:02,760 --> 00:27:07,000 these tool essentially helps the same 612 00:27:07,000 --> 00:27:08,760 problems which we had in the image 613 00:27:08,760 --> 00:27:12,039 Integrity that the how to actually check 614 00:27:12,039 --> 00:27:14,240 uh how to check and as well as monitor 615 00:27:14,240 --> 00:27:17,640 verify the Integrity of image file 616 00:27:17,640 --> 00:27:19,440 whether the image has been tampered or 617 00:27:19,440 --> 00:27:21,679 changed or compromised in the flow of 618 00:27:21,679 --> 00:27:24,480 the thing so in the supply chain so the 619 00:27:24,480 --> 00:27:27,679 the basic the basic purpose is to enable 620 00:27:27,679 --> 00:27:31,440 security with just V and making it 621 00:27:31,440 --> 00:27:35,000 robust for by verifying 622 00:27:35,000 --> 00:27:37,320 authenticity and integrity of the 623 00:27:37,320 --> 00:27:41,559 software artifact be coming 624 00:27:41,559 --> 00:27:45,399 from as well as any 625 00:27:46,799 --> 00:27:53,760 other U so we have actually so the 626 00:27:53,760 --> 00:27:59,320 the so so this this this also enables to 627 00:27:59,320 --> 00:28:01,559 build a transparent uh increase the 628 00:28:01,559 --> 00:28:05,120 transparency so in case of transparency 629 00:28:05,120 --> 00:28:07,919 we talked about a public transparency 630 00:28:07,919 --> 00:28:11,159 log is provided by six stores which is 631 00:28:11,159 --> 00:28:14,440 which which employ a public Ledger and 632 00:28:14,440 --> 00:28:17,480 this Ledger is known as record so record 633 00:28:17,480 --> 00:28:20,720 is recording all the all the signed 634 00:28:20,720 --> 00:28:25,120 software artifacts uh doing uh doing so 635 00:28:25,120 --> 00:28:27,919 using which using which you can actually 636 00:28:27,919 --> 00:28:29,960 you using which you can actually make 637 00:28:29,960 --> 00:28:33,559 incident response as well as required 638 00:28:33,559 --> 00:28:36,840 required uh using which you can actually 639 00:28:36,840 --> 00:28:39,919 make uh make the response as well as 640 00:28:39,919 --> 00:28:44,240 make the uh required 641 00:28:44,240 --> 00:28:47,760 required required 642 00:28:47,820 --> 00:28:50,919 [Music] 643 00:28:50,919 --> 00:28:53,810 service so 644 00:28:53,810 --> 00:28:58,799 [Music] 645 00:28:59,200 --> 00:29:02,440 so so it has it it so for increas 646 00:29:02,440 --> 00:29:04,919 increasing transparency transparency the 647 00:29:04,919 --> 00:29:07,799 transparency log of dager provides it 648 00:29:07,799 --> 00:29:10,840 and for simplifying in so it also 649 00:29:10,840 --> 00:29:14,080 simplifies integration the because it's 650 00:29:14,080 --> 00:29:17,919 essentially provides uh the repos these 651 00:29:17,919 --> 00:29:20,880 the repos in in terms of images which 652 00:29:20,880 --> 00:29:23,200 you can pull and deploy in on on your 653 00:29:23,200 --> 00:29:27,320 own on your own environment and which so 654 00:29:27,320 --> 00:29:30,080 it all the signing activities are logged 655 00:29:30,080 --> 00:29:33,399 in one way or another which allows for 656 00:29:33,399 --> 00:29:36,279 better better image review as well as 657 00:29:36,279 --> 00:29:40,120 auditing and so uh the transparency 658 00:29:40,120 --> 00:29:41,960 transparency helps in verifying the 659 00:29:41,960 --> 00:29:44,880 history and image and uh image Integrity 660 00:29:44,880 --> 00:29:47,840 of the software artifacts so this will 661 00:29:47,840 --> 00:29:50,840 this also helps into tracing back the 662 00:29:50,840 --> 00:29:53,559 the discrepancy or issue which might 663 00:29:53,559 --> 00:29:56,320 which might be having having on multiple 664 00:29:56,320 --> 00:29:58,600 commits or multiple chain change of the 665 00:29:58,600 --> 00:30:05,840 images version um this also so also so 666 00:30:05,840 --> 00:30:08,600 essentially promotes essentially also 667 00:30:08,600 --> 00:30:11,440 help in the compliance and 668 00:30:11,440 --> 00:30:15,919 regulations next 800 280 C which is more 669 00:30:15,919 --> 00:30:20,080 more close to close to automobile and uh 670 00:30:20,080 --> 00:30:23,200 field industry where you we are with the 671 00:30:23,200 --> 00:30:25,799 with current with current CRA regulation 672 00:30:25,799 --> 00:30:28,919 coming and coming in force from 673 00:30:28,919 --> 00:30:32,519 2027 is required to have all the images 674 00:30:32,519 --> 00:30:35,559 or all the all the images be it on on 675 00:30:35,559 --> 00:30:39,159 device be your for for images having a 676 00:30:39,159 --> 00:30:42,200 trust digital trust so for those dig 677 00:30:42,200 --> 00:30:44,360 digital trust you have to have you have 678 00:30:44,360 --> 00:30:46,519 to work for transparency and audit 679 00:30:46,519 --> 00:30:50,200 auditable uh logs where you can actually 680 00:30:50,200 --> 00:30:53,320 uh go go forward and check if there is 681 00:30:53,320 --> 00:30:56,240 any malicious activity um malicious 682 00:30:56,240 --> 00:31:00,480 activity resulting in to some uh some 683 00:31:00,480 --> 00:31:04,000 uncompromised pipeline 684 00:31:04,000 --> 00:31:10,600 issue so the first tool is cosine uh 685 00:31:10,600 --> 00:31:12,120 so 686 00:31:12,120 --> 00:31:16,519 so so cosine is a tool of signing 687 00:31:16,519 --> 00:31:21,159 signing and verifying container image so 688 00:31:21,159 --> 00:31:24,000 essentially you can just look on onto 689 00:31:24,000 --> 00:31:24,799 the 690 00:31:24,799 --> 00:31:27,440 diagram it's it's taking one example 691 00:31:27,440 --> 00:31:30,799 from Docker Hub so if your image the 692 00:31:30,799 --> 00:31:33,120 base image or the Alpine image is in 693 00:31:33,120 --> 00:31:37,159 Docker Hub it can be pulled and the and 694 00:31:37,159 --> 00:31:40,919 then the image pulled in your uh it can 695 00:31:40,919 --> 00:31:43,039 be put into your own laptop or in your 696 00:31:43,039 --> 00:31:46,240 own system can be modified and 697 00:31:46,240 --> 00:31:50,200 then onto onto a registry in this case 698 00:31:50,200 --> 00:31:52,919 we are taking another registry that is 699 00:31:52,919 --> 00:31:57,279 ECR because we are pulling from a Docker 700 00:31:57,279 --> 00:32:00,080 Hub register and pushing the image into 701 00:32:00,080 --> 00:32:02,679 a ECR environment which is which is also 702 00:32:02,679 --> 00:32:06,360 a container registry in in AWS in gcp 703 00:32:06,360 --> 00:32:09,440 will be GCR so we are just transferring 704 00:32:09,440 --> 00:32:15,320 it into GCR or ECR in this case uh as 705 00:32:15,320 --> 00:32:17,840 you can understand the environment 706 00:32:17,840 --> 00:32:22,480 of a AWS or any Cloud vendor 707 00:32:22,480 --> 00:32:27,600 will scanning some scan but those scan 708 00:32:27,600 --> 00:32:28,559 doesn't 709 00:32:28,559 --> 00:32:32,159 interestingly cover container 710 00:32:32,159 --> 00:32:35,159 images they are just looking for the 711 00:32:35,159 --> 00:32:38,080 related C be scan as well as if the 712 00:32:38,080 --> 00:32:40,240 image is been flagged somewhere or the 713 00:32:40,240 --> 00:32:42,639 image signature has been flagged in the 714 00:32:42,639 --> 00:32:45,799 malicious directory then only the scan 715 00:32:45,799 --> 00:32:49,120 result will show something if you have 716 00:32:49,120 --> 00:32:52,960 just changed the image and that image uh 717 00:32:52,960 --> 00:32:55,279 application which you have changed has 718 00:32:55,279 --> 00:32:58,000 have some EO file or some malicious line 719 00:32:58,000 --> 00:33:00,080 added to that those won't be change 720 00:33:00,080 --> 00:33:03,320 those won't be checked on ECR image or 721 00:33:03,320 --> 00:33:05,639 when you are pushing it on ECR by 722 00:33:05,639 --> 00:33:09,600 default so what cosign does is it's 723 00:33:09,600 --> 00:33:13,159 actually before pushing into ECR image 724 00:33:13,159 --> 00:33:17,519 it actually sign the image and push it 725 00:33:17,519 --> 00:33:21,200 into the ECR now you you are not pushing 726 00:33:21,200 --> 00:33:23,360 any other any image you are just pushing 727 00:33:23,360 --> 00:33:26,639 the sign image and that sign image 728 00:33:26,639 --> 00:33:28,919 whenever it it is been pulled out of the 729 00:33:28,919 --> 00:33:32,720 ECR directory will be again verified 730 00:33:32,720 --> 00:33:36,760 with a cosine verify function and if it 731 00:33:36,760 --> 00:33:39,639 is passing the match of the 732 00:33:39,639 --> 00:33:42,880 signature essentially a essentially a 733 00:33:42,880 --> 00:33:46,000 type of signature which uh cosign 734 00:33:46,000 --> 00:33:49,159 directly matches from the previous sign 735 00:33:49,159 --> 00:33:51,360 image to the verify image if it is 736 00:33:51,360 --> 00:33:54,519 matching then then you will be able to 737 00:33:54,519 --> 00:33:57,279 push the sign image into your ECR 738 00:33:57,279 --> 00:34:00,880 directory or else it will flag that 739 00:34:00,880 --> 00:34:05,159 image for the forther 740 00:34:05,480 --> 00:34:09,679 review so that's uh that's end of our 741 00:34:09,679 --> 00:34:12,239 first section and now we will moving on 742 00:34:12,239 --> 00:34:14,159 to our first 743 00:34:14,159 --> 00:34:19,320 lab so for the lab um how many of how 744 00:34:19,320 --> 00:34:22,320 many of have you read the prequisite 745 00:34:22,320 --> 00:34:27,040 before this lab or this Workshop 746 00:34:28,239 --> 00:34:32,520 okay now problem so um there there are 747 00:34:32,520 --> 00:34:35,440 two different ways of conducting this 748 00:34:35,440 --> 00:34:38,480 lab is first we can do it do the same 749 00:34:38,480 --> 00:34:42,000 thing with Docker Hub and second we can 750 00:34:42,000 --> 00:34:45,960 do the same cosign image um demo with 751 00:34:45,960 --> 00:34:47,440 GCR 752 00:34:47,440 --> 00:34:53,159 so um is so does anyone have any gcp 753 00:34:53,159 --> 00:34:56,280 account as of now or anyone has created 754 00:34:56,280 --> 00:34:58,320 a Docker hub 755 00:34:58,320 --> 00:35:00,960 account if not I would recommend that 756 00:35:00,960 --> 00:35:03,760 you can create it so that after the demo 757 00:35:03,760 --> 00:35:06,119 you can run your run it on your own we 758 00:35:06,119 --> 00:35:08,480 have a walk through of these Labs so you 759 00:35:08,480 --> 00:35:10,720 can run it on your own we can come come 760 00:35:10,720 --> 00:35:13,800 to you and if you have some problem you 761 00:35:13,800 --> 00:35:16,280 can just uh check check it check that 762 00:35:16,280 --> 00:35:22,240 out so now we can just close this 763 00:35:22,240 --> 00:35:25,400 um okay it's not 764 00:35:25,400 --> 00:35:29,359 changing yeah 765 00:35:29,359 --> 00:35:31,680 so uh if you if you can if you are 766 00:35:31,680 --> 00:35:33,560 seeing this command these are the these 767 00:35:33,560 --> 00:35:36,800 are actually the five base command the 768 00:35:36,800 --> 00:35:39,480 first command is Docker tag which will 769 00:35:39,480 --> 00:35:41,560 be essentially the tag essentially 770 00:35:41,560 --> 00:35:44,920 tagging The Source image into the 771 00:35:44,920 --> 00:35:48,200 destination and then pushing it then 772 00:35:48,200 --> 00:35:51,800 cosine generate key is generating the 773 00:35:51,800 --> 00:35:54,400 private key and the public key pair and 774 00:35:54,400 --> 00:35:57,880 sign for coign sign we will be using the 775 00:35:57,880 --> 00:36:02,560 private file private key and for verify 776 00:36:02,560 --> 00:36:05,160 the public key should be available so th 777 00:36:05,160 --> 00:36:07,599 the asymmetric the asymmetric 778 00:36:07,599 --> 00:36:10,359 cryptography mechanism is been just uh 779 00:36:10,359 --> 00:36:14,640 just been employed for very the the 780 00:36:14,640 --> 00:36:16,880 destination who is verifying the image 781 00:36:16,880 --> 00:36:19,680 need to have the public uh public key 782 00:36:19,680 --> 00:36:21,880 and that will be sufficient to verify 783 00:36:21,880 --> 00:36:25,240 the image 784 00:36:33,760 --> 00:36:36,960 so uh what I've done is I have just spun 785 00:36:36,960 --> 00:36:41,359 up a virtual machine which this is gcp 786 00:36:41,359 --> 00:36:45,880 uh Google Cloud so um why Google Cloud 787 00:36:45,880 --> 00:36:48,119 why not AWS because Google Cloud 788 00:36:48,119 --> 00:36:51,839 provides the $300 initiation amount 789 00:36:51,839 --> 00:36:54,119 which you can easily create your free 790 00:36:54,119 --> 00:36:56,640 account and get $300 which is not the 791 00:36:56,640 --> 00:36:59,119 same case with a you have to pay from 792 00:36:59,119 --> 00:37:01,720 the first day so that's the that's one 793 00:37:01,720 --> 00:37:04,599 of the main reason I recommend any new 794 00:37:04,599 --> 00:37:06,839 beginner in Cloud to start with DCP 795 00:37:06,839 --> 00:37:08,800 because although there are some 796 00:37:08,800 --> 00:37:10,960 drawbacks in later stage but for 797 00:37:10,960 --> 00:37:13,200 beginners it's very convenient to start 798 00:37:13,200 --> 00:37:16,079 from here so we are I've just spun up a 799 00:37:16,079 --> 00:37:17,760 compute machine which is actually 800 00:37:17,760 --> 00:37:19,920 equivalent to a virtual machine virtual 801 00:37:19,920 --> 00:37:22,640 machine and it's very easy uh you can 802 00:37:22,640 --> 00:37:24,599 just click and it will just next next 803 00:37:24,599 --> 00:37:28,119 and you will have this uh instance 804 00:37:28,119 --> 00:37:31,720 so I'm just going into the SS of this 805 00:37:31,720 --> 00:37:35,480 image you can also go through go to the 806 00:37:35,480 --> 00:37:37,680 instance or the or the virtual machine 807 00:37:37,680 --> 00:37:41,599 through activate Cloud shell as well so 808 00:37:41,599 --> 00:37:43,640 it's the same thing but I'm just 809 00:37:43,640 --> 00:37:45,880 transferring to the SSH 810 00:37:45,880 --> 00:37:49,480 key so what it does is just establish 811 00:37:49,480 --> 00:37:52,280 your SSH key connection from your Google 812 00:37:52,280 --> 00:37:55,079 account and your Google account is is 813 00:37:55,079 --> 00:37:57,280 holding the SS key not your laptop so 814 00:37:57,280 --> 00:38:00,200 you can connect from 815 00:38:00,760 --> 00:38:05,240 anywhere maximiz huh 816 00:38:05,800 --> 00:38:08,800 maximize 817 00:38:15,190 --> 00:38:20,449 [Music] 818 00:38:24,480 --> 00:38:26,000 [Music] 819 00:38:26,000 --> 00:38:29,359 Okay so 820 00:38:29,359 --> 00:38:34,640 yeah containers so I have a okay I can 821 00:38:34,640 --> 00:38:36,640 start 822 00:38:36,640 --> 00:38:40,680 as so oh yeah uh 823 00:38:40,680 --> 00:38:44,480 so yeah so is is there anyone who have 824 00:38:44,480 --> 00:38:47,359 their own machine up or anything where 825 00:38:47,359 --> 00:38:49,839 you they are they will like to have the 826 00:38:49,839 --> 00:38:52,119 walk through tested on their their own 827 00:38:52,119 --> 00:38:54,760 machine in that case I will go slow or I 828 00:38:54,760 --> 00:38:56,319 can just go faster if you are just 829 00:38:56,319 --> 00:38:59,079 listening 830 00:38:59,079 --> 00:39:04,200 okay sure sure sure no 831 00:39:06,200 --> 00:39:10,480 problem okay 832 00:39:10,520 --> 00:39:14,599 so okay so the first step is actually 833 00:39:14,599 --> 00:39:17,839 Docker login which is essentially the 834 00:39:17,839 --> 00:39:22,480 login of your Docker Docker Hub so why 835 00:39:22,480 --> 00:39:26,240 so there can be two 836 00:39:27,599 --> 00:39:30,599 yeah so in 837 00:39:30,599 --> 00:39:33,640 this so in this in this stage you can 838 00:39:33,640 --> 00:39:35,440 either so I'm just following the same 839 00:39:35,440 --> 00:39:37,560 flowchart which we have discussed but 840 00:39:37,560 --> 00:39:39,640 it's not always the case you can have 841 00:39:39,640 --> 00:39:42,640 your initial initial image created at at 842 00:39:42,640 --> 00:39:46,000 your own um own laptop or own own 843 00:39:46,000 --> 00:39:48,200 virtual machine and then push into the 844 00:39:48,200 --> 00:39:50,200 registry so I'm actually following the 845 00:39:50,200 --> 00:39:52,960 same flowchart which we have discussed 846 00:39:52,960 --> 00:39:56,880 so yeah um if anyone want to just see 847 00:39:56,880 --> 00:39:59,560 the in you can go ahead and check the 848 00:39:59,560 --> 00:40:03,560 same login it's actually a it's actually 849 00:40:03,560 --> 00:40:07,160 a just use case for this lab it doesn't 850 00:40:07,160 --> 00:40:10,280 have anything 851 00:40:10,280 --> 00:40:12,800 else so yeah this this is a common 852 00:40:12,800 --> 00:40:15,160 mistake which everyone does is you have 853 00:40:15,160 --> 00:40:17,960 to have sud sudo with a Docker because 854 00:40:17,960 --> 00:40:21,000 Docker is a is a high privilege command 855 00:40:21,000 --> 00:40:23,520 it's required sudo every time but even 856 00:40:23,520 --> 00:40:25,760 though you know you commit the same 857 00:40:25,760 --> 00:40:28,319 mistake every time so then the second 858 00:40:28,319 --> 00:40:31,920 step is I'm first going for the uh again 859 00:40:31,920 --> 00:40:34,040 I'm going for the Google Cloud 860 00:40:34,040 --> 00:40:36,240 credential helper creation this is 861 00:40:36,240 --> 00:40:37,960 essentially authenticating your Google 862 00:40:37,960 --> 00:40:42,200 cloud with your uh existing instance so 863 00:40:42,200 --> 00:40:44,560 that command is 864 00:40:44,560 --> 00:40:46,280 thecloud 865 00:40:46,280 --> 00:40:49,359 or uh 866 00:40:49,359 --> 00:40:51,760 config 867 00:40:51,760 --> 00:40:56,119 Docker yeah just working 868 00:40:56,119 --> 00:40:58,040 here yeah 869 00:40:58,040 --> 00:41:00,960 so this 870 00:41:00,960 --> 00:41:03,839 is so you can see that this is 871 00:41:03,839 --> 00:41:06,400 essentially this has essentially run the 872 00:41:06,400 --> 00:41:08,599 cred helper 873 00:41:08,599 --> 00:41:12,960 which finds all the stage of stage of 874 00:41:12,960 --> 00:41:15,760 integation with the Google cloud and 875 00:41:15,760 --> 00:41:19,760 open up the gcloud shell in my own shell 876 00:41:19,760 --> 00:41:21,760 so I have opened shell into shell in 877 00:41:21,760 --> 00:41:23,880 that 878 00:41:23,880 --> 00:41:27,760 sense the next step is to create a AR 879 00:41:27,760 --> 00:41:31,000 artifactory repository artifactory 880 00:41:31,000 --> 00:41:35,319 artifact registry repository so uh for 881 00:41:35,319 --> 00:41:36,880 the docker 882 00:41:36,880 --> 00:41:40,760 image for which you can run it with 883 00:41:40,760 --> 00:41:43,160 artifacts 884 00:41:43,160 --> 00:41:44,770 repositories 885 00:41:44,770 --> 00:41:46,680 [Music] 886 00:41:46,680 --> 00:41:48,680 create I 887 00:41:48,680 --> 00:41:51,680 just yeah there is another step there I 888 00:41:51,680 --> 00:41:54,800 have to first enable the Google Cloud 889 00:41:54,800 --> 00:41:58,160 for with gcloud enable the Google Cloud 890 00:41:58,160 --> 00:42:02,160 project for your for accessing or for 891 00:42:02,160 --> 00:42:05,079 the permission of artifact registry for 892 00:42:05,079 --> 00:42:07,760 that it is G 893 00:42:07,760 --> 00:42:11,520 service or gcloud 894 00:42:12,599 --> 00:42:15,520 Services yeah enable artifactory 895 00:42:15,520 --> 00:42:18,520 registries 896 00:42:28,319 --> 00:42:31,119 oh 897 00:42:39,800 --> 00:42:43,559 okay oh to yeah so there is another 898 00:42:43,559 --> 00:42:49,720 requirement of a token set there token 899 00:42:55,500 --> 00:42:57,280 [Music] 900 00:42:57,280 --> 00:43:00,720 over here yeah it's it's it's actually 901 00:43:00,720 --> 00:43:03,200 in the first 902 00:43:05,160 --> 00:43:08,119 one this is the 903 00:43:08,119 --> 00:43:10,960 one yeah this 904 00:43:10,960 --> 00:43:15,960 one yeah this one okay 905 00:43:15,960 --> 00:43:20,760 so just start from start okay so yeah I 906 00:43:20,760 --> 00:43:24,119 think we can skip this one uh so we can 907 00:43:24,119 --> 00:43:25,680 just 908 00:43:25,680 --> 00:43:31,440 Nano let me make directory for demo 1 CD 909 00:43:31,440 --> 00:43:35,880 demo 1 so Nano doal 910 00:43:35,880 --> 00:43:38,839 file and 911 00:43:38,839 --> 00:43:41,839 yeah 912 00:43:43,559 --> 00:43:50,960 so so what I'm doing is creating a uh 913 00:44:05,200 --> 00:44:08,079 doesn't matter okay we will come back to 914 00:44:08,079 --> 00:44:10,480 that 915 00:44:10,480 --> 00:44:13,079 um yeah 916 00:44:13,079 --> 00:44:17,119 so okay I can just create it again let 917 00:44:17,119 --> 00:44:20,319 me see that notes oh yeah okay they 918 00:44:20,319 --> 00:44:21,720 still 919 00:44:21,720 --> 00:44:25,559 have no problem sure sure sure no 920 00:44:25,559 --> 00:44:29,040 problem here 921 00:44:29,280 --> 00:44:32,400 yeah work shop yes there is work shop 922 00:44:32,400 --> 00:44:34,920 man yeah there 923 00:44:34,920 --> 00:44:36,680 isop 924 00:44:36,680 --> 00:44:40,000 okay I'm just looking for the locker up 925 00:44:40,000 --> 00:44:44,400 key there which I kept 926 00:44:44,400 --> 00:44:46,040 somewhere 927 00:44:46,040 --> 00:44:49,520 yeah not 928 00:44:49,520 --> 00:44:53,720 not this one 929 00:45:08,240 --> 00:45:12,480 okay I can do one thing just get it 930 00:45:12,480 --> 00:45:15,590 [Music] 931 00:45:20,240 --> 00:45:22,720 again come 932 00:45:22,720 --> 00:45:24,559 setting 933 00:45:24,559 --> 00:45:28,559 and security 934 00:45:29,880 --> 00:45:32,200 yeah so this is the pat 935 00:45:32,200 --> 00:45:36,879 token um I have to create a new one 936 00:45:38,960 --> 00:45:42,400 again I get 937 00:45:46,240 --> 00:45:51,359 that so as you can see it does give the 938 00:45:51,359 --> 00:45:54,040 uh information how to log in as well as 939 00:45:54,040 --> 00:45:57,960 the P information so previously I use my 940 00:45:57,960 --> 00:46:00,520 password but with the password you have 941 00:46:00,520 --> 00:46:04,480 a less privilege access so now I'm using 942 00:46:04,480 --> 00:46:07,400 I will be using my 943 00:46:13,520 --> 00:46:15,839 pad 944 00:46:15,839 --> 00:46:20,440 Y and yeah 945 00:46:21,640 --> 00:46:23,599 copy 946 00:46:23,599 --> 00:46:26,920 yeah that's it so now we can just start 947 00:46:26,920 --> 00:46:30,640 setting up the environment uh I think we 948 00:46:30,640 --> 00:46:33,680 can just go ahead from this one 949 00:46:33,680 --> 00:46:36,960 to l 950 00:46:36,960 --> 00:46:39,590 c 951 00:46:39,590 --> 00:46:46,649 [Music] 952 00:46:50,200 --> 00:46:53,200 container 953 00:46:55,359 --> 00:46:57,640 file yeah 954 00:46:57,640 --> 00:47:02,160 so we have we have just a base image 955 00:47:02,160 --> 00:47:06,119 of engine which will be which will be 956 00:47:06,119 --> 00:47:09,800 used for creation of the 957 00:47:09,920 --> 00:47:12,920 image 958 00:47:17,880 --> 00:47:23,319 and okay and uh 959 00:47:39,119 --> 00:47:44,480 so okay let's see uh let's see from here 960 00:47:44,480 --> 00:47:48,319 then yeah 961 00:47:48,319 --> 00:47:50,640 uh 962 00:47:50,640 --> 00:47:52,880 yeah 963 00:47:52,880 --> 00:47:55,839 so that's the main file you can see that 964 00:47:55,839 --> 00:47:59,119 there is a hard coding of of user as 965 00:47:59,119 --> 00:48:00,640 well as password this is the hard code 966 00:48:00,640 --> 00:48:04,040 of the docker Hub and essentially this 967 00:48:04,040 --> 00:48:07,040 will be enabling the docker image which 968 00:48:07,040 --> 00:48:10,200 we have in the docker Hub to pull the 969 00:48:10,200 --> 00:48:11,599 docker 970 00:48:11,599 --> 00:48:16,760 image uh okay okay so that's the line so 971 00:48:16,760 --> 00:48:20,040 it will just pull the docker image which 972 00:48:20,040 --> 00:48:23,319 I have pushed on the uh on the docker 973 00:48:23,319 --> 00:48:26,240 Hub and then run it in the environment 974 00:48:26,240 --> 00:48:30,800 itself so what it will do 975 00:48:30,800 --> 00:48:34,680 is this get up action will actually run 976 00:48:34,680 --> 00:48:38,760 it and we'll update it so once I 977 00:48:38,760 --> 00:48:41,920 actually go into my environment 978 00:48:41,920 --> 00:48:49,400 and get clone this directory or this 979 00:49:06,920 --> 00:49:12,119 pad token giup pad token oh 980 00:49:12,119 --> 00:49:14,240 minute 981 00:49:14,240 --> 00:49:17,440 yeah I think you put it under the uh 982 00:49:17,440 --> 00:49:19,480 okay it's on on the machine on the 983 00:49:19,480 --> 00:49:24,599 machine let me down again okay 984 00:49:30,599 --> 00:49:33,680 let me try 985 00:49:38,319 --> 00:49:42,040 this let me do 986 00:49:44,480 --> 00:49:47,480 this 987 00:49:48,799 --> 00:49:53,200 this okay yeah now I understand so okay 988 00:49:53,200 --> 00:49:56,439 I actually 989 00:49:58,680 --> 00:50:01,240 yeah 990 00:50:05,839 --> 00:50:11,680 so yeah okay um 991 00:50:11,680 --> 00:50:15,040 yeah so I was trying to get con clone a 992 00:50:15,040 --> 00:50:17,359 private directory I forgot that I have 993 00:50:17,359 --> 00:50:21,599 not kept it public so yeah that's why it 994 00:50:21,599 --> 00:50:25,160 was asking for the uh so if you are 995 00:50:25,160 --> 00:50:28,079 trying to CL on a private directory it 996 00:50:28,079 --> 00:50:32,290 will ask for the whole login 997 00:50:32,290 --> 00:50:35,710 [Music] 998 00:50:51,220 --> 00:50:54,000 [Music] 999 00:50:54,000 --> 00:50:58,640 ID yep so now it is changed 1000 00:51:00,920 --> 00:51:05,920 it yeah so 1001 00:51:15,680 --> 00:51:18,760 yeah so you can see there 1002 00:51:18,760 --> 00:51:23,079 are this G dogit uh directory is 1003 00:51:23,079 --> 00:51:26,079 actually created by the action uh 1004 00:51:26,079 --> 00:51:27,839 created for for the GitHub action run 1005 00:51:27,839 --> 00:51:29,720 and whenever GitHub action runs it 1006 00:51:29,720 --> 00:51:32,520 checks for the dot GitHub of GitHub 1007 00:51:32,520 --> 00:51:35,160 directory for the main or the any yl you 1008 00:51:35,160 --> 00:51:36,799 are running you can give any other name 1009 00:51:36,799 --> 00:51:41,000 CI do C.L name as well so what exactly 1010 00:51:41,000 --> 00:51:45,000 it has is 1011 00:51:45,000 --> 00:51:48,720 this okay 1012 00:51:52,440 --> 00:51:57,760 y okay so um 1013 00:52:20,640 --> 00:52:24,720 yeah mean probably got it 1014 00:52:31,839 --> 00:52:39,960 yeah okay so let me just do this one 1015 00:52:40,680 --> 00:52:43,680 s exactly 1016 00:52:43,680 --> 00:52:46,599 oh okay yeah 1017 00:52:46,599 --> 00:52:49,799 so what I'm going to do further is so I 1018 00:52:49,799 --> 00:52:52,040 was not able to open the main yl file 1019 00:52:52,040 --> 00:52:54,880 because it's I'm trying to clone and 1020 00:52:54,880 --> 00:52:58,400 then try try to I open a non- writable 1021 00:52:58,400 --> 00:53:00,720 file so it is the same file which we 1022 00:53:00,720 --> 00:53:03,240 already saw on the GitHub what I will be 1023 00:53:03,240 --> 00:53:06,520 doing further is is adding 1024 00:53:06,520 --> 00:53:11,520 a echo some any comments I in this case 1025 00:53:11,520 --> 00:53:16,160 I have added a xss function or xss uh 1026 00:53:16,160 --> 00:53:19,200 script this will be added into read uh 1027 00:53:19,200 --> 00:53:24,240 read file and then that that so we I can 1028 00:53:24,240 --> 00:53:29,000 just uh so that will be just uh your 1029 00:53:29,000 --> 00:53:31,000 read me file on my local repository will 1030 00:53:31,000 --> 00:53:33,079 be having this this uh this command and 1031 00:53:33,079 --> 00:53:35,599 then we will then the next step is to 1032 00:53:35,599 --> 00:53:38,640 build Docker and push the whole 1033 00:53:38,640 --> 00:53:41,160 repository which has been created into 1034 00:53:41,160 --> 00:53:45,480 the into the uh into the original GitHub 1035 00:53:45,480 --> 00:53:48,040 registry so you can see that I have 1036 00:53:48,040 --> 00:53:50,240 given the variables as well as branch 1037 00:53:50,240 --> 00:53:53,760 and stuffs in this function as well so 1038 00:53:53,760 --> 00:53:55,680 it is just updating the file and the 1039 00:53:55,680 --> 00:53:57,119 username and 1040 00:53:57,119 --> 00:53:59,640 uh the git username config can be given 1041 00:53:59,640 --> 00:54:02,559 with Git config Global this will be 1042 00:54:02,559 --> 00:54:04,760 having the username as well as passwords 1043 00:54:04,760 --> 00:54:07,520 for this one so I have used already 1044 00:54:07,520 --> 00:54:09,839 given the pat file in this one so this 1045 00:54:09,839 --> 00:54:12,119 will be automatically taking the pad 1046 00:54:12,119 --> 00:54:14,000 from the environment variable which is 1047 00:54:14,000 --> 00:54:17,960 not Vis visible here so because that's 1048 00:54:17,960 --> 00:54:21,520 stored somewhere else so we can either 1049 00:54:21,520 --> 00:54:24,640 run it directly or yeah let's do 1050 00:54:24,640 --> 00:54:27,440 it just like this 1051 00:54:27,440 --> 00:54:29,960 uh new 1052 00:54:30,079 --> 00:54:33,079 connection 1053 00:54:51,240 --> 00:54:53,599 connect 1054 00:54:53,599 --> 00:54:58,280 oh too many FES 1055 00:55:14,680 --> 00:55:17,359 yeah yeah 1056 00:55:17,359 --> 00:55:19,559 so I will 1057 00:55:19,559 --> 00:55:22,960 be yeah let me show 1058 00:55:22,960 --> 00:55:28,000 that so just to show that that at 1059 00:55:28,000 --> 00:55:31,200 the steps there I will just run these 1060 00:55:31,200 --> 00:55:34,170 two commands to show how those 1061 00:55:34,170 --> 00:55:37,459 [Music] 1062 00:55:41,000 --> 00:55:46,520 works oh I for one 1063 00:55:50,119 --> 00:55:51,720 yeah 1064 00:55:51,720 --> 00:55:54,559 then 1065 00:55:54,559 --> 00:55:57,760 yeah so it has just push the modified 1066 00:55:57,760 --> 00:56:01,400 file into the repository if it will be 1067 00:56:01,400 --> 00:56:03,440 just pushing difference of the your 1068 00:56:03,440 --> 00:56:05,480 repository not the whole one so not 1069 00:56:05,480 --> 00:56:07,319 everyone every every file will be 1070 00:56:07,319 --> 00:56:09,799 writing writeable only the change which 1071 00:56:09,799 --> 00:56:11,640 we have made from the Clone it will be 1072 00:56:11,640 --> 00:56:12,839 only pushing 1073 00:56:12,839 --> 00:56:18,720 that so second yeah build then yeah 1074 00:56:18,720 --> 00:56:21,720 push 1075 00:56:23,720 --> 00:56:28,240 so so something has changed there 1076 00:56:31,480 --> 00:56:35,960 M oh 1077 00:56:39,640 --> 00:56:42,890 [Music] 1078 00:56:45,480 --> 00:56:49,119 okay p p is not running maybe maybe yeah 1079 00:56:49,119 --> 00:56:50,680 maybe I have changed it something I 1080 00:56:50,680 --> 00:56:52,920 don't 1081 00:56:52,920 --> 00:56:56,039 remember yeah do you want to yeah you 1082 00:56:56,039 --> 00:56:58,240 can 1083 00:56:58,280 --> 00:57:02,240 uh on the yeah it is on the 1084 00:57:02,240 --> 00:57:05,160 GitHub 1085 00:57:05,160 --> 00:57:09,359 uh okay 1086 00:57:09,480 --> 00:57:11,340 yeah okay 1087 00:57:11,340 --> 00:57:13,039 [Music] 1088 00:57:13,039 --> 00:57:16,079 so what so I can just give the output 1089 00:57:16,079 --> 00:57:19,480 there that what exactly it will do where 1090 00:57:19,480 --> 00:57:21,940 is the up 1091 00:57:21,940 --> 00:57:25,119 [Music] 1092 00:57:37,400 --> 00:57:42,319 uh this one yeah okay I'm there I'm 1093 00:57:42,319 --> 00:57:43,920 there 1094 00:57:43,920 --> 00:57:48,240 only okay yeah so it will just push and 1095 00:57:48,240 --> 00:57:51,960 do this so right now some pad issue is 1096 00:57:51,960 --> 00:57:55,160 there but that's the main thing of with 1097 00:57:55,160 --> 00:57:57,680 all that's always the thing with any 1098 00:57:57,680 --> 00:58:01,240 demo which you might miss something and 1099 00:58:01,240 --> 00:58:04,200 that's that it might not run at at the 1100 00:58:04,200 --> 00:58:07,160 time and it should so yeah it will just 1101 00:58:07,160 --> 00:58:09,280 do this change so essentially you can 1102 00:58:09,280 --> 00:58:13,960 see that um based on this GitHub 1103 00:58:13,960 --> 00:58:17,839 reposit able to pull and push my own 1104 00:58:17,839 --> 00:58:21,039 change just because there was no uh 1105 00:58:21,039 --> 00:58:24,240 verification at the side of uh 1106 00:58:24,240 --> 00:58:27,200 GitHub there is one chck check if why 1107 00:58:27,200 --> 00:58:30,319 have I have used read me file not HTML 1108 00:58:30,319 --> 00:58:35,319 file because GitHub by default uses uh 1109 00:58:35,319 --> 00:58:38,119 could have checked some vulnerable 1110 00:58:38,119 --> 00:58:40,760 vulnerable ex vulnerable extension files 1111 00:58:40,760 --> 00:58:44,000 so MD is not one of the vulnerable vable 1112 00:58:44,000 --> 00:58:46,359 extension file by them but HTML is so I 1113 00:58:46,359 --> 00:58:48,359 if I try to push something vulnerable 1114 00:58:48,359 --> 00:58:51,559 into HTML it will it will block that 1115 00:58:51,559 --> 00:58:53,460 that's there 1116 00:58:53,460 --> 00:58:56,559 [Music] 1117 00:59:11,079 --> 00:59:16,400 yeah okay okay so yeah that's that's the 1118 00:59:16,400 --> 00:59:18,960 that's the first lab and we can we will 1119 00:59:18,960 --> 00:59:21,440 provide the walk through with the 1120 00:59:21,440 --> 00:59:24,520 command as well as a syntax so you can 1121 00:59:24,520 --> 00:59:27,599 actually use it later on I think we are 1122 00:59:27,599 --> 00:59:30,319 nearly getting out of out of time so 1123 00:59:30,319 --> 00:59:33,880 this first one is with cosine and second 1124 00:59:33,880 --> 00:59:36,640 the you can see the outputs here which I 1125 00:59:36,640 --> 00:59:38,920 was trying to run that the basic output 1126 00:59:38,920 --> 00:59:42,280 will be after the after the push of that 1127 00:59:42,280 --> 00:59:44,039 that malicious 1128 00:59:44,039 --> 00:59:48,000 image we I for securing those images I 1129 00:59:48,000 --> 00:59:51,920 have to just um run the sudo a coign 1130 00:59:51,920 --> 00:59:56,319 sign on that vulnerable image and then I 1131 00:59:56,319 --> 00:59:58,280 have to provide a password for the 1132 00:59:58,280 --> 01:00:00,079 private key it can be anything just 1133 01:00:00,079 --> 01:00:05,200 defcom and then if I try to verify it if 1134 01:00:05,200 --> 01:00:07,319 it is a legit the the original image 1135 01:00:07,319 --> 01:00:09,039 which has been signed this in this case 1136 01:00:09,039 --> 01:00:11,520 it is the legit base uh then it will 1137 01:00:11,520 --> 01:00:14,240 verify with this information that the 1138 01:00:14,240 --> 01:00:16,240 certificate has been verified with with 1139 01:00:16,240 --> 01:00:19,240 the fio ficio roote fio roote is the 1140 01:00:19,240 --> 01:00:21,559 certificate Authority and signature has 1141 01:00:21,559 --> 01:00:24,039 been uh verified for the public uh 1142 01:00:24,039 --> 01:00:26,839 public key if I try the same thing with 1143 01:00:26,839 --> 01:00:29,119 another image which is malicious it 1144 01:00:29,119 --> 01:00:31,119 won't able to find the matching 1145 01:00:31,119 --> 01:00:34,799 signature and will fail so the same 1146 01:00:34,799 --> 01:00:38,000 thing can be done with GCR um the 1147 01:00:38,000 --> 01:00:40,319 pipeline which we are trying to do is we 1148 01:00:40,319 --> 01:00:43,760 can generate the we can generate the key 1149 01:00:43,760 --> 01:00:46,799 pair and sign the sign the ECR only 1150 01:00:46,799 --> 01:00:48,920 thing which we have to do is provide the 1151 01:00:48,920 --> 01:00:52,160 ECR path of the which is already loaded 1152 01:00:52,160 --> 01:00:56,319 in thecr and then we can verify it for 1153 01:00:56,319 --> 01:00:59,359 the ECR registry images as well so the 1154 01:00:59,359 --> 01:01:01,640 previous one for for the docker Hub this 1155 01:01:01,640 --> 01:01:04,240 is for the image which has been pulled 1156 01:01:04,240 --> 01:01:07,319 from the docker and pushed into the 1157 01:01:07,319 --> 01:01:11,480 ECR the next one is uh fullo fio is a 1158 01:01:11,480 --> 01:01:14,799 certificate Authority which is so by a 1159 01:01:14,799 --> 01:01:18,079 separate certificate Authority so 1160 01:01:18,079 --> 01:01:20,880 certificate Authority are usually turn 1161 01:01:20,880 --> 01:01:23,160 over for a long longer range of time or 1162 01:01:23,160 --> 01:01:26,520 longer period of time but if you require 1163 01:01:26,520 --> 01:01:27,400 a 1164 01:01:27,400 --> 01:01:30,720 short certificate your own private 1165 01:01:30,720 --> 01:01:32,880 certificate can be created using fio 1166 01:01:32,880 --> 01:01:34,559 this is completely free or completely 1167 01:01:34,559 --> 01:01:37,160 open source and this eliminates the 1168 01:01:37,160 --> 01:01:39,920 requirement of the long-term private key 1169 01:01:39,920 --> 01:01:42,200 to be stored in a secret manager which 1170 01:01:42,200 --> 01:01:45,960 need to be done in a uh public uh public 1171 01:01:45,960 --> 01:01:48,400 certificate Authority and also you have 1172 01:01:48,400 --> 01:01:52,359 to pay for those uh those um 1173 01:01:52,359 --> 01:01:54,680 requirements there but the only uh thing 1174 01:01:54,680 --> 01:01:57,359 is that for the identity management this 1175 01:01:57,359 --> 01:02:01,720 uses open ID and also eliminate the 1176 01:02:01,720 --> 01:02:03,960 requirement of the private key as well 1177 01:02:03,960 --> 01:02:08,839 so we can side by side with use full coo 1178 01:02:08,839 --> 01:02:11,160 with a cosine where cosine will be 1179 01:02:11,160 --> 01:02:13,839 generating the signature and as the 1180 01:02:13,839 --> 01:02:16,240 certificate authority of this fio has 1181 01:02:16,240 --> 01:02:18,079 the certificate created the certificate 1182 01:02:18,079 --> 01:02:21,200 for you now you can just make the 1183 01:02:21,200 --> 01:02:24,119 keyless signature in previous case as 1184 01:02:24,119 --> 01:02:26,400 you can see we were providing the public 1185 01:02:26,400 --> 01:02:28,319 key we were providing the public key to 1186 01:02:28,319 --> 01:02:33,039 the cosign in this case in case of in 1187 01:02:33,039 --> 01:02:36,000 case of fio you don't have to provide 1188 01:02:36,000 --> 01:02:38,880 the uh you don't have to do the same 1189 01:02:38,880 --> 01:02:41,880 thing as the oidc authentication will be 1190 01:02:41,880 --> 01:02:44,640 the additional step and then you will be 1191 01:02:44,640 --> 01:02:48,079 running the cosign with the fio U URL 1192 01:02:48,079 --> 01:02:50,599 which essentially will provide the 1193 01:02:50,599 --> 01:02:54,279 certificate to your um your image and 1194 01:02:54,279 --> 01:02:57,319 then the oidc Authority or the issuer 1195 01:02:57,319 --> 01:02:59,760 will authenticate you authenticate the 1196 01:02:59,760 --> 01:03:04,599 user for the account and we will then it 1197 01:03:04,599 --> 01:03:07,359 will use the private key file there uh 1198 01:03:07,359 --> 01:03:11,319 this private key file is is actually not 1199 01:03:11,319 --> 01:03:15,400 same so this this private key file will 1200 01:03:15,400 --> 01:03:18,960 be be used for signing the uh signing 1201 01:03:18,960 --> 01:03:21,200 the uh image there and ver for 1202 01:03:21,200 --> 01:03:23,039 verification we will be having the 1203 01:03:23,039 --> 01:03:28,119 public key file U for the image 1204 01:03:29,880 --> 01:03:34,480 tag yeah so the third and last important 1205 01:03:34,480 --> 01:03:37,960 tool which which six store provides is 1206 01:03:37,960 --> 01:03:40,799 record so it's it actually is a 1207 01:03:40,799 --> 01:03:43,480 transparency log for storing the 1208 01:03:43,480 --> 01:03:47,720 metadata of sign sign artifact so in in 1209 01:03:47,720 --> 01:03:51,160 our case the whole process which we have 1210 01:03:51,160 --> 01:03:54,160 done those will be logged into record 1211 01:03:54,160 --> 01:03:57,440 that this uh this account or this user 1212 01:03:57,440 --> 01:04:01,599 has has created the um the public and 1213 01:04:01,599 --> 01:04:04,680 private key payers and which account has 1214 01:04:04,680 --> 01:04:07,119 has signed and which account actually 1215 01:04:07,119 --> 01:04:09,520 has verified with the time stamp so 1216 01:04:09,520 --> 01:04:12,359 those information is being stored in 1217 01:04:12,359 --> 01:04:15,960 record and the entries of this this 1218 01:04:15,960 --> 01:04:18,839 record the the entries of this record 1219 01:04:18,839 --> 01:04:21,599 log or record um uh The Ledger will be 1220 01:04:21,599 --> 01:04:24,160 imitable it cannot be changed once it 1221 01:04:24,160 --> 01:04:27,200 has been uh but but once it has been 1222 01:04:27,200 --> 01:04:30,279 done so it is a immutable uh 1223 01:04:30,279 --> 01:04:33,359 ledger so the basic steps of uh 1224 01:04:33,359 --> 01:04:35,760 installation again the the third walk 1225 01:04:35,760 --> 01:04:37,240 through will be provided with all this 1226 01:04:37,240 --> 01:04:38,799 we are just discussing the how it will 1227 01:04:38,799 --> 01:04:42,079 be installed for installation of rer C 1228 01:04:42,079 --> 01:04:44,079 you have you can just install this Rec C 1229 01:04:44,079 --> 01:04:47,279 with the function go function and then 1230 01:04:47,279 --> 01:04:49,160 this it will be signing and uploading 1231 01:04:49,160 --> 01:04:52,480 the entry into the CER server and the 1232 01:04:52,480 --> 01:04:55,240 server setup requires a mongod DB U 1233 01:04:55,240 --> 01:04:58,960 mongod DV as well as a trillion trillion 1234 01:04:58,960 --> 01:05:02,279 and on trillion server Rec record CLI 1235 01:05:02,279 --> 01:05:06,480 will be mounted and the the mongodb or 1236 01:05:06,480 --> 01:05:09,960 any actually you can use any uh DB DB 1237 01:05:09,960 --> 01:05:12,119 server for storing these entries into 1238 01:05:12,119 --> 01:05:15,839 into them so then then you can install 1239 01:05:15,839 --> 01:05:18,880 it on so you can just install it and 1240 01:05:18,880 --> 01:05:21,279 then start verifying the images and 1241 01:05:21,279 --> 01:05:23,520 verifying the entries on the server 1242 01:05:23,520 --> 01:05:26,079 itself so this can be also locally setup 1243 01:05:26,079 --> 01:05:28,880 with your own Docker containers of Bongo 1244 01:05:28,880 --> 01:05:31,240 DB or any other DB as well as trillions 1245 01:05:31,240 --> 01:05:34,440 there is a Docker Hub image of trillion 1246 01:05:34,440 --> 01:05:35,920 server which can be also used for 1247 01:05:35,920 --> 01:05:37,400 testing purposes I wouldn't recommend 1248 01:05:37,400 --> 01:05:39,880 for the production uh but for testing 1249 01:05:39,880 --> 01:05:43,039 purpose it can be used so that's the 1250 01:05:43,039 --> 01:05:46,960 flowchart of how this validation of the 1251 01:05:46,960 --> 01:05:50,200 whole pipeline from cosign to uh record 1252 01:05:50,200 --> 01:05:53,400 will happen the developer or the user 1253 01:05:53,400 --> 01:05:56,240 will validate the image 1254 01:05:56,240 --> 01:05:58,680 image is actually Oracle CI so I've 1255 01:05:58,680 --> 01:06:00,920 actually taken this from another blog 1256 01:06:00,920 --> 01:06:03,640 which you can use there or your own um 1257 01:06:03,640 --> 01:06:07,880 differences so the oi is Oracle image 1258 01:06:07,880 --> 01:06:11,599 and it will then Co use the cosign for 1259 01:06:11,599 --> 01:06:14,400 signing the image and then the Manifest 1260 01:06:14,400 --> 01:06:16,760 file will be returning because we have 1261 01:06:16,760 --> 01:06:20,920 used with the change of in in uh the 1262 01:06:20,920 --> 01:06:24,520 change in forio we have seen that we are 1263 01:06:24,520 --> 01:06:28,039 we we are attaching the polio URL with 1264 01:06:28,039 --> 01:06:31,079 which we will be attaining a signature 1265 01:06:31,079 --> 01:06:35,160 that signature will be further SSH or 1266 01:06:35,160 --> 01:06:37,880 further provided with open SSL to the 1267 01:06:37,880 --> 01:06:40,720 certificate Authority that is oid DC 1268 01:06:40,720 --> 01:06:45,039 issuer that will actually verify coign 1269 01:06:45,039 --> 01:06:47,400 and which will return the image 1270 01:06:47,400 --> 01:06:49,799 verification information that 1271 01:06:49,799 --> 01:06:52,839 information will be logged into record 1272 01:06:52,839 --> 01:06:55,279 so the simple change of the previous 1273 01:06:55,279 --> 01:06:58,920 cycle to this one is the two things like 1274 01:06:58,920 --> 01:07:02,160 this one this URL as well as certificate 1275 01:07:02,160 --> 01:07:03,880 which has been attached from the 1276 01:07:03,880 --> 01:07:05,920 previous time where we are actually 1277 01:07:05,920 --> 01:07:07,880 providing the certificate not the keys 1278 01:07:07,880 --> 01:07:12,720 into um into the cosign so yeah that's 1279 01:07:12,720 --> 01:07:17,319 pretty much it from my side yeah 1280 01:07:29,279 --> 01:07:30,319 you want to 1281 01:07:30,319 --> 01:07:32,640 go yeah 1282 01:07:32,640 --> 01:07:35,960 so we know like know we just we try to 1283 01:07:35,960 --> 01:07:38,400 have a lab then most of you guys didn't 1284 01:07:38,400 --> 01:07:40,960 go to the prerequisite but that's fine 1285 01:07:40,960 --> 01:07:45,000 um the best practices for GCR uh like 1286 01:07:45,000 --> 01:07:47,400 you know it's already there uh I will 1287 01:07:47,400 --> 01:07:49,920 talk what's not on the slide so we have 1288 01:07:49,920 --> 01:07:52,559 sort of uh 1289 01:07:52,559 --> 01:07:56,160 just so how we can handle vulnerability 1290 01:07:56,160 --> 01:07:58,119 scanning and hardcoded passports as you 1291 01:07:58,119 --> 01:08:00,720 have seen um when we showed you the G 1292 01:08:00,720 --> 01:08:02,839 repository we have hardcoded the 1293 01:08:02,839 --> 01:08:05,839 credentials over there so by having 1294 01:08:05,839 --> 01:08:07,720 those things hardcoded there are chances 1295 01:08:07,720 --> 01:08:09,839 of getting compromised so that's the 1296 01:08:09,839 --> 01:08:12,279 reason why we have personal access 1297 01:08:12,279 --> 01:08:15,279 tokens where we can store in the wall 1298 01:08:15,279 --> 01:08:17,080 and then retrip from the wall in the 1299 01:08:17,080 --> 01:08:20,319 similar fashion we you can store the 1300 01:08:20,319 --> 01:08:22,359 credentials in the W and then retrieve 1301 01:08:22,359 --> 01:08:25,080 the credentials from from the W having 1302 01:08:25,080 --> 01:08:27,279 uh Connection in and out of the world so 1303 01:08:27,279 --> 01:08:29,000 for that connection you can also have an 1304 01:08:29,000 --> 01:08:32,319 API you can also have like you know uh 1305 01:08:32,319 --> 01:08:34,158 like any sort of third party tool 1306 01:08:34,158 --> 01:08:35,839 install on your local machine or a VM 1307 01:08:35,839 --> 01:08:37,080 and then you can read the secrets from 1308 01:08:37,080 --> 01:08:39,479 out of the out of the W so that's just 1309 01:08:39,479 --> 01:08:41,600 an example so as I'm taking an example 1310 01:08:41,600 --> 01:08:43,040 here hashy cop you can use any sort of 1311 01:08:43,040 --> 01:08:44,920 watering Technologies there are bunch in 1312 01:08:44,920 --> 01:08:48,560 the market so that's that satisfies the 1313 01:08:48,560 --> 01:08:49,960 vulnerability scanning and the binary 1314 01:08:49,960 --> 01:08:53,040 authorization part so when you fa the 1315 01:08:53,040 --> 01:08:56,080 build fails to deploy on the server 1316 01:08:56,080 --> 01:08:57,600 what's then what what are you guys going 1317 01:08:57,600 --> 01:08:59,679 to do something like there should be 1318 01:08:59,679 --> 01:09:01,279 something like for example you have 1319 01:09:01,279 --> 01:09:03,399 bunch of services running on the 1320 01:09:03,399 --> 01:09:05,679 production environment but if you hit a 1321 01:09:05,679 --> 01:09:07,600 snack then how are you going to recover 1322 01:09:07,600 --> 01:09:09,158 it let's take an example the recent 1323 01:09:09,158 --> 01:09:10,560 crowd strike 1324 01:09:10,560 --> 01:09:14,000 thing the upgrade we experience like all 1325 01:09:14,000 --> 01:09:16,198 the windows us exper bsod right the 1326 01:09:16,198 --> 01:09:19,238 similar way to overcome this we need to 1327 01:09:19,238 --> 01:09:21,479 have sign images where you can eliminate 1328 01:09:21,479 --> 01:09:23,319 the vulnerability as well as the 1329 01:09:23,319 --> 01:09:26,000 compromise the compromising the images 1330 01:09:26,000 --> 01:09:29,158 in the docker Hub and repository and 1331 01:09:29,158 --> 01:09:31,520 repositories and the most important 1332 01:09:31,520 --> 01:09:34,719 thing we as a security engine we fail to 1333 01:09:34,719 --> 01:09:38,040 rotate the keys right so the reason why 1334 01:09:38,040 --> 01:09:40,719 I bought it up the Vault because Vault 1335 01:09:40,719 --> 01:09:42,920 has something that it can rotate the 1336 01:09:42,920 --> 01:09:45,439 keys periodically you can have the 1337 01:09:45,439 --> 01:09:49,198 policies declared U let's say 30d policy 1338 01:09:49,198 --> 01:09:51,880 or like 90-day policy rotation or 60-day 1339 01:09:51,880 --> 01:09:53,600 whatever you want to based upon the 1340 01:09:53,600 --> 01:09:56,000 requirement so as you keep those 1341 01:09:56,000 --> 01:09:58,679 policies periodically you can like you 1342 01:09:58,679 --> 01:10:01,159 know you can eliminate the uh the 1343 01:10:01,159 --> 01:10:03,480 compromising of credentials Keys like 1344 01:10:03,480 --> 01:10:04,880 you know all sensitive information in 1345 01:10:04,880 --> 01:10:05,840 the 1346 01:10:05,840 --> 01:10:07,080 docker 1347 01:10:07,080 --> 01:10:08,280 [Music] 1348 01:10:08,280 --> 01:10:11,560 so yeah so that's all uh for the GCR 1349 01:10:11,560 --> 01:10:14,000 standpoint um yeah thanks for joining 1350 01:10:14,000 --> 01:10:16,360 this Workshop uh I would love to like 1351 01:10:16,360 --> 01:10:18,440 you know uh walk you through guys if you 1352 01:10:18,440 --> 01:10:21,480 have any sort of VM I'm happy like I'm 1353 01:10:21,480 --> 01:10:23,440 here for another hour I'm happy to hang 1354 01:10:23,440 --> 01:10:25,320 around like a hang help you guys with 1355 01:10:25,320 --> 01:10:27,080 with spanning of the workshop and 1356 01:10:27,080 --> 01:10:29,120 helping through executing the workshop 1357 01:10:29,120 --> 01:10:33,040 too so beside this uh here is our email 1358 01:10:33,040 --> 01:10:34,640 address and as well as the Twitter 1359 01:10:34,640 --> 01:10:37,440 account um we will be dropping us like 1360 01:10:37,440 --> 01:10:40,480 the notes uh like Cloud Village folks if 1361 01:10:40,480 --> 01:10:42,120 you can you can retre from them if not 1362 01:10:42,120 --> 01:10:43,760 you can email us and we can share the 1363 01:10:43,760 --> 01:10:46,600 handouts as well and that's uh something 1364 01:10:46,600 --> 01:10:48,800 we rant the free time we rant around on 1365 01:10:48,800 --> 01:10:51,880 a podcast cyber G podcast me and my budy 1366 01:10:51,880 --> 01:10:54,719 like Amir so we just talk about devops 1367 01:10:54,719 --> 01:10:56,000 emerging 1368 01:10:56,000 --> 01:10:59,080 emerging uh uh cyber security practices 1369 01:10:59,080 --> 01:11:02,040 and we make audience security awareness 1370 01:11:02,040 --> 01:11:03,320 and then make sure like you know they 1371 01:11:03,320 --> 01:11:05,400 are secure and they protected digital 1372 01:11:05,400 --> 01:11:08,010 assets too thanks all 1373 01:11:08,010 --> 01:11:12,520 [Applause]