guacamole-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Couchman <vn...@apache.org>
Subject Re: Guacamole SQL queries...
Date Tue, 08 Jan 2019 14:12:17 GMT
On Tue, Jan 8, 2019 at 3:13 AM B3r3n <B3r3n@argosnet.com> wrote:

> Hello guys,
>
> First of all, Happy New Year 2019 to all !
>
> This question is for Guacamole SQL wizards :-)
>
> We have a central password repository and this must be imported into
> Guacamole
> to avoid manual action. I failed to find some howto explaining the SQL
> process.
>

Are you saying you want to import a list of usernames and passwords into
the Guacamole database?  This should be doable, but you should read this
section of the manual and understand the database schema:

http://guacamole.apache.org/doc/gug/jdbc-auth.html#jdbc-auth-schema


>
> Can someone please enlight me about :
>
> 1- the SQL Query to detect/validate user's permissions, and get target
> details
> (check it matches application)


> 2- the SQL Query to create connections and associate them with a user.
>
>
I'm not sure exactly what you're asking, here.  The SQL queries are not
listed explicitly anywhere in the code - we use the MyBatis framework for
abstracting the interaction with the database, so it is listed in the XML
files.  The closest you can find to the actual query would be the various
mapping files that map database fields to the Java objects that are used
within Guacamole.  For example:

https://github.com/apache/guacamole-client/blob/master/extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-mysql/src/main/resources/org/apache/guacamole/auth/jdbc/user/UserMapper.xml

However, based on what you're asking, there isn't any one query that
accomplishes either of the items above - there are multiple SQL queries
that make it happen.  They can be seen or derived from those mapper files.

-Nick

Mime
View raw message