Securing writes


I need to be able to write points from BLE sensors into the database from a cellphone app.

My concern is simply that somebody could discover the database/password in the app and write millions of garbage points to effectively corrupt the data for all other sensors.

This seems like a common use case, so how have people done this, or what would be a good way to protect from this sort of threat?