Digital signature on logs

For Compliance rules I need to digitally sign my logs and make them unchangeable.
What is the best way to do it?

You can add a fingerprint of the document via Logstash, then store them in a read only index.

Would that do it?