You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@unomi.apache.org by dr...@apache.org on 2016/04/28 11:43:33 UTC

incubator-unomi git commit: UNOMI-30 : Moved out specific mappings in property type, allows to add dynamic mapping in properties, updated documentation, removed default trusted tiers configuration, cleaned up code.

Repository: incubator-unomi
Updated Branches:
  refs/heads/master 29e8747f1 -> 86c379efb


UNOMI-30 : Moved out specific mappings in property type, allows to add dynamic mapping in properties, updated documentation, removed default trusted tiers configuration, cleaned up code.


Project: http://git-wip-us.apache.org/repos/asf/incubator-unomi/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-unomi/commit/86c379ef
Tree: http://git-wip-us.apache.org/repos/asf/incubator-unomi/tree/86c379ef
Diff: http://git-wip-us.apache.org/repos/asf/incubator-unomi/diff/86c379ef

Branch: refs/heads/master
Commit: 86c379efb3967678558865b000369dd668fea10c
Parents: 29e8747
Author: Thomas Draier <dr...@apache.org>
Authored: Thu Apr 28 11:43:27 2016 +0200
Committer: Thomas Draier <dr...@apache.org>
Committed: Thu Apr 28 11:43:27 2016 +0200

----------------------------------------------------------------------
 README.md                                       | 75 ++++++++++++--------
 .../java/org/apache/unomi/api/PropertyType.java |  2 +-
 .../unomi/api/services/ProfileService.java      |  4 +-
 .../unomi/rest/ProfileServiceEndPoint.java      |  4 +-
 .../actions/IncrementTweetNumberAction.java     |  4 +-
 .../services/services/EventServiceImpl.java     |  4 +-
 .../services/services/ProfileServiceImpl.java   | 20 +++---
 .../properties/profiles/basic/firstName.json    |  2 +-
 .../cxs/properties/profiles/basic/gender.json   |  2 +-
 .../cxs/properties/profiles/basic/lastName.json |  2 +-
 .../cxs/properties/profiles/contact/city.json   |  2 +-
 .../cxs/properties/profiles/contact/email.json  |  2 +-
 .../properties/profiles/personal/birthDate.json |  2 +-
 .../properties/profiles/social/facebookId.json  |  2 +-
 .../properties/profiles/social/linkedInId.json  |  2 +-
 .../properties/profiles/social/twitterId.json   |  2 +-
 .../cxs/properties/profiles/work/income.json    |  2 +-
 .../resources/OSGI-INF/blueprint/blueprint.xml  |  2 -
 .../resources/org.apache.unomi.thirdparty.cfg   | 12 +++-
 19 files changed, 88 insertions(+), 59 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/86c379ef/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index f5d0684..7c807a7 100644
--- a/README.md
+++ b/README.md
@@ -95,46 +95,25 @@ on your disk and copy all the files from the lib/sigar directory into Karaf's li
 6. If all went smoothly, you should be able to access the context script here : http://localhost:8181/cxs/cluster .
  You should be able to login with karaf / karaf and see basic server information. If not something went wrong during the install.
 
-Installing the MaxMind GeoIPLite2 IP lookup database
-----------------------------------------------------
-
-The Context Server requires an IP database in order to resolve IP addresses to user location.
-The GeoLite2 database can be downloaded from MaxMind here :
-http://dev.maxmind.com/geoip/geoip2/geolite2/
-
-Simply download the GeoLite2-City.mmdb file into the "etc" directory.
-
-Installing Geonames database
-----------------------------
-
-Context server includes a geocoding service based on the geonames database ( http://www.geonames.org/ ). It can be
-used to create conditions on countries or cities.
-
-In order to use it, you need to install the Geonames database into . Get the "allCountries.zip" database from here :
-http://download.geonames.org/export/dump/
-
-Download it and put it in the "etc" directory, without unzipping it.
-Edit $MY_KARAF_HOME/etc/org.apache.unomi.geonames.cfg and set request.geonamesDatabase.forceImport to true, import should start right away.
-Otherwise, import should start at the next startup. Import runs in background, but can take about 15 minutes.
-At the end, you should have about 4 million entries in the geonames index.
- 
-Changing the default configuration
+Configuration
 ----------------------------------
 
-If you want to change the default configuration, you can perform any modification you want in the $MY_KARAF_HOME/etc directory.
+Before starting your Unomi server, you need to properly configure it by editing configuration files.
+All unomi configuration files can be found in the $MY_KARAF_HOME/etc directory, named org.apache.unomi.*.cfg .
 
-The context server configuration is kept in the $MY_KARAF_HOME/etc/org.apache.unomi.web.cfg . It defines the
-addresses and port where it can be found :
+The $MY_KARAF_HOME/etc/org.apache.unomi.web.cfg file defines the addresses and port where Unomi can be found :
 
     contextserver.address=localhost
     contextserver.port=8181
     contextserver.secureAddress=localhost
     contextserver.securePort=9443
 
+Addresses must be updated with reachable addresses, as they will be sent to the client by the cluster end point.
+
 If you need to specify an Elasticsearch cluster name that is different than the default, it is recommended to do this
 BEFORE you start the server for the first time, or you will loose all the data you have stored previously.
 
-To change the cluster name, first create a file called 
+To change the cluster name, first create a file called
 
     $MY_KARAF_HOME/etc/org.apache.unomi.persistence.elasticsearch.cfg
 
@@ -152,6 +131,46 @@ and put any standard Elasticsearch configuration options in this last file.
 If you want your context server to be a client only on a cluster of elasticsearch nodes, just set the node.data property
 to false.
 
+Secured events configuration
+---------------------------
+
+If you need to secure some events, that will be sent only by a trusted third party server, you can update the file :
+
+    $MY_KARAF_HOME/etc/org.apache.unomi.thirdparty.cfg
+
+Ususally, login events, which operate on profiles and do merge on protected properties, must be secured. For each
+trusted third party server, you need to add these 3 lines :
+
+thirdparty.provider1.key=secret-key
+thirdparty.provider1.ipAddresses=127.0.0.1,::1
+thirdparty.provider1.allowedEvents=login,download
+
+The events set in allowedEvents will be secured and will only be accepted if the call comes from the specified IP
+address, and if the secret-key is passed in the X-Unomi-Peer header.
+
+Installing the MaxMind GeoIPLite2 IP lookup database
+----------------------------------------------------
+
+The Context Server requires an IP database in order to resolve IP addresses to user location.
+The GeoLite2 database can be downloaded from MaxMind here :
+http://dev.maxmind.com/geoip/geoip2/geolite2/
+
+Simply download the GeoLite2-City.mmdb file into the "etc" directory.
+
+Installing Geonames database
+----------------------------
+
+Context server includes a geocoding service based on the geonames database ( http://www.geonames.org/ ). It can be
+used to create conditions on countries or cities.
+
+In order to use it, you need to install the Geonames database into . Get the "allCountries.zip" database from here :
+http://download.geonames.org/export/dump/
+
+Download it and put it in the "etc" directory, without unzipping it.
+Edit $MY_KARAF_HOME/etc/org.apache.unomi.geonames.cfg and set request.geonamesDatabase.forceImport to true, import should start right away.
+Otherwise, import should start at the next startup. Import runs in background, but can take about 15 minutes.
+At the end, you should have about 4 million entries in the geonames index.
+ 
 REST API Security
 -----------------
 

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/86c379ef/api/src/main/java/org/apache/unomi/api/PropertyType.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/unomi/api/PropertyType.java b/api/src/main/java/org/apache/unomi/api/PropertyType.java
index 4ab1fdd..ab58990 100644
--- a/api/src/main/java/org/apache/unomi/api/PropertyType.java
+++ b/api/src/main/java/org/apache/unomi/api/PropertyType.java
@@ -43,7 +43,7 @@ public class PropertyType extends MetadataItem {
     private List<DateRange> dateRanges = new ArrayList<>();
     private List<NumericRange> numericRanges = new ArrayList<>();
     private List<IpRange> ipRanges = new ArrayList<>();
-    private Set<String> automaticMappingsFrom;
+    private Set<String> automaticMappingsFrom = new HashSet<>();
     private double rank;
     private String mergeStrategy;
     private Set<Tag> tags = new TreeSet<Tag>();

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/86c379ef/api/src/main/java/org/apache/unomi/api/services/ProfileService.java
----------------------------------------------------------------------
diff --git a/api/src/main/java/org/apache/unomi/api/services/ProfileService.java b/api/src/main/java/org/apache/unomi/api/services/ProfileService.java
index 54a2e0c..ff48abf 100644
--- a/api/src/main/java/org/apache/unomi/api/services/ProfileService.java
+++ b/api/src/main/java/org/apache/unomi/api/services/ProfileService.java
@@ -228,7 +228,7 @@ public interface ProfileService {
      *
      * @return a Map associating targets as keys to related {@link PropertyType}s
      */
-    HashMap<String, Collection<PropertyType>> getAllPropertyTypes();
+    Map<String, Collection<PropertyType>> getAllPropertyTypes();
 
     /**
      * Retrieves all property types with the specified tag also retrieving property types with sub-tags of the specified tag if so specified.
@@ -269,7 +269,7 @@ public interface ProfileService {
      * @param property the property type to persist
      * @return {@code true} if the property type was properly created, {@code false} otherwise (for example, if the property type already existed
      */
-    boolean createPropertyType(PropertyType property);
+    boolean setPropertyType(PropertyType property);
 
     /**
      * Deletes the property type identified by the specified identifier.

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/86c379ef/rest/src/main/java/org/apache/unomi/rest/ProfileServiceEndPoint.java
----------------------------------------------------------------------
diff --git a/rest/src/main/java/org/apache/unomi/rest/ProfileServiceEndPoint.java b/rest/src/main/java/org/apache/unomi/rest/ProfileServiceEndPoint.java
index 3241aac..43028fe 100644
--- a/rest/src/main/java/org/apache/unomi/rest/ProfileServiceEndPoint.java
+++ b/rest/src/main/java/org/apache/unomi/rest/ProfileServiceEndPoint.java
@@ -498,8 +498,8 @@ public class ProfileServiceEndPoint {
      */
     @POST
     @Path("/properties")
-    public boolean createPropertyType(PropertyType property) {
-        return profileService.createPropertyType(property);
+    public boolean setPropertyType(PropertyType property) {
+        return profileService.setPropertyType(property);
     }
 
     /**

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/86c379ef/samples/tweet-button-plugin/src/main/java/org/apache/unomi/samples/tweet_button_plugin/actions/IncrementTweetNumberAction.java
----------------------------------------------------------------------
diff --git a/samples/tweet-button-plugin/src/main/java/org/apache/unomi/samples/tweet_button_plugin/actions/IncrementTweetNumberAction.java b/samples/tweet-button-plugin/src/main/java/org/apache/unomi/samples/tweet_button_plugin/actions/IncrementTweetNumberAction.java
index e4b9cc8..c459519 100644
--- a/samples/tweet-button-plugin/src/main/java/org/apache/unomi/samples/tweet_button_plugin/actions/IncrementTweetNumberAction.java
+++ b/samples/tweet-button-plugin/src/main/java/org/apache/unomi/samples/tweet_button_plugin/actions/IncrementTweetNumberAction.java
@@ -47,7 +47,7 @@ public class IncrementTweetNumberAction implements ActionExecutor {
             propertyType.setValueTypeId("integer");
             propertyType.setTagIds(Collections.singleton("social"));
             propertyType.setTarget(TARGET);
-            service.createPropertyType(propertyType);
+            service.setPropertyType(propertyType);
 
             // create tweeted from property type
             propertyType = new PropertyType(new Metadata(event.getScope(), TWEETED_FROM_PROPERTY, TWEETED_FROM_PROPERTY, "The list of pages a user tweeted from"));
@@ -55,7 +55,7 @@ public class IncrementTweetNumberAction implements ActionExecutor {
             propertyType.setTagIds(Collections.singleton("social"));
             propertyType.setTarget(TARGET);
             propertyType.setMultivalued(true);
-            service.createPropertyType(propertyType);
+            service.setPropertyType(propertyType);
 
             tweetNb = 0;
             tweetedFrom = new ArrayList<>();

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/86c379ef/services/src/main/java/org/apache/unomi/services/services/EventServiceImpl.java
----------------------------------------------------------------------
diff --git a/services/src/main/java/org/apache/unomi/services/services/EventServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/EventServiceImpl.java
index 5d26773..d6f0da4 100644
--- a/services/src/main/java/org/apache/unomi/services/services/EventServiceImpl.java
+++ b/services/src/main/java/org/apache/unomi/services/services/EventServiceImpl.java
@@ -62,7 +62,9 @@ public class EventServiceImpl implements EventService {
                 }
                 ThirdPartyServer thirdPartyServer = thirdPartyServers.get(keys[1]);
                 if (keys[2].equals("allowedEvents")) {
-                    thirdPartyServer.setAllowedEvents(new HashSet<>(Arrays.asList(StringUtils.split(entry.getValue(), ','))));
+                    HashSet<String> allowedEvents = new HashSet<>(Arrays.asList(StringUtils.split(entry.getValue(), ',')));
+                    restrictedEventTypeIds.addAll(allowedEvents);
+                    thirdPartyServer.setAllowedEvents(allowedEvents);
                 } else if (keys[2].equals("key")) {
                     thirdPartyServer.setKey(entry.getValue());
                 } else if (keys[2].equals("ipAddresses")) {

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/86c379ef/services/src/main/java/org/apache/unomi/services/services/ProfileServiceImpl.java
----------------------------------------------------------------------
diff --git a/services/src/main/java/org/apache/unomi/services/services/ProfileServiceImpl.java b/services/src/main/java/org/apache/unomi/services/services/ProfileServiceImpl.java
index 177cb90..8b4f055 100644
--- a/services/src/main/java/org/apache/unomi/services/services/ProfileServiceImpl.java
+++ b/services/src/main/java/org/apache/unomi/services/services/ProfileServiceImpl.java
@@ -272,9 +272,11 @@ public class ProfileServiceImpl implements ProfileService, SynchronousBundleList
     }
 
     @Override
-    public boolean createPropertyType(PropertyType property) {
-        if (persistenceService.load(property.getItemId(), PropertyType.class) != null) {
-            return false;
+    public boolean setPropertyType(PropertyType property) {
+        PropertyType previous = null;
+        if ((previous = persistenceService.load(property.getItemId(), PropertyType.class)) != null) {
+            previous.getAutomaticMappingsFrom().addAll(property.getAutomaticMappingsFrom());
+            property = previous;
         }
         return persistenceService.save(property);
     }
@@ -585,7 +587,7 @@ public class ProfileServiceImpl implements ProfileService, SynchronousBundleList
         return persistenceService.query("target", target, null, PropertyType.class);
     }
 
-    public HashMap<String, Collection<PropertyType>> getAllPropertyTypes() {
+    public Map<String, Collection<PropertyType>> getAllPropertyTypes() {
         Collection<PropertyType> props = persistenceService.getAllItems(PropertyType.class, 0, -1, "rank").getList();
 
         HashMap<String, Collection<PropertyType>> propertyTypes = new HashMap<>();
@@ -685,11 +687,13 @@ public class ProfileServiceImpl implements ProfileService, SynchronousBundleList
 
             try {
                 PropertyType propertyType = CustomObjectMapper.getObjectMapper().readValue(predefinedPropertyTypeURL, PropertyType.class);
-                String[] splitPath = predefinedPropertyTypeURL.getPath().split("/");
-                String target = splitPath[4];
-                propertyType.setTarget(target);
+                if (getPropertyType(propertyType.getMetadata().getId()) == null) {
+                    String[] splitPath = predefinedPropertyTypeURL.getPath().split("/");
+                    String target = splitPath[4];
+                    propertyType.setTarget(target);
 
-                persistenceService.save(propertyType);
+                    persistenceService.save(propertyType);
+                }
             } catch (IOException e) {
                 logger.error("Error while loading properties " + predefinedPropertyTypeURL, e);
             }

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/86c379ef/services/src/main/resources/META-INF/cxs/properties/profiles/basic/firstName.json
----------------------------------------------------------------------
diff --git a/services/src/main/resources/META-INF/cxs/properties/profiles/basic/firstName.json b/services/src/main/resources/META-INF/cxs/properties/profiles/basic/firstName.json
index 81de9dd..6ed8836 100644
--- a/services/src/main/resources/META-INF/cxs/properties/profiles/basic/firstName.json
+++ b/services/src/main/resources/META-INF/cxs/properties/profiles/basic/firstName.json
@@ -3,6 +3,6 @@
     "type": "string",
     "tags": [ "basicProfileProperties" ],
     "defaultValue": "",
-    "automaticMappingsFrom": [ "j:firstName" ],
+    "automaticMappingsFrom": [ ],
     "rank": "101.0"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/86c379ef/services/src/main/resources/META-INF/cxs/properties/profiles/basic/gender.json
----------------------------------------------------------------------
diff --git a/services/src/main/resources/META-INF/cxs/properties/profiles/basic/gender.json b/services/src/main/resources/META-INF/cxs/properties/profiles/basic/gender.json
index e595893..610a548 100644
--- a/services/src/main/resources/META-INF/cxs/properties/profiles/basic/gender.json
+++ b/services/src/main/resources/META-INF/cxs/properties/profiles/basic/gender.json
@@ -3,6 +3,6 @@
     "type": "string",
     "tags": [ "basicProfileProperties" ],
     "defaultValue": "",
-    "automaticMappingsFrom": [ "j:gender" ],
+    "automaticMappingsFrom": [ ],
     "rank": "104.0"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/86c379ef/services/src/main/resources/META-INF/cxs/properties/profiles/basic/lastName.json
----------------------------------------------------------------------
diff --git a/services/src/main/resources/META-INF/cxs/properties/profiles/basic/lastName.json b/services/src/main/resources/META-INF/cxs/properties/profiles/basic/lastName.json
index 9b3f4d5..6468c17 100644
--- a/services/src/main/resources/META-INF/cxs/properties/profiles/basic/lastName.json
+++ b/services/src/main/resources/META-INF/cxs/properties/profiles/basic/lastName.json
@@ -3,6 +3,6 @@
     "type": "string",
     "tags": [ "basicProfileProperties" ],
     "defaultValue": "",
-    "automaticMappingsFrom": [ "j:lastName" ],
+    "automaticMappingsFrom": [ ],
     "rank": "102.0"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/86c379ef/services/src/main/resources/META-INF/cxs/properties/profiles/contact/city.json
----------------------------------------------------------------------
diff --git a/services/src/main/resources/META-INF/cxs/properties/profiles/contact/city.json b/services/src/main/resources/META-INF/cxs/properties/profiles/contact/city.json
index d1816fb..4cd698d 100644
--- a/services/src/main/resources/META-INF/cxs/properties/profiles/contact/city.json
+++ b/services/src/main/resources/META-INF/cxs/properties/profiles/contact/city.json
@@ -3,6 +3,6 @@
     "type": "string",
     "tags": ["contactProfileProperties"],
     "defaultValue": "",
-    "automaticMappingsFrom": [ "j:city" ],
+    "automaticMappingsFrom": [ ],
     "rank": "304.0"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/86c379ef/services/src/main/resources/META-INF/cxs/properties/profiles/contact/email.json
----------------------------------------------------------------------
diff --git a/services/src/main/resources/META-INF/cxs/properties/profiles/contact/email.json b/services/src/main/resources/META-INF/cxs/properties/profiles/contact/email.json
index 36a9f7f..aecd6af 100644
--- a/services/src/main/resources/META-INF/cxs/properties/profiles/contact/email.json
+++ b/services/src/main/resources/META-INF/cxs/properties/profiles/contact/email.json
@@ -3,6 +3,6 @@
     "type": "email",
     "tags": ["contactProfileProperties"],
     "defaultValue": "",
-    "automaticMappingsFrom": [ "j:email" ],
+    "automaticMappingsFrom": [ ],
     "rank": "301.0"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/86c379ef/services/src/main/resources/META-INF/cxs/properties/profiles/personal/birthDate.json
----------------------------------------------------------------------
diff --git a/services/src/main/resources/META-INF/cxs/properties/profiles/personal/birthDate.json b/services/src/main/resources/META-INF/cxs/properties/profiles/personal/birthDate.json
index 25b04b7..203d48d 100644
--- a/services/src/main/resources/META-INF/cxs/properties/profiles/personal/birthDate.json
+++ b/services/src/main/resources/META-INF/cxs/properties/profiles/personal/birthDate.json
@@ -14,6 +14,6 @@
     {"key":"40_50", "from": "now-50y/y", "to" : "now-40y/y"  },
     {"key":"50_*", "to": "now-50y/y"}
   ],
-  "automaticMappingsFrom": [ "j:birthDate" ],
+  "automaticMappingsFrom": [ ],
   "rank": "502.0"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/86c379ef/services/src/main/resources/META-INF/cxs/properties/profiles/social/facebookId.json
----------------------------------------------------------------------
diff --git a/services/src/main/resources/META-INF/cxs/properties/profiles/social/facebookId.json b/services/src/main/resources/META-INF/cxs/properties/profiles/social/facebookId.json
index 07fd7e9..2596440 100644
--- a/services/src/main/resources/META-INF/cxs/properties/profiles/social/facebookId.json
+++ b/services/src/main/resources/META-INF/cxs/properties/profiles/social/facebookId.json
@@ -3,6 +3,6 @@
     "type": "string",
     "tags": [ "socialProfileProperties" ],
     "defaultValue": "",
-    "automaticMappingsFrom": [ "j:facebookID" ],
+    "automaticMappingsFrom": [ ],
     "rank": "401.0"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/86c379ef/services/src/main/resources/META-INF/cxs/properties/profiles/social/linkedInId.json
----------------------------------------------------------------------
diff --git a/services/src/main/resources/META-INF/cxs/properties/profiles/social/linkedInId.json b/services/src/main/resources/META-INF/cxs/properties/profiles/social/linkedInId.json
index c608f07..e57a8e5 100644
--- a/services/src/main/resources/META-INF/cxs/properties/profiles/social/linkedInId.json
+++ b/services/src/main/resources/META-INF/cxs/properties/profiles/social/linkedInId.json
@@ -3,6 +3,6 @@
     "type": "string",
     "tags": [ "socialProfileProperties" ],
     "defaultValue": "",
-    "automaticMappingsFrom": [ "j:linkedInID" ],
+    "automaticMappingsFrom": [ ],
     "rank": "402.0"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/86c379ef/services/src/main/resources/META-INF/cxs/properties/profiles/social/twitterId.json
----------------------------------------------------------------------
diff --git a/services/src/main/resources/META-INF/cxs/properties/profiles/social/twitterId.json b/services/src/main/resources/META-INF/cxs/properties/profiles/social/twitterId.json
index 6a41d44..e47668f 100644
--- a/services/src/main/resources/META-INF/cxs/properties/profiles/social/twitterId.json
+++ b/services/src/main/resources/META-INF/cxs/properties/profiles/social/twitterId.json
@@ -3,6 +3,6 @@
     "type": "string",
     "tags": [ "socialProfileProperties" ],
     "defaultValue": "",
-    "automaticMappingsFrom": [ "j:twitterID" ],
+    "automaticMappingsFrom": [ ],
     "rank": "404.0"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/86c379ef/services/src/main/resources/META-INF/cxs/properties/profiles/work/income.json
----------------------------------------------------------------------
diff --git a/services/src/main/resources/META-INF/cxs/properties/profiles/work/income.json b/services/src/main/resources/META-INF/cxs/properties/profiles/work/income.json
index f43154b..bebad96 100644
--- a/services/src/main/resources/META-INF/cxs/properties/profiles/work/income.json
+++ b/services/src/main/resources/META-INF/cxs/properties/profiles/work/income.json
@@ -3,6 +3,6 @@
     "type": "integer",
     "tags": [ "workProfileProperties" ],
     "defaultValue": "",
-    "automaticMappingsFrom": [ "j:income" ],
+    "automaticMappingsFrom": [ ],
     "rank": "603.0"
 }
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/86c379ef/services/src/main/resources/OSGI-INF/blueprint/blueprint.xml
----------------------------------------------------------------------
diff --git a/services/src/main/resources/OSGI-INF/blueprint/blueprint.xml b/services/src/main/resources/OSGI-INF/blueprint/blueprint.xml
index edee65f..f26ef29 100644
--- a/services/src/main/resources/OSGI-INF/blueprint/blueprint.xml
+++ b/services/src/main/resources/OSGI-INF/blueprint/blueprint.xml
@@ -60,8 +60,6 @@
         </property>
         <property name="restrictedEventTypeIds">
             <set>
-                <value>login</value>
-                <value>facebookLogin</value>
                 <value>sessionCreated</value>
                 <value>sessionReassigned</value>
                 <value>profileUpdated</value>

http://git-wip-us.apache.org/repos/asf/incubator-unomi/blob/86c379ef/services/src/main/resources/org.apache.unomi.thirdparty.cfg
----------------------------------------------------------------------
diff --git a/services/src/main/resources/org.apache.unomi.thirdparty.cfg b/services/src/main/resources/org.apache.unomi.thirdparty.cfg
index 06c3278..81cdcaf 100644
--- a/services/src/main/resources/org.apache.unomi.thirdparty.cfg
+++ b/services/src/main/resources/org.apache.unomi.thirdparty.cfg
@@ -15,6 +15,12 @@
 # limitations under the License.
 #
 
-thirdparty.jahia.key=670c26d1cc413346c3b2fd9ce65dab41
-thirdparty.jahia.ipAddresses=127.0.0.1,::1
-thirdparty.jahia.allowedEvents=login,download
+# Define secured events and the thirdparty servers which are allowed to send
+# them.
+
+# Example : provider1 is allowed to send login and download events from
+# localhost , with key provided in X-Unomi-Peer
+#
+# thirdparty.provider1.key=670c26d1cc413346c3b2fd9ce65dab41
+# thirdparty.provider1.ipAddresses=127.0.0.1,::1
+# thirdparty.provider1.allowedEvents=login,download