GitHub user mitpjones added a comment to the discussion: [Q/A] (Dubbo version
3.3.1) Where can I find an example of using the Auth plugin?
I am using the
apache-dubbo/example/dubbo-samples/1-basic/dubbo-samples-spring-boot example
I have followed the README. After pasting
```
provider:
auth: true
username: admin
password: notadmin
authenticator: basic
```
in to the Provider's application.yml if I call
```
curl \
--header "Content-Type: application/json" \
--data '["Dubbo"]' \
http://localhost:50052/org.apache.dubbo.springboot.demo.DemoService/sayHello/
```
I get the expected
```
{"message":"Forbid invoke remote service interface
org.apache.dubbo.springboot.demo.DemoService method sayHello() from consumer
/127.0.0.1:39596 to provider 172.28.100.101","status":"401"}
```
However if I start the Consumer
```
mvn compile exec:java
-Dexec.mainClass="org.apache.dubbo.springboot.demo.consumer.ConsumerApplication"
```
I get
```
[INFO] Scanning for projects...
[INFO]
[INFO] --------< org.apache.dubbo:dubbo-samples-spring-boot-consumer >---------
[INFO] Building dubbo-samples-spring-boot-consumer 1.0-SNAPSHOT
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
.
.
.
08:52:38.069 |-INFO
[org.apache.dubbo.springboot.demo.consumer.ConsumerApplication.main()]
ngboot.demo.consumer.ConsumerApplication:56 -| Started ConsumerApplication in
2.455 seconds (process running for 4.112)
Receive result ======> Hello world
08:52:38.130 |-INFO [pool-2-thread-1]
.event.AwaitingNonWebApplicationListener:179 -| [Dubbo] Current Spring Boot
Application is await...
Mon Aug 11 08:52:39 NZST 2025 Receive result ======> Hello world
Mon Aug 11 08:52:40 NZST 2025 Receive result ======> Hello world
```
Why is the consumer not forbidden?
GitHub link:
https://github.com/apache/dubbo/discussions/15612#discussioncomment-14066284
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]