[GitHub] lijasonvip commented on a change in pull request #581: [SCB-378] add readme document for samples

2018-03-10 Thread GitBox
lijasonvip commented on a change in pull request #581: [SCB-378] add readme 
document for samples
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/581#discussion_r173617546
 
 

 ##
 File path: samples/auth-sample/README.md
 ##
 @@ -0,0 +1,82 @@
+## Auth-Sample
+
+To make sure the security between the interfaces of services, users can enable 
`RSA Authorizaiton` by simple configuration as below.
+
+## Consumer Service
+
+* Add dependence in pom.xml file:
+
+  ```xml
+  
+org.apache.servicecomb
+handler-publickey-auth
+   
+  ```
+
+* Add handler chain in microservice.yaml:
+
+  ```yaml
+  cse:
+# other configurations omitted
+handler:
+  chain:
+Consumer:
+  default: auth-consumer
+  ```
+
+## Provider Service
+
+* Add dependence in pom.xml file:
+
+  ```xml
+  
+org.apache.servicecomb
+handler-publickey-auth
+   
+  ```
+
+* Add handler chain in microservice.yaml:
+
+  ```yaml
+  cse:
+# other configurations omitted
+handler:
+  chain:
+Consumer:
+  default: auth-provider
+  ```
+
+## Sample Quick Start
+
+Auth sample use `RestTemplate` to present RSA communication between provider 
and consumer.
+
+1. Start the ServiceComb/Service Center
+
+   - [how to start the service 
center](http://servicecomb.incubator.apache.org/users/setup-environment/#)
+   - make sure service center address is configured correctly in 
`microservice.yaml` file
+
+   ```yaml
+   cse:
+ service:
+   registry:
+ address: http://127.0.0.1:30100   #service center address
+   ```
+
+2. Start the auth-provider service
+
+   - Start provider service by mvn
+
+ ```bash
+ cd incubator-servicecomb-java-chassis/
+ mvn clean install -Psamples -DskipTests   #only need to 
install at first time.
 
 Review comment:
   Fixed.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] lijasonvip commented on a change in pull request #581: [SCB-378] add readme document for samples

2018-03-09 Thread GitBox
lijasonvip commented on a change in pull request #581: [SCB-378] add readme 
document for samples
URL: 
https://github.com/apache/incubator-servicecomb-java-chassis/pull/581#discussion_r173472817
 
 

 ##
 File path: samples/auth-sample/README.md
 ##
 @@ -0,0 +1,59 @@
+## Auth-Sample
+
+To make sure the security between the interfaces of services, users can enable 
`RSA Authorizaiton` by simple configuration as below.
+
+## Consumer Service
+
+* Add dependence in pom.xml file:
+
+  ```xml
+  
+org.apache.servicecomb
+handler-publickey-auth
+   
+  ```
+
+* Add handler chain in microservice.yaml:
+
+  ```yaml
+  cse:
+# other configurations omitted
+handler:
+  chain:
+Consumer:
+  default: auth-consumer
+  ```
+
+## Provider Service
+
+* Add dependence in pom.xml file:
+
+  ```xml
+  
+org.apache.servicecomb
+handler-publickey-auth
+   
+  ```
+
+* Add handler chain in microservice.yaml:
+
+  ```yaml
+  cse:
+# other configurations omitted
+handler:
+  chain:
+Consumer:
+  default: auth-provider
+  ```
+
+## Sample Quick Start
+
+Auth sample use `RestTemplate` to present RSA communication between provider 
and consumer.
+
+* Start ServiceComb/Service Center
+
+  [how to start service 
center](http://servicecomb.incubator.apache.org/users/setup-environment/#)
+
+* Start auth-provider
 
 Review comment:
   ok, will do that ASAP.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services