comparison src/bridge/bridge_constructor/bridge_template.ini @ 1030:15f43b54d697

core, memory, bridge: added profile password + password encryption: /!\ This changeset updates the database version to 2 and modify the database content! Description: - new parameter General / Password to store the profile password - profile password is initialized with XMPP password value, it is stored hashed - bridge methods asyncCreateProfile/asyncConnect takes a new argument "password" (default = "") - bridge method asyncConnect returns a boolean (True = connection already established, False = connection initiated) - profile password is checked before initializing the XMPP connection - new private individual parameter to store the personal encryption key of each profile - personal key is randomly generated and encrypted with the profile password - personal key is decrypted after profile authentification and stored in a Sessions instance - personal key is used to encrypt/decrypt other passwords when they need to be retrieved/modified - modifying the profile password re-encrypt the personal key - Memory.setParam now returns a Deferred (the bridge method "setParam" is unchanged) - Memory.asyncGetParamA eventually decrypts the password, Memory.getParamA would fail on a password parameter TODO: - if profile authentication is OK but XMPP authentication is KO, prompt the user for another XMPP password - fix the method "registerNewAccount" (and move it to a plugin) - remove bridge method "connect", sole "asyncConnect" should be used
author souliane <souliane@mailoo.org>
date Wed, 07 May 2014 16:02:23 +0200
parents 8bae81e254a2
children 6e975c6b0faf
comparison
equal deleted inserted replaced
1029:f6182f6418ea 1030:15f43b54d697
202 202
203 [asyncCreateProfile] 203 [asyncCreateProfile]
204 async= 204 async=
205 type=method 205 type=method
206 category=core 206 category=core
207 sig_in=s 207 sig_in=ss
208 sig_out= 208 sig_out=
209 param_1_default=''
209 doc=Create a new profile 210 doc=Create a new profile
210 doc_param_0=%(doc_profile)s 211 doc_param_0=%(doc_profile)s
212 doc_param_1=password: password of the profile
211 doc_return=callback is called when profile actually exists in database and memory 213 doc_return=callback is called when profile actually exists in database and memory
212 errback is called with error constant as parameter: 214 errback is called with error constant as parameter:
213 - ConflictError: the profile name already exists 215 - ConflictError: the profile name already exists
214 - CancelError: profile creation canceled 216 - CancelError: profile creation canceled
215 217
241 doc_param_4=port: port of the server to register to 243 doc_param_4=port: port of the server to register to
242 244
243 [connect] 245 [connect]
244 type=method 246 type=method
245 category=core 247 category=core
246 sig_in=s 248 sig_in=ss
247 sig_out= 249 sig_out=b
248 param_0_default="@DEFAULT@" 250 param_0_default="@DEFAULT@"
251 param_1_default=''
249 doc=Connect a profile 252 doc=Connect a profile
250 doc_param_0=%(doc_profile_key)s 253 doc_param_0=%(doc_profile_key)s
254 doc_param_1=password: the SàT profile password
255 doc_return=a deferred boolean or failure:
256 - boolean if the profile authentication succeed:
257 - True if the XMPP connection was already established
258 - False if the XMPP connection has been initiated (it may still fail)
259 - failure if the profile authentication failed
251 260
252 [asyncConnect] 261 [asyncConnect]
253 async= 262 async=
254 type=method 263 type=method
255 category=core 264 category=core
256 sig_in=s 265 sig_in=ss
257 sig_out= 266 sig_out=b
258 param_0_default="@DEFAULT@" 267 param_0_default="@DEFAULT@"
268 param_1_default=''
259 doc=Connect a profile 269 doc=Connect a profile
260 doc_param_0=%(doc_profile_key)s 270 doc_param_0=%(doc_profile_key)s
271 doc_param_1=password: the SàT profile password
272 doc_return=a deferred boolean or failure:
273 - boolean if the profile authentication succeed:
274 - True if the XMPP connection was already established
275 - False if the XMPP connection has been initiated (it may still fail)
276 - failure if the profile authentication failed
261 277
262 [disconnect] 278 [disconnect]
263 type=method 279 type=method
264 category=core 280 category=core
265 sig_in=s 281 sig_in=s