Changes for page SMB - Dynamically Manipulate Settings
Last modified by Erik Bakker on 2024/09/03 09:17
From 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
To version 21.1
edited by Erik Bakker
on 2024/06/21 12:37
on 2024/06/21 12:37
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -1,9 +1,9 @@ 1 1 {{container}}{{container layoutStyle="columns"}}((( 2 -In a previous [[microlearning>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level. ,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.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. In there 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 3 4 -In this microlearning ,we willexaminehowtomanipulate 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.4 +In this microlearning we will look into how we can 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. 5 5 6 - Ifyou have any questions, don't hesitate tocontact [[academy@emagiz.com>>mailto:academy@emagiz.com]].6 +Should you have any questions, don't hesitate to get in touch with [[academy@emagiz.com>>mailto:academy@emagiz.com]]. 7 7 8 8 == 1. Prerequisites == 9 9 ... ... @@ -11,51 +11,30 @@ 11 11 12 12 == 2. Key concepts == 13 13 14 -This microlearning centers around dynamically manipulating settings on the SMB Session Factory. 14 +This microlearning centers around error handling concerning GDPR 15 +With GDPR, we mean The law on General Data Protection Regulation. 15 15 16 -* This option is the correct approach when you need to create a directory dynamically or have multiple hosts that host file shares. 17 +* The GDPR is a European privacy regulation. It ensures the careful processing of personal data by businesses and organizations. 18 +* eMagiz has various security measures in place to keep your data safe 19 +* You also have a responsibility as a user how you use the data of the customer 17 17 18 -== 3. Dynamicallymanipulate SMB SessionSettings==21 +== 3. Error Handling regarding GDPR == 19 19 20 -In a pre vious[[microlearning>>doc:Main.eMagizAcademy.Microlearnings.IntermediateLevel.Filebasedconnectivity.intermediate-file-based-connectivity-smb-connectivity.WebHome||target="blank"]]welearned that we needanSMBSessionFactoryto setuptheinitial connection to theSMBdrive. In this component,fivemain settingsarerelevant.23 +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. 21 21 22 -* Host 23 -* Port 24 -* Username 25 -* Password 26 -* Share and directory 25 +In eMagiz, we value the security of your data. A detailed overview of how your data is secured within the platform and when data is exchanged can be found in our [[Security Guide>>doc:Main.eMagiz Academy.Fundamentals.fundamental-emagiz-security-guide||target="blank"]]. One of the additional measures you could take on our data models is to indicate whether the information stored in those attributes is confidential. More information on how that works exactly can be found in this [[microlearning>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level.Defining message structures.intermediate-defining-your-message-structures-data-model-attribute-confidentiality||target="blank"]]. 27 27 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 +Building on that, we have a [[store component>>doc:Main.eMagiz Store.Accelerators.Mask Values.WebHome||target="blank"]] available in the store with which you can replace the values in these attributes (in case the original payload is XML) with ~*~*~*. The error message is still shown for an RCA to be performed, but the sensitive data is not accessible to the user. 31 31 32 - Suppose you havemultitudeof SMB directories (i.e., shares) spanacross many different host servers. In thatcase, you needa solutionto manipulatepre-existing informationon the SMB session factorydynamically. Inotherwords, you need to be able to override the default host configurationnthewith one that isdetermined basedon informationthe headers or message.29 +[[image:Main.Images.Microlearning.WebHome@advanced-understanding-error-handling-in-emagiz--store-component-gdpr-error-handling.png]] 33 33 34 - Todo so,weneedto addacomponent totheflowthat willoverride the host setting.This componentis called the"Standardserviceactivator."31 +In terms of process, you should know which data is sensitive in terms of GDPR and **not** store that information in external tools such as Postman and SOAP UI. Furthermore, it would be best to consider how you want to shape the notifications to prevent sensitive information from being willingly distributed to the eMail boxes of recipients. 35 35 36 -[[image:Main.Images.Microlearning.WebHome@advanced-file-connectivity-dynamically-manipulate-smb-settings--standard-service-activator.png]] 37 - 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. 39 - 40 -[[image:Main.Images.Microlearning.WebHome@advanced-file-connectivity-dynamically-manipulate-smb-settings--standard-service-activator-filled-in.png]] 41 - 42 -=== 3.2 Dynamic Share and Directory === 43 - 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." 47 - 48 -[[image:Main.Images.Microlearning.WebHome@advanced-file-connectivity-dynamically-manipulate-smb-settings--standard-service-activator.png]] 49 - 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. 51 - 52 -[[image:Main.Images.Microlearning.WebHome@advanced-file-connectivity-dynamically-manipulate-smb-settings--standard-service-activator-filled-in-share-and-dir.png]] 53 - 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}} 55 - 56 56 == 4. Key takeaways == 57 57 58 -* This option is the correct approach when you need to create a directory dynamically or have multiple hosts that host file shares. 35 +* The GDPR is a European privacy regulation. It ensures the careful processing of personal data by businesses and organizations. 36 +* eMagiz has various security measures in place to keep your data safe 37 +* You also have a responsibility as a user how you use the data of the customer 59 59 60 60 == 5. Suggested Additional Readings == 61 61