I am trying to use a compiled version of guacamole client because I want to 
make some changes to the front end of the project.
I was able to compile the project can work with it normally, but the Encrypted 
JSON authentication does not seem to be working, when I was using the docker 
image of the guacamole client everything was working fine, I made a bit of code 
that basically returns the JSON that will be stored in the GUAC_AUTH local 
storage variable and the link to the VM the JSON, the result of my code can be 
seen in this JSON:
{
      "link": "http://192.168.233.90:9040/guacamole/#/client/Z2l0AGMAanNvbg==";,
      "GUAC_AUTH": {
            "authToken": 
"858056C32F92817445D215897B18A08EFEB257A29BDEA8638F5FBC20A17243DF",
            "username": "feef183c-4a29-42a2-985a-581f06f93135",
            "dataSource": "json",
            "availableDataSources": [
                  "postgresql",
                  "postgresql-shared",
                  "json"
            ]
      }
}
I tried it with 3 different connections and they all worked with the docker 
version of guacamole.
The problem now is that it is not working with the version I compiled, Ill 
reiterate that I have not modified the code yet, I have also double checked 
that I'm using the 1.5.5 image and that the pom.xml in the compiled version 
says it is the 1.5.5 version as well. I have also confirmed that both version 
have the following logs

16:13:29.027 [localhost-startStop-1] INFO  o.a.g.extension.ExtensionModule -  - 
[json] "Encrypted JSON Authentication" 
(/tmp/guacamole-home.3hXieEXOMq/extensions/guacamole-auth-json.jar)
16:13:30.381 [localhost-startStop-1] DEBUG o.a.g.extension.ExtensionModule - 
[2] Binding AuthenticationProvider 
"org.apache.guacamole.auth.json.JSONAuthenticationProvider".
16:13:30.678 [localhost-startStop-1] INFO  o.a.g.extension.ExtensionModule - 
Extension "Encrypted JSON Authentication" (json) loaded.

and that all the environment variables i added are the same.
The only difference in behavior i was able to find (besides my authentication 
not working) is that in my compiled version there is an additional variable in 
the local storage that never appears in my docker version, that being the 
GUAC_AUTH_TOKEN variable and that the following request fails in the compiled 
version:
POST
http://192.168.233.90:9040/guacamole/api/tokens
RETURN
{
    "message": "Invalid login",
    "translatableMessage": {
        "key": "APP.TEXT_UNTRANSLATED",
        "variables": {
            "MESSAGE": "Invalid login"
        }
    },
    "statusCode": null,
    "expected": [
        {
            "name": "username",
            "type": "USERNAME"
        }, {
            "name": "password",
            "type": "PASSWORD"
        }
    ],
    "patches": null,
    "type": "INVALID_CREDENTIALS"
}
I tried using the authToken shown in my request as the GUAC_AUTH_TOKEN but that 
also did not work.
After all of this I'm still not able to fix the issue or even figure out the 
source of the problem. If anyone has any idea on how to deal with this any help 
would be appreciated.


Reply via email to