Configuring Blacklist and Whitelist
Based on the public key authentication mechanism, the ServiceComb engine provides the blacklist and whitelist functions. The blacklist and whitelist can be used to control which services can be accessed by microservices. This policy applies only to microservices accessed through Java chassis.
Prerequisites
- You have created a microservice by referring to Creating a Microservice. After the microservice starts, the service instance is registered with the corresponding service based on the configurations in the YAML file. If the microservice is not created in advance or has been deleted, the microservice is automatically created when the service instance is registered.
- The blacklist and whitelist take effect only after public key authentication is enabled. For details, see Configuring Public Key Authentication.
Configuring Blacklist and Whitelist
- Click the target engine.
- Choose Microservice Governance.
- For engines with security authentication disabled, go to 4.
- For engines with security authentication enabled, if the login VDC user is the user imported in Importing an IAM Account, go to 4. For other users, go to 3.
- In the displayed Security Authentication dialog box, enter the account name and password, and click OK.
- If you connect to the ServiceComb engine for the first time, enter the account name root and the password entered when Creating a ServiceComb Engine.
- For details about how to create an account, see Adding an Account.
- Click the target microservice. Click Black and white list.
- Click New to add a blacklist or whitelist for the application. The following table describes configuration items of blacklist and whitelist.
Figure 1 Configuring blacklist and whitelist
Parameter
Description
Type
- Blacklist: Microservices that match the matching rule are not allowed to access the current service.
- Whitelist: Microservices that match the matching rule are allowed to access the current service.
Rule
Use a regular expression.
For example, if Rule is set to data*, services whose names start with data in the blacklist are not allowed to access the current service, or services whose names start with data in the whitelist are allowed to access the current service.
- Click OK.
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot