Im developing a webshop and i got a task asking for storing users searches. Is it legal?
It will be stored in a db with the fields Date, Search text, userId
Information Security Stack Exchange is a question and answer site for information security professionals. It only takes a minute to sign up.Sign up to join this community
It's dependant on your and your customer's jurisdiction, but I'm not aware of any jurisdiction where its illegal to simply store user searches, as long as your site discloses the data that is collected, how it's used, and how long you're storing them for. You should check the laws in your jurisdiction for details on what needs to be disclosed and how to disclose them. Some jurisdictions may require that you allow user to opt out of collection or to allow viewing and deleting data that is collected.
Also, you'll need to check if there are any other legal or industry specific regulations that apply to your business. For example, in Europe you may be subject to GDPR if you collect PII, if you use credit card PCI-DSS may apply, or if you run a medical data you may be subject to medical information privacy laws.