package authserver // vncQuery is used to return all of the configuration values which could // potentially be used to make a decision on vnc auth mode in a single query. // The first column is the kind of config value, indicating both the table and // config_key, while the second column is the config value. // If a configuration value for a given banner or cluster is missing, no row // will be returned. The query is a generic query that will work for both read // only and read write mode, by supplying the appropriate config_key's out of // (vncReadWriteAuthRequired, vncReadWriteAuthRequiredOverride) and // (vncReadAuthRequired, vncReadAuthRequiredOverride) const vncQuery = ` SELECT 'banner_vnc_auth_required' as kind, config_value FROM banner_configs WHERE banner_edge_id = $3 AND config_key = $1 UNION ALL SELECT 'banner_vnc_override' as kind, config_value FROM banner_configs WHERE banner_edge_id = $3 AND config_key = $2 UNION ALL SELECT 'cluster_vnc_auth_required' as kind, config_value FROM cluster_config WHERE cluster_edge_id = $4 AND config_key = $1 ;`