necouchman commented on code in PR #677:
URL: https://github.com/apache/guacamole-client/pull/677#discussion_r1169360004
##########
extensions/guacamole-auth-jdbc/modules/guacamole-auth-jdbc-base/src/main/java/org/apache/guacamole/auth/jdbc/tunnel/AbstractGuacamoleTunnelService.java:
##########
@@ -416,6 +462,21 @@ private GuacamoleTunnel
assignGuacamoleTunnel(ActiveConnectionRecord activeConne
GuacamoleClientInformation info, Map<String, String> tokens,
boolean interceptErrors) throws GuacamoleException {
+ // Set up JDBC-specific tokens
+ tokens.put(JDBC_DATE_TOKEN,
+ new SimpleDateFormat(JDBC_DATE_TOKEN_FORMAT)
+ .format(activeConnection.getStartDate()));
+ tokens.put(JDBC_TIME_TOKEN,
+ new SimpleDateFormat(JDBC_TIME_TOKEN_FORMAT)
+ .format(activeConnection.getStartDate()));
+ tokens.put(JDBC_CONNECTION_NAME_TOKEN,
activeConnection.getConnectionName());
+ tokens.put(JDBC_CONNECTION_ID_TOKEN,
activeConnection.getConnectionIdentifier());
Review Comment:
Ah, yes, a quick look back at that reminds me why I didn't add it in
`StandardTokenMap`. Currently `StandardTokenMap` is only invoked within
`TunnelRequestService`, and, when it gets called there, the data provided is
somewhat limited. The connection/group name is not provided, and the identifier
is a bit abstract. I'm not sure how much re-tooling we want to do of that
entire chain of classes just to provide these tokens, rather than just relying
on the various `Connection` and `ConnectionGroup` implementations to identify
them?
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]