Tenant identification via sub domain configuration support in API Portal 10.5

From API Portal 10.5 release, tenants can be identified based on the sub domain configuration enabled in ACC console. This helps customers to have there own url to identify there tenant instead of typical http://<hostname>:<port>/#<tenant_name>/home.

1. Install API Portal 10.5 kit and open ACC console.

2. Run the following commands to create a new tenant.

    create tenant demo master.tenant.user.pwd=manager master.tenant.user.name=system
    invoke enhancement_importLicense on apiportalbundle_s tenant.name=demo local file enhancement.path="C:/SAG_Portal105/API_Portal/license.xml" tenant.user.pwd=manager tenant.user.name=system
    invoke prepareTenant on apiportalbundle_s tenant.name=demo isDemo=false

3. Run the following command in order to create domain name to tenant mapping,

    register external service DOMAIN_RESOLVER <domain_address>=<tenant_name> host=localhost
    Example: register external service DOMAIN_RESOLVER developers.demo.com=demo host=localhost

4. Inorder to view the mapping details, first run "list services" to list all services available in the system.

5. Take the service ID of the DOMAIN_RESOLVER service type and run the following command to view the mapping details,

    show external service <serviceId>

6. In order to maintain the domain name rendering in the URL, turn off redirecting property in loadbalancer runnable by running the following commands,

    reconfigure loadbalancer_s +HTTPD.RewriteEngine=off

7. a) For cloud installations:  To validate the subdomain configuration, DNS mapping should be done.

7. b) For local installations:  To validate the sub domain configuration, open C:\Windows\System32\drivers\etc\hosts file and add the domain name entry in it. demo.developers.com

8. Open a new browser and hit the domain URL, http://demo.developers.com which will redirect to the API Portal instance of demo tenant, http://demo.developers.com/#demo/home