diff --git a/docu/Concepts/BusinessRequirements/CommunityVerwaltung.md b/docu/Concepts/BusinessRequirements/CommunityVerwaltung.md index b9809d157..d2c1370a2 100644 --- a/docu/Concepts/BusinessRequirements/CommunityVerwaltung.md +++ b/docu/Concepts/BusinessRequirements/CommunityVerwaltung.md @@ -210,7 +210,7 @@ In diesem Kapitel werden die Attribute beschrieben, die in einer Community zu sp #### Key -Der *Community-Key* dient zur technisch eindeutigen Identifizierung einer Gradido-Community in dem Multi-Community-Kommunikations Verbund. Der *Key* wird direkt bei der Inbetriebnahme einer neuen Community initialisiert - zum Beispiel als UUID oder eine andere aplhanummerische Kennung - und während der Federation mit den schon existierenden Communities ausgetauscht. Falls dabei auffällt, dass schon exakt der gleiche Key für eine andere Community exisitieren sollte, dann wird dieser mit einem neuen Wert initialisiert bis eine Eindeutigkeit im gesamten Community-Verbund hergestellt ist. +Der *Community-Key* dient zur technisch eindeutigen Identifizierung einer Gradido-Community in dem Multi-Community-Kommunikations Verbund. Der *Key* wird direkt bei der Inbetriebnahme einer neuen Community initialisiert - zum Beispiel als einfache UUID oder eine andere alphanummerische Sequenz - und während der Federation mit den schon existierenden Communities ausgetauscht. Falls dabei auffällt, dass irgendwelche Konflikte, wie ein exakt gleicher Key einer anderen Community oder gleiche URL bei unterschiedlichen Keys, etc. , exisitieren, dann wird der Key mit einem neuen Wert initialisiert bis alle Konflikte für eine Eindeutigkeit der Community im gesamten Community-Verbund beseitigt sind. Die Motivation dieses technischen Schlüssels liegt in der einmaligen Initialisierung bei der Community-Erstellung und in der Unveränderlichkeit danach. Alle anderen möglichen Attribute, die ebenfalls als Schlüssel für eine Community nutzbar wären, wie die URL oder evtl. der Name, können im Laufe der Existenz einer Community verändert werden. diff --git a/docu/Concepts/BusinessRequirements/graphics/Ablauf_Neue_Community_erstellen.drawio b/docu/Concepts/BusinessRequirements/graphics/Ablauf_Neue_Community_erstellen.drawio index 4e18bf615..e3d691565 100644 --- a/docu/Concepts/BusinessRequirements/graphics/Ablauf_Neue_Community_erstellen.drawio +++ b/docu/Concepts/BusinessRequirements/graphics/Ablauf_Neue_Community_erstellen.drawio @@ -247,10 +247,13 @@ - + - + + + + @@ -268,7 +271,7 @@ - + @@ -375,6 +378,15 @@ + + + + + + + + + diff --git a/docu/Concepts/TechnicalRequirements/CommunityCommunication.md b/docu/Concepts/TechnicalRequirements/CommunityCommunication.md index afcc133e7..82aea9013 100644 --- a/docu/Concepts/TechnicalRequirements/CommunityCommunication.md +++ b/docu/Concepts/TechnicalRequirements/CommunityCommunication.md @@ -2,34 +2,67 @@ This document contains the detailed descriptions of the public API of a community. +## Authentication and Autorization -## Introduction between existing and new community +Each public API of a community has to be authenticated and autorized before. This has to be done by following the *OpenID Connect* protocoll. To fullfil these security requirements a separate security service has to be part of the Gradido-application. -This request is used to exchange data between an existing and a new community. It will be invoked by the existing community, which received a valid newCommunity-Message from a new community during the federation process. +Following the link [OpenID Connect](https://www.npmjs.com/package/openid-client) there can be found a server-side OpenID relying party implementation for node.js runtime. -POST http:///introduce +The authentication of communities base on the community-attributes *key* and *URL*, which where exchanged during the federation process before. In concequence a community that hasn't execute his federation well will be unknown for other communities and can't be authenticated and autorized for further API calls. + + +## Familiarize communities + +This request is used to exchange data between an existing and a new community. It will be invoked by the existing community, which received a valid *newCommunity*-Message from a new community during the federation process. + +The invocation from the federation process gives the *Community-Key* and *New_Community_URL* as input parameters, which are used to get the *Security-Token* from the SecurityService. + + The exchanged data will be transferred as a *CommunityTO* transferobject in both directions as input and output parameter. + +### Route: + +POST https:///familiarizeCommunity/`` + +### Input-Data: + +The existing community will collect it own data an transferre it as ``` { - "key" : "community-key", - "name" : "name of community", - "description" : "description of community", - "icon" : "picture of community", - "birthday" : "day of community creation", - "members" : "amount of members", - "known_communities" : "amount of known communities", - "trading_communities" : "amount of communities the members trade with" + CommunityTO { + "key" : "community-key", + "name" : "name of community", + "description" : "description of community", + "icon" : "picture of community", + "birthday" : "day of community creation", + "members" : "amount of members", + "known_communities" : "amount of known communities", + "trading_communities" : "amount of communities the members trade with" + } } ``` -The new community will save the data and returns the following +### Output-Data: + +The new community will save the received data and returns its own collected data as ``` { - "key" : "community-key", - "name" : "name of community", - "description" : "description of community", - "icon" : "picture of community", - "birthday" : "day of community creation", + CommunityTO { + "key" : "community-key", + "name" : "name of community", + "description" : "description of community", + "icon" : "picture of community", + "birthday" : "day of community creation", + "members" : "amount of members", + "known_communities" : "amount of known communities", + "trading_communities" : "amount of communities the members trade with" + } } ``` + +### Exceptions: + +In case the transferred community-key from the service-consumer will not match the previous authenticated community on service-provider the exception *UnknownCommunityException* will be thrown. + +In case the transferred data can't be stored on service-provider the exception *WriteAccessException* will be thrown.