-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1312 from jemrobinson/1311-fix-guacamole-dashboard
Fix Guacamole database
- Loading branch information
Showing
4 changed files
with
19 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
deployment/secure_research_environment/cloud_init/resources/guacamole_db_permissions.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
SELECT | ||
guacamole_connection.connection_name, | ||
guacamole_entity.name | ||
FROM | ||
guacamole_connection_permission | ||
JOIN guacamole_connection ON guacamole_connection_permission.connection_id = guacamole_connection.connection_id | ||
JOIN guacamole_user_group ON guacamole_user_group.entity_id = guacamole_connection_permission.entity_id | ||
JOIN guacamole_user_group_member ON guacamole_user_group_member.user_group_id = guacamole_user_group.user_group_id | ||
JOIN guacamole_entity ON guacamole_entity.entity_id = guacamole_user_group_member.member_entity_id | ||
WHERE | ||
connection_name LIKE 'Desktop:%' | ||
AND permission = 'READ'; |
2 changes: 1 addition & 1 deletion
2
...oyment/secure_research_environment/cloud_init/resources/guacamole_synchronise_database.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
#! /bin/bash | ||
echo "Running LDAP synchronisation..." | tee >(logger -t SafeHaven) | ||
pg_ldap_sync -c /opt/pg-ldap-sync/configuration.yaml -vv | logger -t SafeHaven | ||
/usr/local/bin/pg_ldap_sync -vvv -c /opt/pg-ldap-sync/configuration.yaml 2>&1 | logger -t SafeHaven | ||
echo "Updating database..." | tee >(logger -t SafeHaven) | ||
su guacamoledaemon -c "docker-compose -f /opt/guacamole/docker-compose.yaml exec -T postgres psql -U guacamole -f /scripts/db_update.sql" | logger -t SafeHaven | ||
echo "Finished database synchronisation" | tee >(logger -t SafeHaven) |