67663c79aa
This is just a test to see how feasible is to remove the SECURITY DEFINER and have regular users setup their FDW. There are still problems with this approach: - need to grant the usage of postgres_fdw (no big issue) - need CREATEROLE privilege. A problem in itself (see the NOTES https://www.postgresql.org/docs/current/sql-createrole.html) Aside from those, there are still practical problems: ``` > Executing query 'SELECT cartodb.CDB_SetUp_User_Foreign_Server('test_user_fdw', '{ "server": { "extensions": "postgis", "dbname": "fdw_target", "host": "localhost", "port": 5432 }, "user_mapping": { "user": "fdw_user", "password": "foobarino" } }');' as cdb_testmember_1 ERROR: permission denied for foreign-data wrapper postgres_fdw CONTEXT: SQL statement "ALTER SERVER test_user_fdw OWNER TO test_user_fdw" PL/pgSQL function cdb_setup_user_foreign_server(name,json) line 32 at EXECUTE ``` |
||
---|---|---|
.. | ||
CDB_AnalysisCatalog.sql | ||
CDB_AnalysisCheck.sql | ||
CDB_AnalysisSupport.sql | ||
CDB_CartodbfyTable.sql | ||
CDB_ColumnNames.sql | ||
CDB_ColumnType.sql | ||
CDB_Conf.sql | ||
CDB_DateToNumber.sql | ||
CDB_DDLTriggers.sql | ||
CDB_DigitSeparator.sql | ||
CDB_DistinctMeasure.sql | ||
CDB_DistType.sql | ||
CDB_EqualIntervalBins.sql | ||
CDB_EstimateRowCount.sql | ||
CDB_ExtensionPost.sql | ||
CDB_ExtensionUtils.sql | ||
CDB_ForeignTable.sql | ||
CDB_GhostTables.sql | ||
CDB_GreatCircle.sql | ||
CDB_Groups_API.sql | ||
CDB_Groups.sql | ||
CDB_HeadsTailsBins.sql | ||
CDB_Helper.sql | ||
CDB_Hexagon.sql | ||
CDB_JenksBins.sql | ||
CDB_LatLng.sql | ||
CDB_Math.sql | ||
CDB_Organizations.sql | ||
CDB_Overviews.sql | ||
CDB_OverviewsSupport.sql | ||
CDB_QuantileBins.sql | ||
CDB_QueryStatements.sql | ||
CDB_QueryTables.sql | ||
CDB_Quota.sql | ||
CDB_RandomTids.sql | ||
CDB_RectangleGrid.sql | ||
CDB_SearchPath.sql | ||
CDB_Stats.sql | ||
CDB_StringToDate.sql | ||
CDB_SyncTable.sql | ||
CDB_TableIndexes.sql | ||
CDB_TableMetadata.sql | ||
CDB_TransformToWebmercator.sql | ||
CDB_Username.sql | ||
CDB_UserTables.sql | ||
CDB_XYZ.sql | ||
CDB_ZoomFromScale.sql |