Required a simple guide for secure messaging application

For my personal research i have to create a messaging app, but security is only important part of application, security from MITM (man in the middle attack), at device end, and at server level. (note : this will not end to end encryption, as i want to backup messages on server for cross device access like telegram).

Right now i created following model :

  1. Server creates RSA key pair first time at installation and keeps private key in a file on server, and broadcast public key with its clients, (A,B)
  2. A&B also creates RSA key pair at first time login, and stores private key at device level and send public key to server.
  3. Now A want to send message to B, A will do, following steps:

    create a random salt_key;
    encrypt message with this salt_key (AES)
    encrypt salt_key with server’s public key (RSA)
    send RSA encrypted key, and AES encrypted message to server
    now server can decrypt salt_key with RSA private key and than message
    now server will do same as A did, but with B’s public key
    and B will decrypt salt_key with private key than decrypt message.

Is this a secure way, or any another way to secure my messaging app.

thanks,

jaikey

Custom Messaging System For Classiera Classified Ads WordPress Theme

I created this custom messaging system which is based on the frontend pm plugin to add a fully functional and reliable user messaging system to classiera classified ads WordPress theme.

Being that classiera and other similar classifieds ads WordPress themes don't have a good inbuilt messaging system for users to communicate with each other, this customized plugin will fill that void when integrated to your website.

It has features such as:
* Ability of…

Custom Messaging System For Classiera Classified Ads WordPress Theme

I Created A Custom Messaging System For Classiera Classified Ads WordPress Theme

Check out the custom instant messaging system I created for Classiera Classified Ads WordPress Theme.

Unlike the bidding system that comes with the theme which will only allow messaging when bidding is turned on and will only notify the ad poster of new messages regarding bids on their ads, This custom messaging system will enable a buyer send the seller a message corresponding to each particular ad of interest.

* Both the sender and recipient will receive instant notification…

I Created A Custom Messaging System For Classiera Classified Ads WordPress Theme

Enviar notificación push firebase cloud messaging

quiero enviar una notificación cuando se haga un cambio en la base datos. La quiero mandar a todos los dispositivos. Ya vi algunos ejemplos pero no entendi bien como hacerlo, logré poder leer la base de datos. Paso qué es lo que tengo.

const functions = require('firebase-functions'); const admin = require('firebase-admin'); admin.initializeApp();  // // Create and Deploy Your First Cloud Functions // // https://firebase.google.com/docs/functions/write-firebase-functions // // exports.helloWorld = functions.https.onRequest((request, response) => { //  response.send("Hello from Firebase!"); // }); exports.newMessage = functions.firestore.document('/Usuarios/{user}/Parejas/{match}/Chat/Mensajes').onWrite((change,context)=>{     //Aca quiero enviar la notificación });  

Data replication with microservices using a messaging broker

I have a microservice based application like so:

User.Microservice – stores , user information.

Product.Microservice – stores products that user created.

Order.Microservices – stores product orders

Stack:

RabbitMQ – for Event based communication

MongoDB – for Data Storage

Each service has a public HTTP REST API.

Each service can publish and consume messages from RABBITMQ

Here is how everything communicates: current stack

Client makes a request to API GATEWAY:

lets suppose client makes a POST request to product service -> the product has user reference and other details about a product.

Well now if i want to populate product item with user details such as user’s username, the API GATEWAY should make a GET request to user service.

Here comes the data replication part i have to add the required information about user to product service.

How can i replicate user details to product service after a product is created ? And return the response to POST request along with user’s username ? if it is not present in product service…

I could use the current API GATEWAY method where the gateway calls user service , but if the user service goes down i will not have the required user details…

Somehow i need to run bus events before the response from POST request is returned…

Best practice on Web Chat “please wait” messaging

We are currently integrating a web chat functionality on a utilities website, where customers can query their bill, or changing plans etc. with their electricity bills. (this will be available to all customers whether they are logged in or not).

The web chat will sit top right on all paged, and when clicked, will initiate a web chat sessions. In the event of a bottleneck of chats starting, we need to design a pre-screen before the chat initiates with an agent. I cannot find any best practice information our there, so my thought was to provide the following while the user waits:

  • An apology message saying that chat agents are busy.
  • Current wait time: XX minutes.

Would this be considered an overshare of information to the customer? or is the visibility and transparency appreciated and considered good Ux? Any hats thrown into the ring on this one are much appreciated! A brief mockup is something I put together below as a first pass:

enter image description here

Restored “App+Data” with Titanium Backup for com.android.providers.telephony and now Messaging is crashing

I have a Moto G 4th Edition (harpia) running LineageOS 14.1 nightly. I was trying to debug some issues with its MMS and I used Titanium Backup to take a backup of the APN settings because I was about to follow some tutorials and I wanted to know I could certainly undo them if I needed to. I wasn’t able to fix the problem, so I tried to restore using Titanium Backup. When I was restoring the settings, it asked me if I wanted to restore App, Data, or App+Data. Without thinking too much about it, I clicked “App+Data”. Then, I went back to the APN settings page to see if the APN settings I had were restored. When I clicked on an APN, it crashed. I think the exception in question is:

06-27 18:44:22.454  2067  3374 E DatabaseUtils: java.lang.SecurityException: Permission Denial: reading com.android.providers.telephony.TelephonyProvider uri content://telephony/carriers/1265 from pid=4901, uid=1000 requires the provider be exported, or grantUriPermission() 06-27 18:44:22.454  2067  3374 E DatabaseUtils:     at android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:608) 06-27 18:44:22.454  2067  3374 E DatabaseUtils:     at android.content.ContentProvider$  Transport.enforceReadPermission(ContentProvider.java:483) 06-27 18:44:22.454  2067  3374 E DatabaseUtils:     at android.content.ContentProvider$  Transport.query(ContentProvider.java:212) 06-27 18:44:22.454  2067  3374 E DatabaseUtils:     at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:112) 06-27 18:44:22.454  2067  3374 E DatabaseUtils:     at android.os.Binder.execTransact(Binder.java:565) 

(But another suspicious-looking message I see is 06-27 18:44:20.760 2067 5631 W ContextImpl: Failed to ensure /data/user_de/0/com.android.settings/databases: mkdir failed: EACCES (Permission denied).) I reached out to Titanium Track via their “Contact Us” page but haven’t gotten a response so far (it’s only been about 36 hours). In the meantime, I noticed that I also can’t even use the Messaging app on my phone. When I try to enter an SMS conversation, it crashes. I think the exception for that is:

06-27 18:43:54.101  1141  2774 W ActivityManager: Permission Denial: opening provider com.android.providers.telephony.SmsProvider from ProcessRecord{890eeb3 3530:com.android.messaging/u0a73} (pid=3530, uid=10073) that is not exported from uid 1001 06-27 18:43:54.103  3530  3843 F MessagingAppDataModel: wtf 06-27 18:43:54.103  3530  3843 F MessagingAppDataModel: SyncMessagesAction: unexpected failure in scan 06-27 18:43:54.103  3530  3843 F MessagingAppDataModel: java.lang.SecurityException: Permission Denial: opening provider com.android.providers.telephony.SmsProvider from ProcessRecord{890eeb3 3530:com.android.messaging/u0a73} (pid=3530, uid=10073) that is not exported from uid 1001 06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at android.os.Parcel.readException(Parcel.java:1684) 06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at android.os.Parcel.readException(Parcel.java:1637) 06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at android.app.ActivityManagerProxy.getContentProvider(ActivityManagerNative.java:4199) 06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at android.app.ActivityThread.acquireProvider(ActivityThread.java:5534) 06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at android.app.ContextImpl$  ApplicationContentResolver.acquireUnstableProvider(ContextImpl.java:2239) 06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at android.content.ContentResolver.acquireUnstableProvider(ContentResolver.java:1520) 06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at android.content.ContentResolver.query(ContentResolver.java:518) 06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at android.content.ContentResolver.query(ContentResolver.java:475) 06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at com.android.messaging.mmslib.a.VL(SourceFile:40) 06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at com.android.messaging.sms.i.ahs(SourceFile:1498) 06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at com.android.messaging.sms.DatabaseMessages$  SmsMessage.getProjection(SourceFile:120) 06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at com.android.messaging.datamodel.action.q.<init>(SourceFile:450) 06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at com.android.messaging.datamodel.action.m.Lg(SourceFile:131) 06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at com.android.messaging.datamodel.action.SyncMessagesAction.Jf(SourceFile:293) 06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at com.android.messaging.datamodel.action.SyncMessagesAction.IU(SourceFile:244) 06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at com.android.messaging.datamodel.action.BackgroundWorkerService.Kk(SourceFile:146) 06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at com.android.messaging.datamodel.action.BackgroundWorkerService.onHandleIntent(SourceFile:123) 06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at android.app.IntentService$  ServiceHandler.handleMessage(IntentService.java:68) 06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at android.os.Handler.dispatchMessage(Handler.java:102) 06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at android.os.Looper.loop(Looper.java:154) 06-27 18:43:54.103  3530  3843 F MessagingAppDataModel:     at android.os.HandlerThread.run(HandlerThread.java:61) 06-27 18:43:54.103  3530  3843 E MessagingAppDataModel: SyncMessagesAction: unexpected failure in scan 

Based on these two exceptions, I’m guessing that I shouldn’t have restored the app but just the data, and some important metadata of the app got lost or wasn’t restored correctly. However I’m not sure where I would find that metadata or what it should be.

  • I tried TWRP “Restore Contexts”.
  • Someone on the /r/Android Discourse suggested I dirty load the same ROM. Unfortunately support for LineageOS on my handset is discontinued and there’s no images to download. I tried re-using the latest update from /data/lineageos_updates, but that didn’t fix my problem.
  • I took a backup of my phone in its current (semi-working) state and I’ve tried wiping data for the messaging app, the telephony provider, the settings app, but I still have the same crashes.

Has anyone seen these exceptions before? What are these providers? Where are they kept on a normal Android system? What creates them, and is there a way to manually cause them to be created?

How to query contact details for linked messaging apps profiles (Specially Telegram) and launch them with tasker?

Since the TouchlessChat app was deleted from the PlayStore I am trying to create a task that simulates the behavior of it.

Right now I am able to capture my message using voice and get the contact ID with AutoContacts. Now I need to do something like:

If Telegram Send Telgram Message Else If WhatsApp Send WhatsApp Message Else Send SMS 

But I am not able to get the Telegram info for it (AutoContacts has a WhatsApp Uri). My closest friends and family use Telegram so it is almost my first option.

Is there a way to query the contact details to get the correct Telegram URI or similar so I can launch the app with it?