BLE security

Hi, I am using the BLE to stream data but how to prevent others from connecting and write data to it. If I have a WRITE flag for t.ex alarm for temp.

And is there a way to "claim" the device like if the device gets stolen and another person tries to log in to it?