Thanks Guys!

This really helps!



On Fri, Mar 23, 2018 at 7:10 AM, Mick Semb Wever <m...@thelastpickle.com>
wrote:

> Is there a way to protect C* on the server side from tracing commands that
>> are executed from clients?
>>
>
>
> If you really needed a way to completely disable all and any possibility
> of tracing you could start each C* node with tracing switched to a noop
> implementation.
>
> eg, add to the jvm.options file the line
>
>     -Dcassandra.custom_tracing_class=somepackage.NoOpTracing
>
>
> while also putting into each $CASSANDRA_HOME/lib/ a jar file containing
> this NoOpTracing class…
>
> ```
> package somepackage;
>
> import java.net.InetAddress;
> import java.nio.ByteBuffer;
> import java.util.Map;
> import java.util.UUID;
> import org.apache.cassandra.tracing.*;
> import org.apache.cassandra.utils.FBUtilities;
>
> /** Starting Cassandra with '-Dcassandra.custom_tracing_
> class=org.apache.cassandra.tracing.NoOpTracing'
>  * will forcibly disable all tracing.
>  *
>  * This can be useful in defensive environments.
>  */
> public final class NoOpTracing extends Tracing {
>
>     @Override
>     protected void stopSessionImpl() {}
>
>     @Override
>     public TraceState begin(String request, InetAddress client,
> Map<String, String> parameters) {
>         return NoOpTraceState.INSTANCE;
>     }
>
>     @Override
>     protected TraceState newTraceState(InetAddress coordinator, UUID
> sessionId, TraceType traceType) {
>         return NoOpTraceState.INSTANCE;
>     }
>
>     @Override
>     public void trace(ByteBuffer sessionId, String message, int ttl) {}
>
>     private static class NoOpTraceState extends TraceState {
>         private static final NoOpTraceState INSTANCE = new
> NoOpTraceState();
>         private NoOpTraceState() {
>             super(FBUtilities.getBroadcastAddress(), UUID.randomUUID(),
> TraceType.NONE);
>         }
>         @Override
>         protected void traceImpl(String message) {}
>     }
> }
> ```
>
> regards,
> Mick
>
>
> --
> Mick Semb Wever
> Australia
>
> The Last Pickle
> Apache Cassandra Consulting
> http://www.thelastpickle.com
>

Reply via email to