0

I'm new to Guacamole and I need to get a shared connection URL for every new connection. For reasons, we don't have the REST API available. In Guacamole 1.0, how do I generate the shared connection url using the Java api? I want to have a url that I can send to a user so they can share an existing connection.

Thanks

SHWork
  • 3
  • 2

2 Answers2

1

It is possible to get sharing profiles using Java API. First, you need to make sure you are using an authentication extension that supports sharing. The database extensions under guacamole-auth-jdbc supports sharing.

To get sharing profiles, you need to call the following API:

GET <base-url>/api/session/tunnels/<extension-id>/activeConnection/connection/sharingProfiles?token=<token>

where:

  • base-url is the application base url
  • extension-id is the ID of the particular extension (it may be mysql or sqlserver etc...). You can get this ID in the AuthenticationProvider.java source file in the extension code.
  • token is access token, you can get one using api/tokens call; the token should be the first thing to get, as it is used for all API calls.

The JS example for using sharing API you can find in the guacamole/src/main/webapp/app/rest/services/tunnelService.js file, and for getting token in the guacamole/src/main/webapp/app/auth/service/authenticationService.js file. Converting example from JS to Java shouldn't be a problem, those files are simple service that just use the Java API.

mnikolic
  • 572
  • 1
  • 5
  • 9
0

The short answer is that you can't. The URL is created in the existing client's JavaScript and the API, so if you don't use those, you can't create a share URL. You will need to modify the Java code in the client to create a shared connection.

Tamás Sengel
  • 55,884
  • 29
  • 169
  • 223
SHWork
  • 3
  • 2