Welcome back. In this video, we are going to understand how to secure the externalized properties. The problem with earlier application is my usernames and passwords are plain. They are not encrypted. Somebody who can see this file can easily understand my password. So what I want to do is right now I want to encrypt sacred properties so that nobody can understand my password and my credentials for how to do that.
So for that, there is a module called secure properties. That will just show us a module called a sector properties. Yes. If it is not present, what you have to do is you have to click on Add modules. It becomes such an extra exchange depending upon your any points to do worsen the sacred properties may be present here or may not be present here. If it is not present sacred properties this are of the concert in exchange just click on it and you need to log into your any point platform account account here.
Then what you can do is you can such secure and private research in exchange any point exchange So, don't worry more about any point exchange. We will discuss more on any point exchange later. But as of now understand that any point exchange is a place from where we can actually download the connectors, extract connectors or modules. So, I will type a key or a tablet. It will type it will select. Now I can select secure configuration properties, add and then finish.
But the secure properties we're showing right now is one dot zero dot two and I already have, so I'm not going to finish it, it's already there. If it is not available, this is a procedure to add a module from any point exchange, how secure properties is there? What I have to do is that about global elements, create and I will type your your case cringe Oh I forgot to add it oh yes sir drag and drop it to the next here secure properties there it is available as a plugin in my studio but I forgot to drag and drop here. Now I will go to global elements click on Create and also for secure properties conflict Okay, so what is a filename? I will give a different file name dp secure l dot yamo and the key actually I want some key to encrypt. So what is the key you 1234567 Zero.
All right. And what are the encryption algorithm? There are a lot of encryption, which these secret properties configure can support. I'm going with defaults a SMC which. Okay. So I configured ticker properties conflict.
Okay, let me see the XML now. Your configuration properties or sector properties also insert is it I'll do one thing. As of now, I want only secure properties. I'll delete configuration properties as a CIO Just how to comment out this part or I will go to Romans and I even I can even delete this part. Okay. Now, let me prepare the file or the actual file a configured dv dash secured as to create it.
So how to create it? I've given it clear documentation here in my documentation page, you can go to this URL where they have clearly mentioned how to generate a file, secure EML file I have documented here also. So this is the command to be executed. Actually, if we go to this page Okay, here is the documentation. And in this page itself, you're given a download link to download a file. You see if you go down somewhere here it is given how to download.
Yes, here it is here and you can download a jar file. I have already downloaded that and here they have given how to execute the command. I've downloaded it and have documented here itself. I will go to Doc's and see here the Dark Sector properties. So go to command line in this folder. Then I will execute this command into the properties tool jar.
And I want a file to be generated encrypt by using which algorithm blowfish Eau de select algorithm blowfish or what else here the algorithm is he is that we select blowfish. I can select anything. And more CBC right so you see okay. Oh here to see the same dry fingerstick properties to ledger. I want to file encrypt using these algorithms and what is a key key uses it Pete, let me use the same thing 16 characters. So that's why I use it.
So I'll edit it and you use a b c, d, e F, G, H I J, K should we known 16 characters? Okay give it same thing using same values, I'm saying is a particular as Delta Gamma. I put my DVD as delta tml copied is the v dash there dot EML into the same folder. I think there was an existing DBA security there are limited now I will execute this command should generate a file named DBA secured as Dell to check yes it is generated now we open it yep. See the values are encrypted. Great.
Now, hotel does exist just copy this YAML file into my project SRC main resources and then all the changes. Well yeah there are changes. Here in database config. Whenever I want to point a property which is secured, I should use secure colon colon. prefix secure. colon, colon.
There are so you the name Your current password one also a less secure column. So whenever I want to read a thicker property have uses prefix. These are the changes. Okay. Then let me deploy it right now. I started yeah but deployment failed.
Why? Never check. Failure to deploy To the same current fine configuration property with a secure as Dell was my file name. The file name is wrong actually by mistake. d v dash secure. Okay.
I guess entertaining my document. dB dash secured as, okay. Now I've written I made the changes I will deploy it and stop it and restart. Let's wait and possibly Oh again the deployment failed. So what is the problem? Actually I married to Feeling pinch money the problem is in this dp test dev.pm and when I was giving values to actually keep them valid otherwise, record value will not be generated properly.
Now I have done the modification let me generate the sexual file again. Okay, got generated now, copy this, paste it here Okay, then we try to really bright Pause the video. Okay, now the deployment is successful. There are my exceptions, huh? Let me try to give a request. So that is your request for slash dB.
Yep, I got the same response. So now in this case, you understood how to externalize the properties using encrypted values. So I intentionally made up error, I have to enclose the values in double quotes, otherwise, you'll get the problem. So great. You understood how to encrypt the properties. So there's a lab for half this video, please go to Step three, and complete the success.
See you next week.