Changes for page Data Exchange
Last modified by Erik Bakker on 2024/09/05 14:00
From version 10.1
edited by Erik Bakker
on 2022/07/26 14:11
on 2022/07/26 14:11
Change comment:
There is no comment for this version
Summary
-
Page properties (5 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,0 @@ 1 -Data Exchange - Parent
-
... ... @@ -1,1 +1,0 @@ 1 -WebHome - Author
-
... ... @@ -1,1 +1,1 @@ 1 -XWiki. ebakker1 +XWiki.marijn - Default language
-
... ... @@ -1,1 +1,0 @@ 1 -en - Content
-
... ... @@ -1,92 +1,115 @@ 1 -{{ container}}{{containerlayoutStyle="columns"}}(((2 - Because eMagiz providesthe integration between two or more applicationsvia theeMagizplatform, the point at which the data is interchangedbetween application and integration is a critical part of the integration in terms of security.3 - WithineMagiz,therearethree mainintegration patternsa user canconfigure to support their business caseost optimally. First, this section will look at all three integration types andspecifythe security measures.1 +{{html wiki="true"}} 2 +<div class="ez-academy"> 3 + <div class="ez-academy_body"> 4 4 5 - Shouldyou haveany questions, please get in touch with [[academy@emagiz.com>>mailto:academy@emagiz.com]].5 +<div class="doc"> 6 6 7 -== 1. Prerequisites == 8 8 9 -* Expert knowledge of the eMagiz platform 10 10 11 -= =2.Key concepts==9 += XPath Advanced = 12 12 13 - This microlearningfocuses on securityconsiderations when exchanging datavia the platform.11 +Within the crash course, we already explained XPath conceptually. In that same microlearning, we also looked at some more uncomplicated cases of using XPath within your transformation. If you need to brush up on that knowledge, please check out this [microlearning](crashcourse-platform-create-transformation-xpath-basic.md). In the intermediate microlearning on this subject, we built upon that knowledge. Please check out this [microlearning](intermediate-create-your-transformations-xpath-intermediate.md) if you need a refresher on that. In this microlearning, we will build upon that knowledge and look at some concrete, practical examples that could be useful in your project. 14 14 15 - * Eachpattern comeswithgenericand specificchecksandbalancesnsuresecurityis taken careofwhenexchangingdata.13 +Should you have any questions, please get in touch with academy@emagiz.com. 16 16 17 -== 3. Data Exchange == 15 +* Last update: October 25th, 2021 16 +* Required reading time: 6 minutes 18 18 19 -Because eMagiz provides the integration between two or more applications via the eMagiz platform, the point at which the data is interchanged between application and integration is a critical part of the integration in terms of security. 20 -Within eMagiz, there are three main integration patterns a user can configure to support their business case most optimally. First, this section will look at all three integration types and specify the security measures. 18 +== 1. Prerequisites == 21 21 22 -=== 3.1 Messaging === 20 +* Advanced knowledge of the eMagiz platform 21 +* [XPath Basic](crashcourse-platform-create-transformation-xpath-basic.md) 22 +* [XPath Intermediate](intermediate-create-your-transformations-xpath-intermediate.md) 23 23 24 - Messaging isthe most flexible option ofthe three; therefore,awidege ofptions isavailable within eMagiz tosecure the connections.25 - eMagiz offerssersthetoolstoset up integrations andend-points securely. eMagizsupports well-knownmarketstandards,including:24 +crashcourse-platform-create-transformation-xpath-basic 25 +crashcourse-platform-create-transformation-XPath-basic 26 26 27 -* OpenID Connect 28 -* WS-Security 29 -* API Keys in combination with HTTPS/SSL 30 -* SOAP Authentication 31 -* OAuth2.0 32 -* Basic Authentication 27 +== 2. Key concepts == 33 33 34 -This way, each connection between theapplicationand theintegration(end-point)can be adequatelysecured and givesthe flexibility toconferwith the externalapplication whichmethod bestsuits theirneeds.29 +This microlearning focuses on more complex XPath operations. 35 35 36 - ===3.2APIGateway===31 +With XPath Advanced, we mean learning that XPath options are complex but could benefit you in your daily work. 37 37 38 - A structure with rolesand rights per role can be specifiedwithin theportal or via anexternalIDP to secure the front end of the API Gateway in eMagiz. Note that for the backend of the API Gateway, the same logic appliesas stated above for messaging, whichmeans that eMagiz supports theindustrystandard. Therefore, you as a user should confer with the external party about the correct method.33 +Some of the more complex XPath options are: 39 39 40 -==== 3.2.1 Portal ==== 35 +* dateTime calculation 36 +* Filter list 37 +* XPath on JSON 38 +* SpEL notation for XPath 41 41 42 -As shown in the picture below, the roles are defined so that the Read role can only access two integrations available for this specific API Gateway. If a client has insufficient rights, they will receive a 401 Unauthorized 43 43 44 -[[image:Main.Images.Fundamental.WebHome@fundamental-emagiz-security-guide--api-gateway-portal-feedback.png]] 45 45 46 -== ==3.2.2(External)IDP====42 +== 3. XPath Advanced == 47 47 48 -Apart from configuring the roles, users, and rights within the portal itself, it is also possible to hook the API Gateway up to an (external) IDP. 49 -By communicating with this IDP via the OAuth2.0 protocol, a check is done every time a client calls a specific operation to see whether that client has sufficient rights to access the operation. 44 +Within the crash course, we already explained XPath conceptually. In that same microlearning, we also looked at some more uncomplicated cases of using XPath within your transformation. If you need to brush up on that knowledge, please check out this [microlearning](crashcourse-platform-create-transformation-xpath-basic.md). In the intermediate microlearning on this subject, we built upon that knowledge. Please check out this [microlearning](intermediate-create-your-transformations-xpath-intermediate.md) if you need a refresher on that. In this microlearning, we will build upon that knowledge and look at some concrete, practical examples that could be useful in your project. 50 50 51 - If theclient has sufficientrights, theprocesscontinues. For example,if the client has insufficientrights,the client receives a401 Unauthorized.46 +Some of the more complex XPath options are: 52 52 53 -==== 3.2.3 Error Handling ==== 48 +* dateTime calculation 49 +* Filter list 50 +* XPath on JSON 51 +* SpEL notation for XPath 54 54 55 - Topreventthe error message if itoccurs is sent straight back to the client, youcan configure the front end of the API Gateway so that correct HTTP Status codes are given back tothe client,including a descriptive message.53 +=== 3.1 dateTime calculation === 56 56 57 - Formore information onhowthispreciselycanbeconfiguredviathe eMagiz platform,pleasecheckthefollowing [[microlearning>>doc:Main.eMagizAcademy.Microlearnings.Crash Course.CrashCourseAPI Gateway.crashcourse-api-gateway-configure-roles-and-users.WebHome||target="blank"]].55 +Sometimes we see that a dateTime calculation is needed within a transformation to determine a specific action. As these calculations are not natively supported within the eMagiz platform, you need to use XPath's functionality to calculate the new valid date (or dateTime). 58 58 59 - ===3.3EventStreaming ===57 +The XPath standard offers several functions to calculate with dateTime values. The two most used options are dayTimeDuration and yearMonthDuration. With the help of the dayTimeDuration, you can add, subtract, multiple, or divide seconds, minutes, hours, and days regarding the original value. The yearMonthDuration works similarly but then for months and years. An example of such an XPath is: <xsl:value-of xmlns:xs="http://www.w3.org/2001/XMLSchema" select="CDM:StartDate + xs:dayTimeDuration('P1D') * xs:yearMonthDuration('P1M')"/>. In this example, XPath adds one day and subtracts one month from the input date. Note that making this work requires the additional namespace to be defined. Therefore you need a custom snippet within your transformation or a custom transformation to make this work. Furthermore, note that the P1D and P1M could also be filled with the help of parameters to make them dynamic in nature. 60 60 61 -Within the Event Streaming solution, eMagiz provides Event Streaming users, and topics can be created. 62 -Access to a topic within a cluster is governed by an Access Control List (ACL). This ACL links users to a topic and defines what the user can do on a topic (consume, produce, both). 59 +Some examples that we saw during the years: 63 63 64 -Only users with sufficient rights in the Deploy phase of eMagiz can add users, and topics and change the ACL entries specific to the Event Streaming cluster. 61 +* https://my.emagiz.com/p/question/172825635700358186 62 +* https://my.emagiz.com/p/question/172825635700352588 65 65 66 - Apartfromproducing or consuming data on specific topics based on the ACL, users also need a valid Keystore(containing the key and certgenerated automatically) and a valid truststore(containing the CA certificate of the event streaming cluster) to produce or consume data.64 +=== 3.2 Filter list === 67 67 68 - These are allsecurity measures to prevent thirdpartiesfromunauthorized access to thedata storedon the topics.66 +Sometimes you have a large message which contains a certain list within it. However, logic dictates that you can only send the message if at least one entry in the list for which attribute A is filled and attribute B equals type C. To make that happen in XPath, we first need to navigate to the list within the message. As we previously learned, there are two options to do so. One is to use // to navigate to the entity somewhere in the tree directly. The other is to start at the root and walk the tree from there. In this example, we use the latter. That results in the following XPath example: /root/list[attributeB = 'type C']/attributeA !=''. With this XPath, you filter the list on the specified check and subsequently check whether one of those entries that remains has an attributeA which is filled in. 69 69 70 - Formoreinformation onhowthis precisely can be configuredvia the eMagiz platform, please check the following [[microlearning>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course EventStreaming.crashcourse-eventstreaming-user-management.WebHome||target="blank"]].68 +=== 3.3 XPath on JSON === 71 71 72 - ===3.4General===70 +With the release of build number .50, we expanded our offering on JSON messages to resemble much of the functionality we previously offered for XML messages. As a result, you can use XPath expressions on JSON messages within the following components (related to XPath): 73 73 74 -Regardless of the selected pattern for your solution, it would be best if you always considered that you only exchange relevant information with the external party. This means you should consider both headers as the payload you need to exchange with the external party. This is particularly interesting for any communication via HTTP gateways as they hold functionality to send all message headers as HTTP headers and vice versa. 72 +* XPath header enricher 73 +* XPath transformer 74 +* XPath router 75 75 76 +To activate the functionality, simply link the JSON source factory support object to one of these components to achieve the desired result. For more information, check out: https://emagiz.github.io/docs/release-notes/build50. 77 + 78 +=== 3.4 SpEL notation for XPath === 79 + 80 +Sometimes you want to perform an XPath operation but store the header via a standard message header enricher component. As a result, you need a valid SpEL expression to help you in this cause. To do so, you need to know the correct notation for an XPath expression when using the SpEL language. An example of the correct notation is: #xpath(payload,'/root/entity/attribute') 81 + 82 +===== Practice ===== 83 + 76 76 == 4. Assignment == 77 77 78 -Check wh etheryoumightbeexchangingtoomuch informationwithanexternal partywithin your project.86 +Check out which of the XPaths we have discussed today can be found within your project. 79 79 This assignment can be completed within the (Academy) project you created/used in the previous assignment. 80 80 81 81 == 5. Key takeaways == 82 82 83 -* Each pattern comes with generic and specific checks and balances to ensure security is taken care of when exchanging data. 84 -* When you are not careful, you might share too much information with external parties. 91 +Some of the more complex XPath options are: 85 85 93 +* dateTime calculation 94 +* Filter list 95 +* XPath on JSON 96 +* SpEL notation for XPath 97 + 98 + 99 + 86 86 == 6. Suggested Additional Readings == 87 87 88 -If you are interested in this topic and want more information, please read the help text provided by eMagiz .102 +If you are interested in this topic and want more information on it, please read the help text provided by eMagiz and read more information on the following link: 89 89 104 +* https://www.w3schools.com/xml/xpath_intro.asp 105 + 90 90 == 7. Silent demonstration video == 91 91 92 -As this is more of theoretical microlearning, there is no video accompanying the microlearning.)))((({{toc/}}))){{/container}}{{/container}} 108 +As this is more of theoretical microlearning, there is no video accompanying the microlearning. 109 + 110 +</div> 111 +</main> 112 +</div> 113 +</div> 114 + 115 +{{/html}}