Menu

Masked Columns in GBase 8a: What WHERE, GROUP BY, and ORDER BY Actually See
πŸ“°

Masked Columns in GBase 8a: What WHERE, GROUP BY, and ORDER BY Actually See

DEV Community: databaseΒ·MichaelΒ·12 days ago
#RoIEeq0f
#devtodatabase#devto#dev#masked#column
Long article (750 words) β€” no AI summary yet.
Reading 0:00
15s threshold

GBase 8a, the analytical database from Chinese vendor GBASE, supports column-level data masking to keep sensitive values safe. But when a masked column is used in a WHERE filter, a GROUP BY, or an ORDER BY, does the engine work with the original value or the masked one? I ran a set of tests on a gbase cluster to find out.

Test Setup

A single-column numeric table using the default masking policy:

CREATE TABLE "testmask" ( "id" int ( 11 ) DEFAULT NULL MASKED WITH ( FUNCTION = 'DEFAULT()' ) )

Enter fullscreen mode

Exit fullscreen mode

5 rows of test data: 1, 2, 3, 4, 99.

Full Table Scan Without Masking Privileges

Every id comes back as 0 β€” the original values are hidden, exactly as expected.

gbase> select * from testmask; +------+ | id | +------+ | 0 | | 0 | | 0 | | 0 | | 0 | +------+ 5 rows in set (Elapsed: 00:00:00.02)

Enter fullscreen mode

Exit fullscreen mode

WHERE Equality on a Masked Column

id=1 returns 1 row .…

Continue reading β€” create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.