1 00:00:01,370 --> 00:00:06,020 As we discussed in the last video we need to somehow make the Jason Webb token signing key available 2 00:00:06,020 --> 00:00:07,780 to all of our different services. 3 00:00:07,790 --> 00:00:12,440 We're going to solve this using a feature inside of Cuban ideas that is designed for sharing its secret 4 00:00:12,440 --> 00:00:15,680 information throughout different pieces of our application. 5 00:00:15,770 --> 00:00:17,580 So a couple of quick diagrams. 6 00:00:17,720 --> 00:00:19,950 This is a diagram of our Cuban eddies node. 7 00:00:19,970 --> 00:00:24,920 Inside of it there are many different pods in it and in our case all these different pods are running 8 00:00:24,950 --> 00:00:30,930 a container that needs to somehow get access to that Jason Webb token signing key to do so we are going 9 00:00:30,930 --> 00:00:34,730 to create a new kind of object inside of our cluster. 10 00:00:34,730 --> 00:00:41,060 But this is an object called a secret remember that objects are referring to just about everything we 11 00:00:41,060 --> 00:00:42,650 create inside of Cuban eddies. 12 00:00:42,650 --> 00:00:45,320 So a pod is an object a deployment is an object. 13 00:00:45,320 --> 00:00:50,700 And so on a secret is a is a object just the same inside of a secret. 14 00:00:50,720 --> 00:00:55,880 We can store little key value pairs of information so you and I can create a secret that's going to 15 00:00:55,880 --> 00:01:02,350 store something it says Jason Webb token key equals a SDF or something very similar to that. 16 00:01:02,510 --> 00:01:07,340 Once we create the secret we can load it into the containers that are created inside of all of our different 17 00:01:07,340 --> 00:01:13,590 pods the secret is going to be exposed as an environment variable. 18 00:01:13,590 --> 00:01:18,060 Now this diagram right here is just a little bit deceptive because I'm saying that inside of our pod 19 00:01:18,120 --> 00:01:23,150 we've got some off thing and there's some environment variables to be precise. 20 00:01:23,190 --> 00:01:28,980 We have our ops application right here really the node program of off that is running inside the container 21 00:01:29,490 --> 00:01:33,150 and inside of that container there are a set of environment variables. 22 00:01:33,150 --> 00:01:36,900 So when I'm saying that there is an environment variable inside the pod the environment variable is 23 00:01:36,900 --> 00:01:43,870 really inside the same container as the off application they're going to take that Jason key or assuming 24 00:01:43,870 --> 00:01:49,450 that Jason Webb token key equals a SDF assign it to these environment variable sets and then we can 25 00:01:49,450 --> 00:01:53,830 easily access that information from inside of our node J.S. code. 26 00:01:53,920 --> 00:01:57,310 So that's how we're going to store the Jason Webb token signing key. 27 00:01:57,310 --> 00:02:02,830 In one location securely and then actually get it available to all the different services that need 28 00:02:02,830 --> 00:02:05,740 it now that we understand what we're gonna do. 29 00:02:05,790 --> 00:02:06,990 Another quick pause right here. 30 00:02:07,020 --> 00:02:11,700 We will create the secret in the next video and then make sure that it gets exposed to all of our different 31 00:02:11,700 --> 00:02:12,630 micro surfaces.