On Tue, Aug 20, 2019 at 12:26 PM Nick Couchman <[email protected]> wrote:
> On Tue, Aug 20, 2019 at 12:20 PM Mike Sollanych <[email protected]> > wrote: > >> Thanks for your response, Nick. >> >> > However, I wonder does the Consul service discovery have any sort of >> API that could be leveraged to dynamically pull connection information? >> >> Yes, it's intended for exactly this kind of thing. >> https://www.consul.io/api/index.html is the tip of the iceberg. Most >> likely it would make sense for the user to create a Prepared Query >> https://www.consul.io/api/query.html and then provide the ID of that to >> Guacamole or whatever piece of middleware in order to have it run the query >> and get back the right set of services. This should provide good >> abstraction and save the middleware from having to implement a lot of logic. >> >> > Yeah, I started poking at it a bit last night - I had never heard of > Consul before, but it looks really cool, and the API looks reasonably easy > to use. > > For what it's worth, I did a quick implementation of an authentication extension that talks to the Consul.IO HTTP API to get service information. Code repository is here: https://github.com/necouchman/guacamole-auto-consulio It's currently written against the 1.0.0 code, and is pretty basic - just pulls in any service found in Consul.IO that is tagged with "guacamole" and lists it out on the home page. Does not attempt any permission checks or anything like that, and doesn't even support TLS/SSL connection to the Consul.IO service at this point. Definitely could be improved upon to leverage some of the additional features of Consul.IO, but it works (for me :-). -Nick >
