Run Groovy scripts without login
In my requirement I need to run some of the groovy scripts like presence of online users without the user logging in. Also, running the groovy scripts with curl url is very slow for my application.
Also, is there any way to run groovy scripts without admin login?
Added by Wojciech Kapcia over 4 years ago
Why do you want to avoid logging in? How else would you imagine managing permissions?
There is also an option to to use TCLMT but it still require admin logging in.
Also, running the groovy scripts with curl url is very slow for my application.
Is it slow because of the amount of the requests or the time it takes to process single request?
Added by Artur Hefczyc over 4 years ago
In theory admin commands both over XMPP and over HTTP API could be restricted to port numbers available from a local network only. This would improve security for running scripts without logging in.
However, I do not think, this is user logging in, that slows things down. Especially in case of using curl, it means you use HTTP API, so you use HTTP. This is slow in general: Opening a new connection, HTTP handshaking, then sending HTTP API request, waiting for a response, all this takes time. User authentication data and authentication process takes only faction of that time and I think it's impact is negligible.
The best option to improve performance would be to create a command line tool which is connected to Tigase XMPP Server over XMPP all the time and it sends many admin commands (executes many groovy scripts) on a single connection. This give you the best possible performance. Especially that you can send multiple commands at the same time without a need to wait for a response. Commands can be executed concurrently when run over XMPP which is not the case for HTTP Api component.