Skip to content

Commit

Permalink
Provider add token (#353)
Browse files Browse the repository at this point in the history
* provider add token

* fix some don't support token protocol

* fix ci

* revocer license
  • Loading branch information
haoyann committed Aug 3, 2021
1 parent cd72718 commit a051772
Show file tree
Hide file tree
Showing 82 changed files with 140 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,4 @@ dubbo.application.name=samples-annotation-provider
dubbo.registry.address=zookeeper://${zookeeper.address:127.0.0.1}:2181
dubbo.protocol.name=dubbo
dubbo.protocol.port=20880
dubbo.provider.token=true
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

<dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>

<dubbo:provider token="true"/>

<dubbo:protocol name="dubbo" port="20880"/>

<bean id="greetingService" class="org.apache.dubbo.samples.async.impl.GreetingsServiceImpl"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@

<dubbo:protocol name="dubbo" port="20880"/>

<dubbo:provider token="true"/>

<bean id="asyncService" class="org.apache.dubbo.samples.governance.impl.AsyncServiceImpl"/>

<dubbo:service interface="org.apache.dubbo.samples.governance.api.AsyncService" ref="asyncService"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

<dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>

<dubbo:provider token="true"/>

<dubbo:protocol name="dubbo" port="20880"/>

<bean id="asyncService" class="org.apache.dubbo.samples.async.impl.AsyncServiceImpl"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

<dubbo:protocol name="dubbo" port="20880"/>

<dubbo:provider token="true"/>

<bean id="asyncService" class="org.apache.dubbo.samples.async.impl.AsyncServiceImpl"/>

<dubbo:service interface="org.apache.dubbo.samples.async.api.AsyncService" ref="asyncService"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

<dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>

<dubbo:provider token="true"/>

<dubbo:protocol name="dubbo" port="20880"/>

<bean id="asyncService" class="org.apache.dubbo.samples.async.impl.AsyncServiceImpl"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

<dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>

<dubbo:provider token="true"/>

<dubbo:protocol name="dubbo" port="20880"/>

<bean id="demoService" class="org.apache.dubbo.samples.attachment.impl.AttachmentImpl"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,4 +21,5 @@ dubbo.application.name=samples-annotation-provider
dubbo.registry.address=zookeeper://${zookeeper.address:127.0.0.1}:2181
dubbo.registry.simplifed=true
dubbo.protocol.name=dubbo
dubbo.protocol.port=20880
dubbo.protocol.port=20880
dubbo.provider.token=true
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

<dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>

<dubbo:provider token="true"/>

<bean id="demoService" class="org.apache.dubbo.samples.basic.impl.DemoServiceImpl"/>

<dubbo:service interface="org.apache.dubbo.samples.basic.api.DemoService" ref="demoService"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@

<dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:${zookeeper.port:2181}"/>

<dubbo:provider token="true"/>

<dubbo:protocol name="dubbo" port="20880"/>

<bean id="hibernateService" class="org.apache.dubbo.samples.boundary.hibernate.impl.HibernateServiceImpl"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dubbo.scan.base-packages=org.apache.dubbo.samples.boundary.mybatis
dubbo.protocol.name=dubbo
dubbo.protocol.port=20880
dubbo.registry.address=zookeeper://127.0.0.1:2181

dubbo.provider.token=true
dubbo.application.name=${spring.application.name}

spring.datasource.type=com.alibaba.druid.pool.DruidDataSource
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

<dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:${zookeeper.port:2181}"/>

<dubbo:provider token="true"/>

<dubbo:protocol name="dubbo" port="20880"/>

<bean id="cacheService" class="org.apache.dubbo.samples.cache.impl.CacheServiceImpl"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

<dubbo:protocol name="dubbo" port="20880"/>

<dubbo:provider token="true"/>

<bean id="callbackService" class="org.apache.dubbo.samples.callback.impl.CallbackServiceImpl"/>

<dubbo:service interface="org.apache.dubbo.samples.callback.api.CallbackService" ref="callbackService"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<!-- optional provider's application name, used for tracing dependency relationship -->
<dubbo:application name="chain-backend-app"/>
<dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
<dubbo:provider token="true"/>
<dubbo:protocol name="dubbo" port="20880"/>

<dubbo:config-center address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
<!-- optional provider's application name, used for tracing dependency relationship -->
<dubbo:application name="chain-middle-app"/>
<dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
<dubbo:provider token="true"/>
<dubbo:protocol name="dubbo" port="20881"/>

<dubbo:config-center address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

<dubbo:protocol name="dubbo"/>

<dubbo:provider token="true"/>

<bean id="demoService" class="org.apache.dubbo.demo.provider.DemoServiceImpl"/>

<dubbo:service interface="org.apache.dubbo.demo.DemoService" ref="demoService"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@

<dubbo:application name="demo-provider" metadata-type="remote"/>

<dubbo:provider token="true"/>

<dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181?registry-type=service"/>
<!-- <dubbo:registry address="nacos://${nacos.address:127.0.0.1}:8848?registry-type=service"/>-->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

<dubbo:protocol name="dubbo" port="20881"/>

<dubbo:provider token="true"/>

<bean id="demoServiceFromNormal" class="org.apache.dubbo.demo.provider.DemoServiceFromNormal"/>
<bean id="demoServiceFromDual" class="org.apache.dubbo.demo.provider.DemoServiceFromDual"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

<dubbo:protocol name="dubbo" port="20882"/>

<dubbo:provider token="true"/>

<bean id="demoServiceFromService" class="org.apache.dubbo.demo.provider.DemoServiceFromService"/>
<bean id="demoServiceFromDual" class="org.apache.dubbo.demo.provider.DemoServiceFromDual"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@

<dubbo:protocol name="dubbo"/>

<dubbo:provider token="true"/>

<bean id="demoService" class="org.apache.dubbo.demo.provider.DemoServiceImpl"/>
<bean id="greetingService" class="org.apache.dubbo.demo.provider.GreetingServiceImpl"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

<dubbo:protocol name="dubbo" port="20890"/>

<dubbo:provider token="true"/>

<bean id="demoService" class="org.apache.dubbo.samples.basic.impl.DemoServiceImpl"/>

<dubbo:service interface="org.apache.dubbo.samples.basic.api.DemoService" ref="demoService"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@

dubbo.application.name=configcenter-annotation-provider
dubbo.config-center.address=zookeeper://${zookeeper.address:127.0.0.1}:2181
dubbo.provider.token=true
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@
dubbo.application.name=configcenter-multi-registries-provider
dubbo.config-center.address=zookeeper://${config-center.address:127.0.0.1}:2181
dubbo.config-center.config-file=dubbo.properties
dubbo.provider.token=true
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

<dubbo:registry address="consul://${consul.address:127.0.0.1}:8500"/>

<dubbo:provider token="true"/>

<bean id="demoService" class="org.apache.dubbo.samples.consul.impl.DemoServiceImpl"/>

<dubbo:service interface="org.apache.dubbo.samples.consul.api.DemoService" ref="demoService"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

<dubbo:protocol name="dubbo" port="20880"/>

<dubbo:provider token="true"/>

<bean id="contextServiceImpl" class="org.apache.dubbo.samples.context.impl.ContextServiceImpl"/>

<dubbo:service interface="org.apache.dubbo.samples.context.api.ContextService" ref="contextServiceImpl"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@

<dubbo:protocol name="dubbo" port="20890"/>
<dubbo:protocol name="hessian" port="8082"/>
<dubbo:provider token="true"/>

<dubbo:provider id="defaultDubboCofig" protocol="dubbo,hessian" registry="beijingRegistry,shanghaiRegistry">
<dubbo:service interface="org.apache.dubbo.samples.multi.registry.api.HelloService" ref="helloService"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@

<dubbo:registry client="curator" address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>

<dubbo:provider token="true"/>

<dubbo:protocol name="dubbo" port="20880"/>

<dubbo:provider delay="-1"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

<dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>

<dubbo:provider token="true"/>

<dubbo:protocol name="dubbo" port="20880"/>

<bean id="demoService" class="org.apache.dubbo.samples.echo.impl.DemoServiceImpl"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# Base packages to scan Dubbo Components (e.g @DubboService , @DubboReference)
dubbo.scan.basePackages=org.apache.dubbo.samples.edas
dubbo.application.name=dubbo-provider-demo
dubbo.registry.address=edas://127.0.0.1:8080
dubbo.registry.address=edas://127.0.0.1:8080
dubbo.provider.token=true
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

<dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>

<dubbo:provider token="true"/>

<!-- service implementation, as same as regular local bean -->
<bean id="demoService" class="org.apache.dubbo.samples.basic.impl.DemoServiceImpl"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

<dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>

<dubbo:provider token="true"/>

<dubbo:protocol name="dubbo" port="20880"/>

<bean id="helloserviceimpl" class="org.apache.dubbo.samples.generic.call.impl.HelloServiceImpl"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<dubbo:application name="generic-type-provider"/>

<dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
<dubbo:provider token="true"/>

<dubbo:protocol name="dubbo" port="20880"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<dubbo:application name="governance-appoverride-provider"/>

<dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
<dubbo:provider token="true"/>
<dubbo:protocol name="dubbo" port="${dubbo.port:20880}"/>

<bean id="demoService" class="org.apache.dubbo.samples.governance.impl.DemoServiceImpl"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@
<dubbo:application name="governance-conditionrouter-provider"/>

<dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
<dubbo:provider token="true"/>

<dubbo:protocol name="dubbo" port="${dubbo.port:-1}"/>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

<dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>

<dubbo:provider token="true"/>

<dubbo:protocol name="dubbo" port="${dubbo.port:-1}" heartbeat="10000"/>

<dubbo:config-center highest-priority="false" address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

<dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>

<dubbo:provider token="true"/>

<dubbo:protocol name="dubbo" port="${dubbo.port:-1}" heartbeat="10000"/>

<dubbo:config-center highest-priority="false" address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

<dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>

<dubbo:provider token="true"/>

<dubbo:protocol name="dubbo" port="20880"/>

<bean id="demoService" class="org.apache.dubbo.samples.governance.impl.DemoServiceImpl"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

<dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>

<dubbo:provider token="true"/>

<dubbo:protocol name="dubbo" port="${dubbo.port:-1}" heartbeat="10000"/>

<dubbo:config-center highest-priority="false" address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@

<dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>

<dubbo:provider token="true"/>

<dubbo:protocol name="dubbo" port="20880"/>

<bean id="groupAService" class="org.apache.dubbo.samples.group.impl.GroupAServiceImpl"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ dubbo.registry.address=kubernetes://${your kubernetes api server ip here}:${your
dubbo.protocol.name=dubbo
dubbo.protocol.port=20880
dubbo.application.qosEnable=true
dubbo.application.qosAcceptForeignIp=true
dubbo.application.qosAcceptForeignIp=true
dubbo.provider.token=true
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,5 @@ dubbo.registry.address=dns://${your kube-dns ip here}:53?registry-type=service&d
dubbo.protocol.name=dubbo
dubbo.protocol.port=20880
dubbo.application.qosEnable=true
dubbo.application.qosAcceptForeignIp=true
dubbo.application.qosAcceptForeignIp=true
dubbo.provider.token=true
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

<dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>

<dubbo:provider token="true"/>

<dubbo:protocol name="dubbo" port="20880"/>

<bean id="mergeService" class="org.apache.dubbo.samples.merge.impl.MergeServiceImpl"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

<dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>

<dubbo:provider token="true"/>

<dubbo:protocol name="dubbo" port="20881"/>

<bean id="mergeService3" class="org.apache.dubbo.samples.merge.impl.MergeServiceImpl3"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
import org.apache.dubbo.config.annotation.DubboService;
import org.apache.dubbo.samples.metadatareport.local.annotation.api.AnnotationService;

@DubboService(version = "1.1.8", group = "d-test")
@DubboService(version = "1.1.8", group = "d-test",timeout = 1000)
public class AnnotationServiceImpl implements AnnotationService {

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,4 @@
#
dubbo.application.name=metadatareport-local-annotaion-provider
dubbo.registry.address=zookeeper://${zookeeper.address:127.0.0.1}:2181
dubbo.provider.token=true
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@

<dubbo:registry address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>

<dubbo:provider token="true"/>

<dubbo:metadata-report address="zookeeper://${zookeeper.address:127.0.0.1}:2181"/>

<bean id="demoService" class="org.apache.dubbo.samples.metadatareport.local.properties.impl.DemoServiceImpl"/>
Expand Down

0 comments on commit a051772

Please sign in to comment.