You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@guacamole.apache.org by WebE <ra...@gmail.com> on 2018/05/14 08:49:41 UTC

debugging custom auth provider

Hi,

I have a task to configure guacamole where users can create a URL and use it
for remote desktop. All parameter for connection are passed via url
parameter.  The behavior is similar to guacamole auth plugin
<https://github.com/grncdr/guacamole-auth-hmac>   which doesn't work with
latest version. I even tried from other  forked projects
<https://github.com/cyverse/guacamole-auth-hmac/tree/0.9.14/src>  .  After
this plugin is loaded, the home page of guacamole is not loading and a rest
exception is thrown in log. 

I tried using https://github.com/glyptodon/guacamole-auth-json plugin as
well but could not succeed.

Now I am trying to understand and build an custom auth provider. I have gone
through the basic tutorial. I am able to build it and integrate it. 

 However I am not able to find any tutorial on how can I debug these
plugins. Coming from .net background, it is bit difficult to do without any
manual/documentation. 

Therefore kindly guide me what setup is required to debug these plugins. I
do not need a step by step procedure but a starting point where I can grab
some idea on how debug this plugin.





--
Sent from: http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/

Re: debugging custom auth provider

Posted by Mike Jumper <mi...@guac-dev.org>.
On Mon, May 14, 2018, 09:26 WebE <ra...@gmail.com> wrote:

> ...
>
> What I would like to know if there is any tool/debugger/IDE setup that
> supports developing these extensions,  where we can get help form
> intellisense in writing code, or set a breakpoint and see what data is
> being
> received when a login request is sent to the auth provider?
>

My personal preference is Netbeans, though any Java IDE should do well.
Some prefer Eclipse, though I find Eclipse less easy to use with Maven.

Netbeans has nice Maven and Tomcat integration. It'll open Maven projects
natively, without filling the source tree with IDE-specific cruft.

- Mike

Re: debugging custom auth provider

Posted by Nick Couchman <vn...@apache.org>.
On Mon, May 14, 2018 at 12:26 PM, WebE <ra...@gmail.com> wrote:

> Hi,
>
> Thanks for your response.
>
> For hmac extension and auth json extension I will provide more details in
> separate thread.
>
> Regarding debugging,
>
> I built the plug in by creating required folder structure & writing the
> code
> in plain text editor and then built using maven.
>
> What I would like to know if there is any tool/debugger/IDE setup that
> supports developing these extensions,  where we can get help form
> intellisense in writing code, or set a breakpoint and see what data is
> being
> received when a login request is sent to the auth provider?
>

I'm sure I'd be much more efficient if I looked into this, too, but I use
vi and log messages.  Eclipse has support for debugging Tomcat
applications, so you might check that out:

https://blogs.mulesoft.com/dev/tomcat-tcat-server/debugging-your-tomcat-webapp-with-eclipse/

Some of the other developers may have hints on the IDEs they use and how
they go about debugging.

-Nick

Re: debugging custom auth provider

Posted by WebE <ra...@gmail.com>.
Hi,

Thanks for your response.

For hmac extension and auth json extension I will provide more details in
separate thread.

Regarding debugging,

I built the plug in by creating required folder structure & writing the code
in plain text editor and then built using maven.

What I would like to know if there is any tool/debugger/IDE setup that
supports developing these extensions,  where we can get help form
intellisense in writing code, or set a breakpoint and see what data is being
received when a login request is sent to the auth provider?

Kindly bear with me as I have very limited knowledge in debugging java apps
/ maven / tomcat apps. 

-WebE



--
Sent from: http://apache-guacamole-general-user-mailing-list.2363388.n4.nabble.com/

Re: debugging custom auth provider

Posted by Nick Couchman <vn...@apache.org>.
On Mon, May 14, 2018 at 4:49 AM, WebE <ra...@gmail.com> wrote:

> Hi,
>
> I have a task to configure guacamole where users can create a URL and use
> it
> for remote desktop. All parameter for connection are passed via url
> parameter.  The behavior is similar to guacamole auth plugin
> <https://github.com/grncdr/guacamole-auth-hmac>   which doesn't work with
> latest version.


Yes, looking at this source code, it says both that it is unmaintained, and
that it was written for 0.8.3.  A little out of date :-).


> I even tried from other  forked projects
> <https://github.com/cyverse/guacamole-auth-hmac/tree/0.9.14/src>  .  After
> this plugin is loaded, the home page of guacamole is not loading and a rest
> exception is thrown in log.
>

We'd be happy to help debug this, you just have to be a little more
detailed about what "doesn't work" means, and what version of Guacamole you
are using.  It looks like this one should be compatible with the 0.9.14
released version, but it's hard to tell.  More detail will help.


>
> I tried using https://github.com/glyptodon/guacamole-auth-json plugin as
> well but could not succeed.
>
>
Mike can probably help out a little more with this one, but, again, would
help to know more details about your environment, and what you've tried to
get this working.


> Now I am trying to understand and build an custom auth provider. I have
> gone
> through the basic tutorial. I am able to build it and integrate it.
>
>  However I am not able to find any tutorial on how can I debug these
> plugins. Coming from .net background, it is bit difficult to do without any
> manual/documentation.
>
> Therefore kindly guide me what setup is required to debug these plugins. I
> do not need a step by step procedure but a starting point where I can grab
> some idea on how debug this plugin.
>
>
Again, we need to understand what you have tried so far and what the
results are.  Here are my suggestions:
- Read the fine manual: http://guacamole.apache.org/doc/gug/custom-auth.html
- Make sure that Tomcat logging is configured for debug mode, at least for
the Guacamole web app, so that you know you're getting all of the debug
information.  The easiest way to do this is to create a logback.xml in the
GUACAMOLE_HOME directory and configure it appropriately for debugging.
Instructions for this can be found, here:
http://guacamole.apache.org/doc/gug/configuring-guacamole.html#webapp-logging
- Make use of the log4j class within your code to write debug and trace
messages to the Tomcat log and then run things down from there.

-Nick