Okay, I found one mistake, I forgot to define the dist.xml file.
Now I get the expected logs. Thank you!
I created a "public class ProxmoxConnection extends
DelegatingConnection" now, which includes "public GuacamoleTunnel
connect()".
According to the logs, I get a message now, when I connect to a remote
desktop. Looks to be the right position.
For disconnecting I'll try the same.
But additionally:
Is it possible to add own messages then to the startup screen which
appears when I connect?
Then I could make sure to get a status.
A second thing would be: can I add some additional configuration tags in
the configuration web page of a remote desktop?
From the history-recording-storage I saw that these configurations are
already shown in the web config without the plugin being loaded.
I saw getTokens() for other configurations, but I'm not sure if it's the
right location and how I can add own configs that would be available in
the web config.
Injecting and inheriting in this dimension is still new to me..
Thanks!
Kai
Am 20.11.23 um 22:49 schrieb Michael Jumper:
On 11/20/2023 1:25 PM, Kai wrote:
I made some further analyzing of the sources in order to understand
the structur of a plugin..
The nearest extension I could find was
guacamole-history-recording-storage.
I took this as starting point and created a
classProxmoxAuthenticationProviderextendsAbstractAuthenticationProvider
As shown in the extension I made a function call to decorate:
publicUserContextdecorate(UserContextcontext,
AuthenticatedUserauthenticatedUser, Credentialscredentials)
throwsGuacamoleException{
returnnewProxmoxUserContext(context.self(), context);
}
That got to the classProxmoxUserContextextendsTokenInjectingUserContext
privatestaticfinalLoggerlogger=LoggerFactory.getLogger(ProxmoxUserContext.class);
publicProxmoxUserContext(UsercurrentUser, UserContextcontext) {
super(context);
this.currentUser=currentUser;
logger.warn("ProxmoxUserContext() ");
}
I got this to compile as a .jar file and included it into Guacamole.
Getting the log, I saw that this plugin is loaded: "INFO
o.a.g.extension.ExtensionModule - Extension "Proxmox machine
start/stop" (proxmox) loaded."
I was expecting that my logger message would be shown at some point.
When would this extension be called?
The function in question would be called after a successful login. You
would see the message once for every UserContext associated with the
user's session.
Here is how the authentication and authorization flow works:
(1) When a user attempts to log in, every installed extension is given
an opportunity to accept or reject that attempt. If an extension
accepts the attempt, it returns an AuthenticatedUser via its
authenticateUser() function.
(2) The AuthenticatedUser representing the user's now-validated
identity is given to each installed extension via getUserContext().
Each extension now has the opportunity to provide data for that user
via its own UserContext.
(3) For each UserContext obtained in this way, each extension's
decorate() function is invoked to allow those extensions to apply
their own behavior around whatever is already provided by the
UserContexts of other extensions.
The UI presented to the user after they successfully log in is
actually a transparently unified view of all the data available from
however many UserContext objects apply to that user's session.
- Mike
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@guacamole.apache.org
For additional commands, e-mail: user-h...@guacamole.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@guacamole.apache.org
For additional commands, e-mail: user-h...@guacamole.apache.org