Updated on 2025-08-29 GMT+08:00

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

  1. Click the target engine.
  2. 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.

  3. In the displayed Security Authentication dialog box, enter the account name and password, and click OK.

  4. Click the target microservice. Click Black and white list.
  5. 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.

  6. Click OK.