Changes for page SMB - Dynamically Manipulate Settings
Last modified by Erik Bakker on 2024/09/03 09:17
From version 8.1
edited by Erik Bakker
on 2022/06/23 16:14
on 2022/06/23 16:14
Change comment:
There is no comment for this version
To version 23.1
edited by Erik Bakker
on 2024/06/21 14:47
on 2024/06/21 14:47
Change comment:
There is no comment for this version
Summary
-
Page properties (4 modified, 0 added, 0 removed)
-
Attachments (0 modified, 0 added, 1 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 - ErrorHandlingconcerningGDPR1 +SMB - Dynamically Manipulate Settings - Parent
-
... ... @@ -1,1 +1,1 @@ 1 -WebHome 1 +Main.eMagiz Academy.Microlearnings.Advanced Level.File based connectivity.WebHome - Default language
-
... ... @@ -1,0 +1,1 @@ 1 +en - Content
-
... ... @@ -1,11 +1,10 @@ 1 1 {{container}}{{container layoutStyle="columns"}}((( 2 -In eMagiz, all errors are raised when a process fails, and you want to have some form of logging end up in the Manage phase of eMagiz. The Manage phase of eMagiz is primarily accessible to support employees, employees working on the project, and in some cases, even more, people have at least view rights. You can imagine that when many people have access to potentially sensitive data, you should consider countermeasures. This way, you can reduce the chances of sensitive data ending up in the wrong hands. Some of the potential countermeasures are available within the platform. Some of them are procedural in nature. In this microlearning, we will learn what you can do to keep your data safe within eMagiz. 2 +In a previous [[microlearning>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level. File based connectivity.intermediate-file-based-connectivity-smb-connectivity.WebHome||target="blank"]] on this subject, we discussed how to configure the various variants of SMB connectivity. We already mentioned that more dynamic options, such as automatically creating a "multi-level" directory (i.e.,/root/sub), are complex to configure and require a different approach. 3 + 4 +In this microlearning, we will examine how to manipulate all settings on the SMB Session Factory to create dynamic values that are injected into the component when a message is processed by the flow. 3 3 4 - Shouldyou have any questions, don't hesitate toget inouch with[[academy@emagiz.com>>mailto:academy@emagiz.com]].6 +If you have any questions, don't hesitate to contact [[academy@emagiz.com>>mailto:academy@emagiz.com]]. 5 5 6 -* Last update: November 15th, 2021 7 -* Required reading time: 5 minutes 8 - 9 9 == 1. Prerequisites == 10 10 11 11 * Advanced knowledge of the eMagiz platform ... ... @@ -12,47 +12,52 @@ 12 12 13 13 == 2. Key concepts == 14 14 15 -This microlearning centers around error handling concerning GDPR 16 -With GDPR, we mean The law on General Data Protection Regulation. 14 +This microlearning centers around dynamically manipulating settings on the SMB Session Factory. 17 17 18 -* The GDPR is a European privacy regulation. It ensures the careful processing of personal data by businesses and organizations. 19 -* eMagiz has various security measures in place to keep your data safe 20 -* You also have a responsibility as a user how you use the data of the customer 16 +* This option is the correct approach when you need to create a directory dynamically or have multiple hosts that host file shares. 21 21 18 +== 3. Dynamically manipulate SMB Session Settings == 22 22 20 +In a previous [[microlearning>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level.File based connectivity.intermediate-file-based-connectivity-smb-connectivity.WebHome||target="blank"]] we learned that we need an SMB Session Factory to set up the initial connection to the SMB drive. In this component, five main settings are relevant. 23 23 24 -== 3. Error Handling regarding GDPR == 22 +* Host 23 +* Port 24 +* Username 25 +* Password 26 +* Share and directory 25 25 26 -In eMagiz, all errors are raised when a process fails, and you want to have some form of logging end up in the Manage phase of eMagiz. The Manage phase of eMagiz is primarily accessible to support employees, employees working on the project, and in some cases, even more, people have at least view rights. You can imagine that when many people have access to potentially sensitive data, you should consider countermeasures. This way, you can reduce the chances of sensitive data ending up in the wrong hands. Some of the potential countermeasures are available within the platform. Some of them are procedural in nature. In this microlearning, we will learn what you can do to keep your data safe within eMagiz. 28 +In theory, each of these settings can be overwritten every time a message is consumed and processed by the flow. In practice, we see two main use cases that are relevant to mention in this microlearning as we see them currently being applied in our community. 29 + 30 +=== 3.1 Dynamic Host === 27 27 28 - In eMagiz, we value thesecurityofyourdata.A detailedoverviewofhowyourdatais securedwithinthe platform andwhen data isexchangedcan be foundn our [SecurityGuide](../howto/security-guide.md).Oneoftheadditionalmeasuresyoucouldtakeon our data modelsistoindicatewhethertheinformationstored in thoseattributesisconfidential.Moreinformationonhowthatworksexactlycanbefoundin this[microlearning](intermediate-defining-your-message-structures-data-model-attribute-confidentiality.md).32 +Suppose you have a multitude of SMB directories (i.e., shares) span across many different host servers. In that case, you need a solution to manipulate pre-existing information on the SMB session factory dynamically. In other words, you need to be able to override the default host configuration in the component with one that is determined based on information in the headers or message. 29 29 30 - Buildingonthat, wehavea storecomponentavailableinthestorewith whichyou canreplacethevalues in these attributes(in casehe original payload is XML) with \*\*\*. TheerrormessageisstillshownforanRCA to be performed,but thesensitivedatais notaccessibletothe user.34 +To do so, we need to add a component to the flow that will override the host setting. This component is called the "Standard service activator." 31 31 32 -[[image:Main.Images.Microlearning.WebHome@advanced- understanding-error-handling-in-emagiz--store-component-gdpr-error-handling.png]]36 +[[image:Main.Images.Microlearning.WebHome@advanced-file-connectivity-dynamically-manipulate-smb-settings--standard-service-activator.png]] 33 33 34 - In termsof process,youshouldknowwhichdata issensitivein termsofGDPRand**not**storethatinformation inexternaltools suchasPostmanandSOAPUI.Furthermore,itwouldto considerhowyouwanttoshape thenotificationstopreventsensitiveinformationfrom beingwillinglydistributedto theeMailboxes ofrecipients.38 +Here, we must define an expression to set the host based on a supplied value. Important in this expression is that we correctly reference the complete name of the SMB Session Factory support object in the flow and that once the host is set, the actual message is passed along. An example of such an expression is {{code}}@'smb.gtwydynm.exit.support.smb-session'.setHost(headers.server) ?: #root{{/code}}. This expression will set the host based on the value in the header called "server" and, once done, will pass the full message to the output channel. 35 35 40 +[[image:Main.Images.Microlearning.WebHome@advanced-file-connectivity-dynamically-manipulate-smb-settings--standard-service-activator-filled-in.png]] 36 36 42 +=== 3.2 Dynamic Share and Directory === 37 37 38 -== 4. Assignment == 44 +If you have a "multi-level" path that eMagiz needs to create automatically, you must dynamically set the Share and Directory settings on the SMB Session Factory support object. 45 + 46 +To do so, we need to add a component to the flow that will override the host setting. This component is called the "Standard service activator." 39 39 40 - Identify whichattributes, ifany,areensitivein nature withinyour (Academy) project. This assignmentcan be completed withinhe (Academy) project you created/used in the previousassignment.48 +[[image:Main.Images.Microlearning.WebHome@advanced-file-connectivity-dynamically-manipulate-smb-settings--standard-service-activator.png]] 41 41 42 - ==5.Key takeaways==50 +Here, we must define an expression to set the host based on a supplied value. Important in this expression is that we correctly reference the complete name of the SMB Session Factory support object in the flow and that once the host is set, the actual message is passed along. An example of such an expression is {{code}}@'smb.gtwydynm.exit.support.smb-session'.setShareAndDir(headers.share) ?: #root{{/code}}. This expression will set the host based on the value in the header called "server" and, once done, will pass the full message to the output channel. 43 43 44 -* The GDPR is a European privacy regulation. It ensures the careful processing of personal data by businesses and organizations. 45 -* eMagiz has various security measures in place to keep your data safe 46 -* You also have a responsibility as a user how you use the data of the customer 52 +[[image:Main.Images.Microlearning.WebHome@advanced-file-connectivity-dynamically-manipulate-smb-settings--standard-service-activator-filled-in-share-and-dir.png]] 47 47 54 +{{warning}}Note that you can combine multiple dynamic settings into one expression to keep the number of components efficient. In that case the code will look something as follows {{code}}@'smb.gtwydynm.exit.support.smb-session'.setShareAndDir(headers.share) ?: @'smb.gtwydynm.exit.support.smb-session'.setHost(headers.server) ?: #root{{/code}}{{/warning}} 48 48 56 +== 4. Key takeaways == 49 49 50 - ==6.SuggestedAdditionalReadings==58 +* This option is the correct approach when you need to create a directory dynamically or have multiple hosts that host file shares. 51 51 52 - Thereareno suggestedadditionalreadingson this topic.60 +== 5. Suggested Additional Readings == 53 53 54 -== 7. Silent demonstration video == 55 - 56 -As this is a more theoretical microlearning, we have no video for this. 57 - 58 -)))((({{toc/}}))){{/container}}{{/container}} 62 +There are no suggested additional readings on this topic.)))((({{toc/}}))){{/container}}{{/container}}
- advanced-understanding-error-handling-in-emagiz--store-component-gdpr-error-handling.png
-
- Author
-
... ... @@ -1,1 +1,0 @@ 1 -XWiki.ebakker - Size
-
... ... @@ -1,1 +1,0 @@ 1 -3.9 KB - Content