On Tue, Jun 29, 2021, 18:43 <[email protected]> wrote:

> Hello,
>
> I have created a shell script that uses the Guacamole REST API.
>
> #!/bin/bash
> #############################
> USER=guacadmin
> PASS=guacadmin
>
> #############################
> export TOKEN=$(curl -s -k -X POST https://localhost/api/tokens -d
> "username=${USER}&password=${PASS}" | jq -r .authToken)
> curl GET -H 'Content-Type: application/json' -s
> http://localhost:8080/guacamole/api/session/data/mysql/users?token=$TOKEN
> | jq | grep username
>
> It's very convenient, but I think it will be a problem if it is operated
> from the outside (Internet).
> Is there a way to deny the above API communication only from the outside?
>

No, this is not possible nor is it a problem:

The REST API is how the web interface itself functions. When you interact
with the web interface in your browser, the internals of that web interface
are actually using the REST API on your behalf.

- Mike

Reply via email to