data-classification
folder for this tutorialWorkspace Admin
role.
Service Account
as the Type, fill in the Email with api-sample@service.bytebase.com
, choose Workspace DBA
as Roles, and click Confirm.
/public/classification.json
file within the data-classification
repository, you’ll see the classification is imported.Partial masking for Level 1
, click Add Condition.
prod
.
AND
operator, and set the Classification Level in Level 1
.
Partial
and click Confirm.
Level 2
with Masking Level as Full
.
data-security
repository.
data-classification
demo appdata-classification
folder of the api-example
repository, and copy env-template.local
file as .env.local
. Replace the placeholders with yours.
pnpm i
and pnpm run dev
, you can run the demo app locally with localhost:3000
.
salary
, it’s possible to set the classification level for this table, but here we skip it.
1-4 Health [Level 2]
for the amount
column and 1-1 Basic [Level 1]
for the from_date
column.
salary
table, you’ll see the data is masked accordingly.
/v1/instances/${instance}/databases/${database}/metadata
to fetch the database schema information. In this demo, the instance is hardcoded as test-sample-instance
and the database is test-sample-database
.
schemas
:
schemaConfigs
:
/v1/instances/${instance}/databases/${database}/metadata
with PATCH
method.classification.json
file. It will be parsed and saved as global classification.
/v1/settings/bb.workspace.data-classification
to fetch the defined classification, so it’s always up to date.