[
https://issues.apache.org/jira/browse/CASSANDRA-12242?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15388765#comment-15388765
]
RocWay Li commented on CASSANDRA-12242:
---------------------------------------
About the call-stack, I could list the key points as the following:
During the 1st execution of CREATE TRIGGER..., it will call
FBUtilities::cassandraTriggerDir(), which wil call (bottom up)
ThreadGroup tg = Thread.currentThread().getThreadGroup(); // tg is null,
since the current thread(SEPWorker) is not managed by NamedThreadFactory
ThreadAwareSecurityManager#isSecuredThread
ThreadAwareSecurityManager#checkPermission(java.security.Permission)
SecurityManager#checkRead(java.lang.String)
java.io.File#exists
org.apache.cassandra.utils.FBUtilities#cassandraTriggerDir --> if (triggerDir
== null || !triggerDir.exists()
> Could not create trigger
> ------------------------
>
> Key: CASSANDRA-12242
> URL: https://issues.apache.org/jira/browse/CASSANDRA-12242
> Project: Cassandra
> Issue Type: Bug
> Components: CQL
> Reporter: RocWay Li
> Attachments: DataTrigger.java
>
>
> I tried cassandra 2.2.6 and 3.7, both of them could not create triggers.
> It reports that the trigger class doesn't exist. But it actually does and is
> at the right directory, the conf/triggers.
> I debugged the source code, and I found that SEPWorker is used to create
> triggers, but it's thread is not a secure thread, which should be managed by
> cassandra's SecurityManager and belongs to SecurityThreadGroup.
> When security validation failed, an exception will be thrown. That's direct
> cause for creating triggers failed.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)