Head's Up! These forums are read-only. All users and content have migrated. Please join us at community.neo4j.com.
08-15-2019 11:58 AM
Plugin loads and run fine in both the Desktop and the Server (other utilities still work fine in both environments).
// Function registered in dbms?
CALL dbms.functions() YIELD name, description
WHERE name CONTAINS "myplugin"
RETURN name, description
// Try to call the function
RETURN myplugin.test("Testify")
Neo.ClientError.Statement.SyntaxError: Unknown function 'myplugin.test'
http://[IP]:7474/browser
$NEO4J_HOME/plugins/
@UserFunction
@Description("myplugin.test('this is not a test')")
public String test( @Name("any") String any ) {
return any;
}
Solved! Go to Solution.
08-16-2019 12:54 AM
Please provide snippet of server's logs/debug.log
containing a startup sequence.
08-16-2019 12:54 AM
Please provide snippet of server's logs/debug.log
containing a startup sequence.
08-16-2019 11:32 AM
Just to clarify:
dbms.security.procedures.unrestricted
allows plugins to access insecure Neo4j components (e.g.: anything other than Log, TerminationGuard or GraphDatabaseService)dbms.security.procedures.whitelist
defaults to allow all functions from all plugins, but if specified only whitelisted functions will be loaded.I was confusing the purpose of whitelist
.
08-17-2019 02:24 PM
Your explanation is good, but not 100% precisely correct. It's not about accessing insecure components. It's about accessing components that potentially allow you to break out of the current security context. E.g. if your database user has only read permission, calling a unrestricted procedure might result in a write operation. So handle with care.
08-16-2019 11:25 AM
Thank you, found and fixed. I probably should have started in the debug log myself.
2019-08-16 18:01:21.405+0000 WARN [o.n.k.i.p.Procedures] The function 'myplugin.test' is not on the whitelist and won't be loaded.
Documenting for anyone else who comes across this.
My understanding from Neo4j Docs: Securing Extensions was that dbms.security.procedures.unrestricted
and dbms.security.procedures.whitelist
was only necessary if the function or procedure needed anything other than Log
, TerminationGuard
, or GraphDatabaseService
.
While this is true, whitelist
has additional behaviors only mentioned at the bottom of the Securing Extensions doc:
There are a few things that should be noted about
dbms.security.procedures.whitelist
:
- If using this setting, no extensions other than those listed will be loaded. In particular, if it is set to the empty string, no extensions will be loaded.
- The default of the setting is
*
. This means that if you do not explicitly give it a value (or no value), all libraries in the plugins directory will be loaded.- If the extensions pointed out by this parameter are programmed to access internal APIs, they also have to be explicitly allowed, as described in Section 9.1.1, “Sandboxing”.
neo4j.conf
dbms.security.procedures.unrestricted=apoc.*
neo4j.conf
dbms.security.procedures.whitelist=apoc.*
neo4j.conf
dbms.security.procedures.unrestricted=apoc.*
All the sessions of the conference are now available online