SQL Development Policy Management
By default, NineData provides SQL development policies for both development and production environments to ensure the security of your databases. You can also customize your own SQL development policies based on your business needs.
Notes
- Newly created policies must be based on existing policies.
- The default policies provided by the system cannot be deleted but can be edited.
- In the DevOps Pro edition, creating policies is not supported, while DevOps Enterprise edition has no such limitation.
Prerequisites
- You have created or joined an organization, and this organization has subscribed to either DevOps Pro or DevOps Enterprise. Please ensure that your annual or monthly subscription is still active. For more information, please refer to Manage Organizations.
- Your current account has switched to the target organization. For more information, please refer to Switching to an Organization.
- You have the role of system administrator in the organization.
Creating a Policy
Log in to the NineData console.
In the left navigation pane, click DevOps > Policy & Process.
On the Policy & Process page, click the SQL Dev Policy tab, and then click Create Policy in the upper-right corner.
tipYou can also click Duplicate in the Actions column on the right of the target policy to create a new policy based on it.
In the Create Policy dialog box that appears, configure the following parameters and click OK.
Duplicate Policy: Select the policy on which to base the new policy.
tipIf you arrived at this dialog box by clicking Duplicate, this has already been selected by default.
Name: Enter a name for the new policy, which can be between 1 and 32 characters. To facilitate subsequent searching and management, please use a meaningful name.
tipIf you arrived at this dialog box by clicking Duplicate, this has already been filled in by default.
Description (optional): Enter a description for the new policy, which can be between 1 and 64 characters.
The console automatically jumps to the Details page, where you can edit and switch the target rules.
tipThe SQL development rules have been categorized according to different modules. You can switch between them by clicking on the category tabs.
:::
Edit Policy
- Log in to the NineData console.
- In the left navigation pane, click DevOps > Policy & Process.
- On the Policy & Process page, click the SQL Dev Policy tab, and then click the target Name.
- The console will navigate to the Details page, where you can edit and toggle the target policy.
Delete Policy
Log in to the NineData console.
In the left navigation pane, click DevOps > Policy & Process.
On the Policy & Process page, click the SQL Dev Policy tab.
Click the policy you want to delete, and then click the Delete button in the upper right corner of the Details page.
tipYou can also click the Delete button in the Actions column on the right side of the target policy.
In the confirmation window that appears, click Delete.
tipIf the current policy is already associated with an environment or data source, you need to select a new process for these resources in the Associated Envir. and datasources existed, Please modify first. window that pops up, and then click Modify and Delete.
Associate policy with nvironment
After the SQL development policy is associated with an environment, it will override the original policy of the environment, and all data sources under this environment will apply the new policy.
- Log in to the NineData console.
- In the left navigation pane, click DevOps > Policy & Process.
- On the Envir. Config tab, find the name of the target environment, and click the Edit button in the Actions column on the right side.
- In the Edit Envir. Config window that pops up, select the SQL Dev Policy you need, and click OK.
Associate policy with data source
After the SQL development policy is associated with a data source, the data source will follow the new policy and will no longer follow the policy in the corresponding environment. Other data sources in the environment are not affected.
Log in to the NineData console.
In the left navigation bar, click DevOps > Policy & Process.
Click the Datasource Config tab, find the target data source name, and click Edit on the right of the Actions column.
tipIn the SQL Dev Policy associated with the data source, the
icon on the left indicates that SQL Dev Policy has inherited the configuration in the environment.
In the popup window of Edit Datasource Config,
uncheck the box on the left of Inheriting Envir. Config under SQL Dev Policy, and then select the standard you need and click on OK.
tipTo restore the SQL Dev Policy configured in the environment, simply reselect Inheriting Envir. Config.
Appendix: Conceptual explanation
When configuring SQL development policy, you can edit each policy. Here, we explain two important configuration items.
| Configuration Item | Explanation |
|---|---|
| Levels | In terms of Must Modify and Suggested, you can adjust the level of each rule based on actual business requirements.
|
| DB Type | List all the database types that the policy supports. You can choose which database type the policy should take effect on according to your needs, and support single and multiple selection. |