Changes for page SMB - Dynamically Manipulate Settings
Last modified by Erik Bakker on 2024/09/03 09:17
From version 27.1
edited by Erik Bakker
on 2024/07/01 13:08
on 2024/07/01 13:08
Change comment:
There is no comment for this version
Summary
-
Page properties (5 modified, 0 added, 0 removed)
-
Attachments (0 modified, 1 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,0 @@ 1 -SMB - Dynamically Manipulate Settings - Parent
-
... ... @@ -1,1 +1,0 @@ 1 -Main.eMagiz Academy.Microlearnings.Advanced Level.File based connectivity.WebHome - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. ebakker1 +XWiki.marijn - Default language
-
... ... @@ -1,1 +1,0 @@ 1 -en - Content
-
... ... @@ -1,86 +1,71 @@ 1 -{{container}}{{container layoutStyle="columns"}}((( 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. 1 +{{html wiki="true"}} 2 +<div class="ez-academy"> 3 + <div class="ez-academy_body"> 5 5 6 - If you haveany questions,don't hesitate tocontact [[academy@emagiz.com>>mailto:academy@emagiz.com]].5 +<div class="doc"> 7 7 8 -== 1. Prerequisites == 9 9 10 -* Advanced knowledge of the eMagiz platform 11 11 12 -= =2.Keyconcepts==9 += Error Handling concerning GDPR = 13 13 14 - Thismicrolearning centers arounddynamicallymanipulatingsettings on theSMBSessionFactory.11 +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. 15 15 16 - * Thisoptionis thecorrectapproachwhenyouneedtocreateadirectorydynamicallyorhavemultiple hosts thathost file shares.13 +Should you have any questions, don't hesitate to get in touch with academy@emagiz.com. 17 17 18 -== 3. Dynamically manipulate SMB Session Settings == 15 +* Last update: November 15th, 2021 16 +* Required reading time: 5 minutes 19 19 20 - Ina previous [[microlearning>>doc:Main.eMagizAcademy.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.18 +== 1. Prerequisites == 21 21 22 -* Host 23 -* Port 24 -* Username 25 -* Password 26 -* Share and directory 20 +* Advanced knowledge of the eMagiz platform 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 === 22 +== 2. Key concepts == 31 31 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. 24 +This microlearning centers around error handling concerning GDPR 25 +With GDPR, we mean The law on General Data Protection Regulation. 33 33 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." 27 +* The GDPR is a European privacy regulation. It ensures the careful processing of personal data by businesses and organizations. 28 +* eMagiz has various security measures in place to keep your data safe 29 +* You also have a responsibility as a user how you use the data of the customer 35 35 36 -[[image:Main.Images.Microlearning.WebHome@advanced-file-connectivity-dynamically-manipulate-smb-settings--standard-service-activator.png]] 37 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: 39 39 40 - {{code}}@'smb.gtwydynm.exit.support.smb-session'.setHost(headers.server)?:#root{{/code}}33 +== 3. Error Handling regarding GDPR == 41 41 42 - This expression willsetthe hostbasedon the value in theheadercalled"server"and, oncedone,willpassthefullmessage to the output channel.35 +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. 43 43 44 - [[image:Main.Images.Microlearning.WebHome@advanced-file-connectivity-dynamically-manipulate-smb-settings--standard-service-activator-filled-in.png]]37 +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](../howto/security-guide.md). 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](intermediate-defining-your-message-structures-data-model-attribute-confidentiality.md). 45 45 46 - ===3.2 DynamicShare andDirectory===39 +Building on that, we have a store component 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. 47 47 48 -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. 49 - 50 -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." 41 +<p align="center">[[image:advanced-understanding-error-handling-in-emagiz--store-component-gdpr-error-handling.png||]]</p> 51 51 52 - [[image:Main.Images.Microlearning.WebHome@advanced-file-connectivity-dynamically-manipulate-smb-settings--standard-service-activator.png]]43 +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. 53 53 54 - Here,we must define an expression to set the host based on a supplied value. Important in this expression is that wecorrectly reference the complete name of the SMB Session Factory support objectin the flow and that once the host is set, the actual message is passed along. An example of such an expression is:45 +===== Practice ===== 55 55 56 - {{code}}@'smb.gtwydynm.exit.support.smb-session'.setShareAndDir(headers.share) ?: #root{{/code}}47 +== 4. Assignment == 57 57 58 - Thisexpression willsetthehostbasedonthe value in the header called"server"and, oncedone,willpassthefullmessagetothe outputchannel.49 +Identify which attributes, if any, are sensitive in nature within your (Academy) project. This assignment can be completed within the (Academy) project you created/used in the previous assignment. 59 59 60 - [[image:Main.Images.Microlearning.WebHome@advanced-file-connectivity-dynamically-manipulate-smb-settings--standard-service-activator-filled-in-share-and-dir.png]]51 +== 5. Key takeaways == 61 61 62 -{{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}} 53 +* The GDPR is a European privacy regulation. It ensures the careful processing of personal data by businesses and organizations. 54 +* eMagiz has various security measures in place to keep your data safe 55 +* You also have a responsibility as a user how you use the data of the customer 63 63 64 -=== 3.3 Additional Dynamic Options === 65 65 66 -Although we don't think these options will be used much we define them here for the sake of completeness and give you examples on how to make these additional values dynamically. 67 67 68 -== ==3.3.1Port ====59 +== 6. Suggested Additional Readings == 69 69 70 - {{code}}@'smb.gtwydynm.exit.support.smb-session'.setPort(headers.port)?: #root{{/code}}61 +There are no suggested additional readings on this topic. 71 71 72 -== ==3.3.2Username ====63 +== 7. Silent demonstration video == 73 73 74 - {{code}}@'smb.gtwydynm.exit.support.smb-session'.setUsername(headers.username)?:#root{{/code}}65 +As this is a more theoretical microlearning, we have no video for this. 75 75 76 -==== 3.3.3 Password ==== 67 +</div> 68 +</div> 69 +</div> 77 77 78 -{{code}}@'smb.gtwydynm.exit.support.smb-session'.setPassword(headers.password) ?: #root{{/code}} 79 - 80 -== 4. Key takeaways == 81 - 82 -* This option is the correct approach when you need to create a directory dynamically or have multiple hosts that host file shares. 83 - 84 -== 5. Suggested Additional Readings == 85 - 86 -There are no suggested additional readings on this topic.)))((({{toc/}}))){{/container}}{{/container}} 71 +{{/html}}
- advanced-understanding-error-handling-in-emagiz--store-component-gdpr-error-handling.png
-
- Author
-
... ... @@ -1,0 +1,1 @@ 1 +XWiki.marijn - Size
-
... ... @@ -1,0 +1,1 @@ 1 +3.9 KB - Content