QoS Anonymous Access Permission Verification Extension

QoS Anonymous Access Permission Verification Extension

Extension Description

QoS anonymous access permission verification extension point.

Extension Interface

org.apache.dubbo.qos.permission.PermissionChecker

Extension Configuration

Dubbo QoS dubbo.application.qos-anonymous-access-permission-level anonymous access permission verification.

Default Implementation

org.apache.dubbo.qos.permission.DefaultAnonymousAccessPermissionChecker

Extension Example

Maven project structure:

src
 |-main
    |-java
        |-com
            |-xxx
                |-XxxPermissionChecker.java (Implementing the PermissionChecker interface)
    |-resources
        |-META-INF
            |-dubbo
                |-org.apache.dubbo.qos.permission.PermissionChecker` (Plain text file, content: qosPermissionChecker=com.xxx.XxxPermissionChecker)

XxxPermissionChecker.java:

package com.xxx.qos.permission;

import org.apache.dubbo.qos.permission.PermissionChecker;

public class XxxAnonymousAccessPermissionChecker implements PermissionChecker {

    @Override
    public boolean access(CommandContext commandContext, PermissionLevel defaultCmdRequiredPermissionLevel) {
      // ...
    }
}

META-INF/dubbo/org.apache.dubbo.qos.permission.PermissionChecker:

qosPermissionChecker=com.xxx.XxxPermissionChecker