open-horizon / examples

Code examples you can use with Horizon.
Apache License 2.0
40 stars 65 forks source link

Make services "public":false by default for multi-tenancy #399

Closed clementkng closed 3 years ago

clementkng commented 3 years ago

Partially addresses #356

This commit changes the up-to-date services default to "public": false in their service definition files, so if people copy them by default they will not accidentally expose their services to people outside their org. The examples published to the IBM org must be public, so I also changed the exchangePublish.sh script to make the examples "public": true right before they are published. The approach is described in more detail here.

Tested by:

  1. Cloning the examples repo into /tmp/open-horizon (where exchangePublish.sh also pulls in the repo`)
  2. Updating the up-to-date (ie everything except wiotp examples) services there to be "public": false
  3. Running ./exchangePublish.sh -c myorg
  4. Checking all services listed under hzn exchange service list IBM/ had "public": true.

Signed-off-by: Clement Ng clementdng@gmail.com