Changes for page Data Exchange
Last modified by Erik Bakker on 2024/09/05 14:00
From version 4.1
edited by Erik Bakker
on 2022/06/13 09:38
on 2022/06/13 09:38
Change comment:
There is no comment for this version
To 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 (3 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 - XPathAdvanced1 +Data Exchange - Default language
-
... ... @@ -1,0 +1,1 @@ 1 +en - Content
-
... ... @@ -1,99 +1,92 @@ 1 1 {{container}}{{container layoutStyle="columns"}}((( 2 -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. 2 +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. 3 +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. 3 3 4 4 Should you have any questions, please get in touch with [[academy@emagiz.com>>mailto:academy@emagiz.com]]. 5 5 6 -* Last update: October 25th, 2021 7 -* Required reading time: 6 minutes 8 - 9 9 == 1. Prerequisites == 10 10 11 -* Advanced knowledge of the eMagiz platform 12 -* [[XPath Basic>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course Platform.crashcourse-platform-create-transformation-xpath-basic.WebHome||target="blank"]] 13 -* [[XPath Intermediate>>doc:Main.eMagiz Academy.Microlearnings.Intermediate Level.Create your transformations.intermediate-create-your-transformations-xpath-intermediate.WebHome||target="blank"]][XPath Intermediate](intermediate-create-your-transformations-xpath-intermediate.md) 9 +* Expert knowledge of the eMagiz platform 14 14 15 -crashcourse-platform-create-transformation-xpath-basic 16 -crashcourse-platform-create-transformation-XPath-basic 17 - 18 18 == 2. Key concepts == 19 19 20 -This microlearning focuses on more complexXPathoperations.13 +This microlearning focuses on security considerations when exchanging data via the platform. 21 21 22 - WithXPathAdvanced,wemeanlearningthatXPath options arecomplexbutcouldbenefitouinyourdailywork.15 +* Each pattern comes with generic and specific checks and balances to ensure security is taken care of when exchanging data. 23 23 24 - Someofthemore complexXPathoptionsare:17 +== 3. Data Exchange == 25 25 26 -* dateTime calculation 27 -* Filter list 28 -* XPath on JSON 29 -* SpEL notation for XPath 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. 30 30 22 +=== 3.1 Messaging === 31 31 24 +Messaging is the most flexible option of the three; therefore, a wide range of options is available within eMagiz to secure the connections. 25 +eMagiz offers users the tools to set up integrations and end-points securely. eMagiz supports well-known market standards, including: 32 32 33 -== 3. XPath Advanced == 27 +* OpenID Connect 28 +* WS-Security 29 +* API Keys in combination with HTTPS/SSL 30 +* SOAP Authentication 31 +* OAuth2.0 32 +* Basic Authentication 34 34 35 - Within the crashcourse,wealready explained XPath conceptually. Inthat samemicrolearning,wealso lookedatsomemore uncomplicated cases of usingXPath withinyour transformation. If you need to brushup onhat knowledge, please check outthis [microlearning](crashcourse-platform-create-transformation-xpath-basic.md).Intheintermediatemicrolearningon thissubject, webuilt upon that knowledge. Pleasecheckout this [microlearning](intermediate-create-your-transformations-xpath-intermediate.md)if youneed a refresheronthat.Inthis microlearning,wewill build uponthat knowledgeandlookatsome concrete,practicalexamplesthat could beusefulinyourproject.34 +This way, each connection between the application and the integration (end-point) can be adequately secured and gives the flexibility to confer with the external application which method best suits their needs. 36 36 37 - Someofthe more complex XPathoptionsare:36 +=== 3.2 API Gateway === 38 38 39 -* dateTime calculation 40 -* Filter list 41 -* XPath on JSON 42 -* SpEL notation for XPath 38 +A structure with roles and rights per role can be specified within the portal or via an external IDP to secure the front end of the API Gateway in eMagiz. Note that for the backend of the API Gateway, the same logic applies as stated above for messaging, which means that eMagiz supports the industry standard. Therefore, you as a user should confer with the external party about the correct method. 43 43 44 -=== 3.1 dateTime calculation===40 +==== 3.2.1 Portal ==== 45 45 46 - Sometimes weseethata dateTimecalculationisneeded withinatransformationtodetermine aspecificaction.Asthese calculations arenotnativelysupported withintheeMagizplatform,youneedtouse XPath'sfunctionalitytocalculate thenewvaliddate(ordateTime).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 47 47 48 - 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 divideseconds, minutes, hours, anddays regardingthe originalvalue.TheyearMonthDuration works similarly but thenfor months andyears. An exampleof such anXPath 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 dayand subtracts one month from theinputdate. Note that makingthis work requires theadditional namespace to be defined. Thereforeyou need a custom snippet within yourransformation or a custom transformation to makethis work. Furthermore, note that the P1D andP1M could alsobe filled with the help of parameters to make them dynamicin nature.44 +[[image:Main.Images.Fundamental.WebHome@fundamental-emagiz-security-guide--api-gateway-portal-feedback.png]] 49 49 50 - Someexamplesthat wesaw duringtheyears:46 +==== 3.2.2 (External) IDP ==== 51 51 52 - *https://my.emagiz.com/p/question/17282563570035818653 - *https://my.emagiz.com/p/question/17282563570035258848 +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. 54 54 55 - ===3.2Filter list===51 +If the client has sufficient rights, the process continues. For example, if the client has insufficient rights, the client receives a 401 Unauthorized. 56 56 57 - Sometimesyou 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,thereare two options todo so. One is to use // to navigate to the entity somewhere in the tree directly. The otheris to start at the root and walk the tree from there. In this example, we use the latter. That results in the followingXPath 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.53 +==== 3.2.3 Error Handling ==== 58 58 59 - ===3.3XPath onJSON===55 +To prevent the error message if it occurs is sent straight back to the client, you can configure the front end of the API Gateway so that correct HTTP Status codes are given back to the client, including a descriptive message. 60 60 61 - With thereleaseofbuildnumber.50, weexpandedour offeringon JSON messagestoesemblemuchofthe functionalitywe previously offeredfor XMLmessages.Asaresult,youcan useXPathexpressionson JSON messageswithinthefollowingcomponents(relatedto XPath):57 +For more information on how this precisely can be configured via the eMagiz platform, please check the following [[microlearning>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course API Gateway.crashcourse-api-gateway-configure-roles-and-users.WebHome||target="blank"]]. 62 62 63 -* XPath header enricher 64 -* XPath transformer 65 -* XPath router 59 +=== 3.3 Event Streaming === 66 66 67 -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. 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). 68 68 69 - ===3.4SpELnotationforXPath===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. 70 70 71 - SometimesyouwanttoperformanXPathoperationbutstore the header viaatandard message headerenrichercomponent.Asa result,youneed a validSpELexpressiontohelpyouin this cause.To do so,youneed toknow thecorrectnotationforanXPathexpression whenusing theSpEL language.Anexample of thecorrectnotationis:#xpath(payload,'/root/entity/attribute')66 +Apart from producing or consuming data on specific topics based on the ACL, users also need a valid Keystore (containing the key and cert generated automatically) and a valid truststore (containing the CA certificate of the event streaming cluster) to produce or consume data. 72 72 68 +These are all security measures to prevent third parties from unauthorized access to the data stored on the topics. 73 73 70 +For more information on how this precisely can be configured via the eMagiz platform, please check the following [[microlearning>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course Event Streaming.crashcourse-eventstreaming-user-management.WebHome||target="blank"]]. 74 74 72 +=== 3.4 General === 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. 75 + 75 75 == 4. Assignment == 76 76 77 -Check outwhich ofthe XPathswe have discussedtodaycanbefoundwithin your project.78 +Check whether you might be exchanging too much information with an external party within your project. 78 78 This assignment can be completed within the (Academy) project you created/used in the previous assignment. 79 79 80 80 == 5. Key takeaways == 81 81 82 -Some of the more complex XPath options are: 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. 83 83 84 -* dateTime calculation 85 -* Filter list 86 -* XPath on JSON 87 -* SpEL notation for XPath 88 - 89 - 90 - 91 91 == 6. Suggested Additional Readings == 92 92 93 -If you are interested in this topic and want more information on it, please read the help text provided by eMagizand read more information on the following link:88 +If you are interested in this topic and want more information, please read the help text provided by eMagiz. 94 94 95 -* https://www.w3schools.com/xml/xpath_intro.asp 96 - 97 97 == 7. Silent demonstration video == 98 98 99 99 As this is more of theoretical microlearning, there is no video accompanying the microlearning.)))((({{toc/}}))){{/container}}{{/container}}