You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-`BYTEBASE_SERVICE_SECRET`: service key copied in the previous step
77
77
78
-
##Understanding the Workflow
78
+
### Step 5 - Understanding the GitHub Workflow
79
79
80
80
Let's dig into the GitHub Actions workflow [code](https://github.com/bytebase/database-security-github-actions-example/blob/main/.github/workflows/bb-masking-1.yml):
81
81
@@ -85,7 +85,15 @@ Let's dig into the GitHub Actions workflow [code](https://github.com/bytebase/da
85
85
86
86
1.**File Detection**: The step `Get changed files` will monitor the changed files in the pull request. For this workflow, we only care about column masking and masking exception. So `masking/databases/**/**/column-masking.json` and `masking/projects/**/masking-exception.json` are filtered out.
87
87
88
-
1.**Apply Masking Columns**: Then step `Apply column masking` will apply the column masking to the database. First it will parse all the column masking files and then do a loop to apply the column masking to the database one by one. The code it calls Bytebase API is as follows:
88
+
1.**PR Feedback**: The step `Comment on PR` will comment on the merged pull to notify the result.
89
+
90
+
## Column Masking
91
+
92
+
[Column Masking](/docs/security/data-masking/column-masking/) lets you specify table columns different Masking Level to mask the data.
93
+
94
+
In Bytebase console, go to a database page, then pick a table, you can specify masking level by clicking pen icon on table detail page.
95
+
96
+
In the GitHub workflow, find the step `Apply column masking`, which will apply the column masking to the database via API. First it will parse all the column masking files and then do a loop to apply the column masking to the database one by one. The code it calls Bytebase API is as follows:
@@ -94,7 +102,17 @@ Let's dig into the GitHub Actions workflow [code](https://github.com/bytebase/da
94
102
--data @"$CHANGED_FILE")
95
103
```
96
104
97
-
1.**Apply Masking Exceptions**: The step `Apply masking exception` will apply the masking exception to the database and the process is similar, the code it calls Bytebase API is as follows:
105
+
By changing the files `masking/databases/**/**/column-masking.json`, create a PR and then merge, the change will be applied to the database.
106
+
107
+
Log in Bytebase console, at the workspace level, click **Data Access > Data Masking**. Click **Explicit Masked Columns**, you can see the column masking is applied to the database.
[Access Unmasked Data](/docs/security/data-masking/access-unmasked-data/) lets you relax the masking levels for the users. Full masked column to partial or partial masked column to none.
114
+
115
+
In the GitHub workflow, find the step `Apply masking exception`, which will apply the masking exception to the database and the process is similar, the code it calls Bytebase API is as follows:
@@ -103,17 +121,9 @@ Let's dig into the GitHub Actions workflow [code](https://github.com/bytebase/da
103
121
--data @"$CHANGED_FILE")
104
122
```
105
123
106
-
1.**PR Feedback**: The step `Comment on PR` will comment on the merged pull to notify the result.
107
-
108
-
## Verifying the Setup
109
-
110
-
1. Create and merge a test PR with masking changes.
111
-
112
-
1. Log in Bytebase console, at the workspace level, click **Data Access > Data Masking**. Click **Explicit Masked Columns**, you can see the column masking is applied to the database.
By changing the files `masking/projects/**/masking-exception.json`, create a PR and then merge, the change will be applied to the database.
115
125
116
-
1. Go to the project `Sample Project`, click **Database > Masking Access**, you can see the masking exception is applied to the database.
126
+
Log in Bytebase console, go to the project `Sample Project`, click **Database > Masking Access**, you can see the masking exception is applied to the database.
0 commit comments