GUACAMOLE-1723: Enforce access time restrictions for logged in users.

This commit is contained in:
James Muehlner
2022-12-01 00:22:02 +00:00
parent 7c502fdd0e
commit 18d971a837
20 changed files with 497 additions and 14 deletions

View File

@@ -412,4 +412,13 @@ public class MySQLEnvironment extends JDBCEnvironment {
true);
}
@Override
public boolean enforceAccessWindowsForActiveSessions() throws GuacamoleException {
// Enforce access window restrictions for active sessions unless explicitly disabled
return getProperty(
MySQLGuacamoleProperties.MYSQL_ENFORCE_ACCESS_WINDOWS_FOR_ACTIVE_SESSIONS,
true);
}
}

View File

@@ -278,4 +278,17 @@ public class MySQLGuacamoleProperties {
};
/**
* Whether or not user-specific access time windows should be enforced for active sessions,
* i.e. whether users with active sessions should be logged out immediately when an access
* window closes or the user is disabled.
*/
public static final BooleanGuacamoleProperty MYSQL_ENFORCE_ACCESS_WINDOWS_FOR_ACTIVE_SESSIONS =
new BooleanGuacamoleProperty() {
@Override
public String getName() { return "mysql-enforce-access-windows-for-active-sessions"; }
};
}