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:

  1. src
  2. |-main
  3. |-java
  4. |-com
  5. |-xxx
  6. |-XxxPermissionChecker.java (Implementing the PermissionChecker interface)
  7. |-resources
  8. |-META-INF
  9. |-dubbo
  10. |-org.apache.dubbo.qos.permission.PermissionChecker` (Plain text file, content: qosPermissionChecker=com.xxx.XxxPermissionChecker)

XxxPermissionChecker.java:

  1. package com.xxx.qos.permission;
  2. import org.apache.dubbo.qos.permission.PermissionChecker;
  3. public class XxxAnonymousAccessPermissionChecker implements PermissionChecker {
  4. @Override
  5. public boolean access(CommandContext commandContext, PermissionLevel defaultCmdRequiredPermissionLevel) {
  6. // ...
  7. }
  8. }

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

  1. qosPermissionChecker=com.xxx.XxxPermissionChecker

Feedback

Was this page helpful?

Yes No

Last modified September 30, 2024: Update & Translate Overview Docs (#3040) (d37ebceaea7)