Changes for page Communication between models
Last modified by Erik Bakker on 2024/09/05 14:00
From version 18.1
edited by Erik Bakker
on 2023/04/13 14:16
on 2023/04/13 14:16
Change comment:
There is no comment for this version
To version 11.1
edited by Erik Bakker
on 2022/07/26 13:40
on 2022/07/26 13:40
Change comment:
There is no comment for this version
Summary
-
Page properties (2 modified, 0 added, 0 removed)
Details
- Page properties
-
- Title
-
... ... @@ -1,1 +1,1 @@ 1 - Communication betweenmodels1 +API Gateway Security - External IDP - Content
-
... ... @@ -1,5 +1,5 @@ 1 1 {{container}}{{container layoutStyle="columns"}}((( 2 - Whenyour integration landscapegrowsthroughtime,youmightdecide tosplitfunctionalusinessprocesses intomultipleeMagizmodels.In thosecases, thequestionofconnecting these modelssily, stable,andsecurelycouldarise.This microlearning willfocuson thatquestionandprovideananswerbasedon ourvisionandbestpracticeswhendealingwiththeplatform.2 +In the crash course on the API Gateway we discussed the various options available to [[secure>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course API Gateway.crashcourse-api-gateway-security.WebHome||target="blank"]] your API Gateway properly. In this microlearning, we will expand our knowledge on that topic by looking at a special case of securing your API Gateway. That case is special as you use an external identity provider (IDP) to govern the roles and users that have rights on your API Gateway. 3 3 4 4 Should you have any questions, please get in touch with [[academy@emagiz.com>>mailto:academy@emagiz.com]]. 5 5 ... ... @@ -9,47 +9,50 @@ 9 9 10 10 == 2. Key concepts == 11 11 12 -This microlearning focuses on communicationbetween twoeMagiz models.Whencommunicatingtoanyexternalparty(fromthe viewofaspecificmodel),youshouldalwaysconsiderhefollowing:12 +This microlearning focuses on using an external IDP to validate whether a user is authorized to execute a certain action on your API Gateway and what configuration is needed in eMagiz to make this work. 13 13 14 -* Security 15 -* Loose coupling 16 -* Maintainability 17 -* Clarity 14 +* The Token and Issuer URL of the external IDP need to be known 15 +* Users and Roles under User Management need to be manually configured and maintained to keep them in sync with the external IDP 18 18 19 -== 3. Communication betweenmodels==17 +== 3. External IDP == 20 20 21 - Mostuserswouldthinkthatcommunication viaqueues to connecttworateMagizmodelsis abrightidea.However,thisissomethingthatwedonotencourage.Wediscouragethisforseveral practical andtechnicalreasonsalike.19 +In the crash course on the API Gateway we discussed the various options available to [[secure>>doc:Main.eMagiz Academy.Microlearnings.Crash Course.Crash Course API Gateway.crashcourse-api-gateway-security.WebHome||target="blank"]] your API Gateway properly. In this microlearning, we will expand our knowledge on that topic by looking at a special case of securing your API Gateway. That case is special as you use an external identity provider (IDP) to govern the roles and users that have rights on your API Gateway. 22 22 23 -When l ooking at thepractical side of thingsgetting it configuredcorrectly is time-consuming and an error-prone action(as is evident by the question).Furthermore,it canlead tounexpectedsituations whereyoumakeatypotolisten toa queueon which no messagesareprovided.This queue will, however,beregisteredon the JMS level (when you activate theflow in questionwiththe custom configuration),which can leadto confusingqueuestatistics andevenmore troublesomefalse-positive alertingbasedonmissing queuemetricsormissingconsumers.21 +When selecting the option OAuth2.0 (or OpenID Connect) you have the option to use the IDP provided by eMagiz which makes the configuration easy or you could use an external IDP which you have control over and want to use for this purposes. 24 24 25 - On topof that,whenyou allowone modelowriteand read from queuesregisteredin another model,maintainingboth models will become very complex.Thisholds for theonesworkingontherojectatthemomentbutalso for thoseworkingonitat a later stage anddoesthat needtoprovide (incidental)supporton theenvironments.23 +In this microlearning we will highlight what you need to configure in Design and Deploy to make this work within the tooling of eMagiz. 26 26 27 - Anotherpracticalreason for not wantingthis is that we donotactively support this use case from eMagiz. This means that when we update our technical infrastructure, we will not consider this scenario. This could lead to additional work in the future and reduced stability of your solution.25 +=== 3.1 Design === 28 28 29 - Fromthetechnical pointofview,the consequence of thisconstructionis thatbothmodels need toknoweachothercertificatesand credentials,whicharenotconsideredsecure.Ontopof that, becauseyou,theoretically,can exchangedatafromanyqueuetoanyqueue, youcould createa situationinwhich updates in onemodel triggerchangesinthe othermodel(i.e.,whenusingthesamedatamodel)thatare unexpected(andfranklyunwanted).27 +On the security level of the API Gateway in Design you need to select the desired option, for example OAuth2.0. Instead of not filling in the token and issuer URL, indicating that you want to use the eMagiz IDP, you need to fill these in to reference the IDP of your choice. Below you see an example of how this could be configured. 30 30 31 -We advise using functionality that makes it explicit that both models function independently of each other. From eMagiz, we consider two valid alternatives for this: 32 -- Using a web service as a communication layer between the two models. This web service can be REST or SOAP and has been implemented before 33 -- Using the Event Streaming functionality of eMagiz to write and read from topics. 29 +[[image:Main.Images.Microlearning.WebHome@expert-securing-data-traffic-api-gw-security-external-idp-security-config-design.png]] 34 34 35 - Both alternativeshavethe benefit that thesecurity canbe tight and explicit (i.e.,onlymodel A canwrite/postdata tomodelB). Furthermore,managing thesolutionbecomesmucheasierasituses thestandardfunctionalitywithin the platform.Therefore, we haveno planstosupportthis approach intheproduct.31 +Note that the environmentID in this example should be replaced with an actual environmentID that references your environment. 36 36 33 +=== 3.2 Deploy === 34 + 35 +Normally, eMagiz will automatically update the User Management information based on the configuration in Design. However, because the identity check is not done by eMagiz but by an external party you need to manually enter the roles and users and configure the scope correctly on role level. 36 + 37 +To do so navigate to User Management in Deploy and add the users you want manually by pressing the New button and providing them with a name. Do subsequently the same for the roles. On role level do not forget to correctly enter the scope to make the call work. Note that the help text on the scope level gently reminds you what you need to do to make this work. 38 + 39 +[[image:Main.Images.Microlearning.WebHome@expert-securing-data-traffic-api-gw-security-external-idp-scope-configuration.png]] 40 + 41 +{{warning}}When implementing this you would be the first to do so with this setup. This means there might be some unexpected behavior when configuring this.{{/warning}} 42 + 37 37 == 4. Assignment == 38 38 39 -Consider what your criteria are when communicating between models and compare them to our criteria. 40 -This assignment can be completed with the help of the (Academy) project you created/used in the previous assignment. 45 +No assignment 41 41 42 42 == 5. Key takeaways == 43 43 44 -* Consider the following when communication between two models 45 -** Security 46 -** Loose coupling 47 -** Maintainability 48 -** Clarity 49 +* The Token and Issuer URL of the external IDP need to be known 50 +* Users and Roles under User Management need to be manually configured and maintained to keep them in sync with the external IDP 51 +* When implementing this you would be the first to do so with this setup. 49 49 50 50 == 6. Suggested Additional Readings == 51 51 52 -If you are interested in this topic and want more information, please consult us at [[productmanagement@emagiz.com>>mailto:productmanagement@emagiz.com]]55 +If you are interested in this topic and want more information, please read the help text provided by eMagiz. 53 53 54 54 == 7. Silent demonstration video == 55 55