On Tue, Feb 15, 2022 at 3:57 PM Craig Sawyer <[email protected]> wrote:

> in the PG database, `
> nextval('guacamole_entity_entity_id_seq'::regclass)`, i.e. the entity
> ID is created for you, and you probably shouldn't mess with that.
>
> You appear to be using MySQL and it's apparently due to MySQL Strict
> Mode, whatever that is(not a MySQL user). You probably don't want to
> turn it off, MySQL isn't known for being the best data safety steward
> by default, so turning off the default on safety stuff seems like a
> bad idea.
>
> Instead I'd just add/delete users based on their username, which
> should be unique across your organization anyway.  You can always
> figure out the entity ID if needed. i.e. use a null value for the ID,
> and let the DB create the entity_id #'s for you.
>
> For us, we use the somehwat undocumented API instead to do these
> things from python code(any language possible), but it's exactly the
> same use-case.  We programatically setup guac users and connections
> before the user ever connects to Guac as part of our sync users to HR
> system.
>
>
Yes, I would recommend using the API instead of writing directly to the DB.
Writing to the DB is supported, and the schema is documented (
https://guacamole.apache.org/doc/gug/jdbc-auth.html#modifying-data-manually),
but the API will let you do these things without having to worry about the
various links in the database between entities and users/groups.

And, yes, the REST API lacks documentation - it's still a Jira issue to try
to automate documentation of that. I find the browser developer tools very
helpful for figuring these tasks out - you can use the Network tab to see
exactly which API endpoints are called.

-Nick

Reply via email to