On Mon, Feb 11, 2019 at 5:53 AM murat <[email protected]> wrote:
> ... I have another question. If I have a connection with a connectionID,
> and i
> want to change the user from read/write to read-only, how can i do that?
>
> should i have to update config with all args parameters and run
>
> // Send args
> writer.writeInstruction(new GuacamoleInstruction("connect",
> arg_values));
>
> again
No. The "connect" instruction is part of the handshake only. It has no
meaning outside the handshake phase. If you send it while already
connected, it will be ignored. See the overview of the Guacamole protocol:
http://guacamole.apache.org/doc/gug/guacamole-protocol.html#guacamole-protocol-handshake
and the documentation for "connect":
http://guacamole.apache.org/doc/gug/protocol-reference.html#connect-instruction
or is there any simple way to update just read-only argument?
The way provided by the Guacamole protocol to update connection parameters
after the handshake is the "argv" instruction, recently added for this
purpose:
https://issues.apache.org/jira/browse/GUACAMOLE-630
It cannot currently be used to change the value of the "read-only"
parameter; it is currently only used by the SSH/telnet/Kubernetes support
for the color scheme, font, etc. use by the terminal emulator. If you want
to dynamically turn read-only access on and off for an active connection,
your best current option is to filter the instructions sent to that
connection using a FilteredGuacamoleSocket or FilteredGuacamoleWriter and
an appropriate GuacamoleFilter which drops all but critical instructions. I
recently wrote something as part of my day job that did exactly this:
https://github.com/glyptodon/guacamole-auth-restrict/blob/master/src/main/java/com/glyptodon/guacamole/auth/restrict/connection/RestrictedExternalTunnel.java
- Mike