Aircloak / aircloak

This repository contains the Aircloak Air frontend as well as the code for our Cloak query and anonymization platform
2 stars 0 forks source link

Tableau schema detection fails #4878

Open sebastian opened 3 years ago

sebastian commented 3 years ago

They try to run SELECT * FROM table queries, which we reject because of the uid-column being selected. Then they run the following query:

SELECT n.nspname,
       c.relname,
       a.attname,
       a.atttypid,
       t.typname,
       a.attnum,
       a.attlen,
       a.atttypmod,
       a.attnotnull,
       c.relhasrules,
       c.relkind,
       c.oid,
       Pg_get_expr(d.adbin, d.adrelid),
       CASE t.typtype
         WHEN 'd' THEN t.typbasetype
         ELSE 0
       END,
       t.typtypmod,
       c.relhasoids
FROM   (((pg_catalog.pg_class c
          inner join pg_catalog.pg_namespace n
                  ON n.oid = c.relnamespace
                     AND c.relname LIKE 'games'
                     AND n.nspname LIKE 'public')
         inner join pg_catalog.pg_attribute a
                 ON ( NOT a.attisdropped )
                    AND a.attnum > 0
                    AND a.attrelid = c.oid)
        inner join pg_catalog.pg_type t
                ON t.oid = a.atttypid)
       left outer join pg_attrdef d
                    ON a.atthasdef
                       AND d.adrelid = a.attrelid
                       AND d.adnum = a.attnum
ORDER  BY n.nspname,
          c.relname,
          attnum 

to which we reply with:

2021-01-04 12:18:53.703 [info] psql server: sending {:syntax_error, "current transaction is aborted, commands ignored until end of transaction block"}

I'm not sure what is going on here to be honest. I also don't think it necessarily needs to prevent us from making the release.

sebastian commented 3 years ago

This happens when pulling in table players then games in the GamesAndPlayers dataset. However when removing games and then adding it again, I get it to work quite consistently...