Hi,

You can't prevent the replication because if you manage to return a failure the 
other node will keep trying to send the data. What would be more relevant is to 
prevent the modification in the first place. You could try to implement a 
custom trigger and load it in Cassandra:
http://cassandra.apache.org/doc/latest/cql/triggers.html
https://github.com/apache/cassandra/tree/cassandra-3.11/examples/triggers

In your trigger implementation, you'll need to validate the data and throw an 
exception if it does not meet your security settings. However, I don't think 
you'll have access to the current username/role at this level.

It may be simpler for you to work with regular authentication and roles:
http://cassandra.apache.org/doc/latest/cql/security.html

Regards,
--
Jacques-Henri Berthemet

-----Original Message-----
From: Abdelkrim Fitouri [mailto:abdou....@gmail.com] 
Sent: jeudi 16 novembre 2017 18:31
To: dev@cassandra.apache.org
Subject: custom validation before replication

Hi,

I have some security constraint on a project, and i need to validate or 
unvalidate changes made on a keyspace via cql or via an other ways before 
replication.

for example in the case of multinode cluster with replication, if data was 
changed locally using cqlsh, data will be replicated (that is normal working 
way for cassandra)

is there a possibility to call a custom validation function just before data 
replication ?

Many thanks for any help.

-- 

Best Regards.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@cassandra.apache.org
For additional commands, e-mail: dev-h...@cassandra.apache.org

Reply via email to