Secure your Service

Secure your Service

Introduction


So you've created your service and deployed it. Now let's show you how to secure it.

SOAJS provides a multitude of state of the art security features. Click here to learn more about them.



Objective


This space will show you preliminary steps to secure your service:





Turn on Multi-Tenancy


Making your service multitenant is very easy, simply set extKeyRequired to true in the service's config.js file

config.js
'use strict'; module.exports = { "serviceVersion": 1, "serviceName": "servicesconfig", "serviceGroup": "SOAJS Services Config Example", "servicePort": 4130, "requestTimeout": 30, "requestTimeoutRenewal": 5, "extKeyRequired": true, "errors": {}, "schema": { "/get": { "_apiInfo": { "l": "get name", "group": "Example" } } } };





Create a product


From the dashboard, go to Manage pillar → Productization

List Products

Add New Product

See your Product

List Products

Add New Product

See your Product

Once there, you should see the default Dashboard Product with two packages in it.

Click on "Add New Product" and fill in the form.

You should now see an empty product right below the Dashboard Product.





Create a package




Add your Package

List Product Packages

Add your Package

List Product Packages

Add a new package in you product so you can configure its ACL.

Similarly to the above, click add new package and fill in the form.

Recap

So far, we've added a new product and added a new package inside it. Before continuing, we have to configure the ACL of the package.

The ACL is what will allow or deny access to the microservices and their APIs.