Showing posts with label IoTS. Show all posts
Showing posts with label IoTS. Show all posts

Tuesday, February 28, 2017

How to block the login for the Management Console of WSO2 IoT Server

Put the following config to <IoTS_HOME>/core/repository/conf/tomcat/carbon/WEB-INF/web.xml.


<security-constraint>
    <display-name>Restrict direct access to certain folders</display-name>
    <web-resource-collection>
        <web-resource-name>Restricted folders</web-resource-name>
        <url-pattern>/carbon/*</url-pattern>
    </web-resource-collection>
    <auth-constraint />
</security-constraint>

Then restart the server.


Wednesday, January 18, 2017

[WSO2 IoT] How to Self-unsubscribe from Mobile Apps.

In default WSO2 IoT server, you can't uninstall mobile apps from the apps store. But, you can self-unsubscribe from mobile apps by changing a config. For that, you have to set "EnableSelfUnsubscriptionas true in <IoT_HOME>/core/repository/conf/app-manager.xml


        <Config name="EnableSelfUnsubscription">true</Config>

Then, restart the server.

Login to store and click on "My Apps" tab. Click on the button (with 3 dots) in the bottom right corner of the app and click on "Uninstall".


That's all. :)

Wednesday, October 19, 2016

Start Multiple WSO2 IoTS Instances on the Same Computer

If you want to run multiple WSO2 IoTS on the same machine, you have to change the default ports with an offset value to avoid port conflicts. The default HTTP and HTTPS ports (without offset) of a WSO2 product are 9763 and 9443 respectively.

Here are the steps to offset ports. Let's assume you want to increase all ports by 1.

  1. Set Offset value to 1 in <IoTS_HOME>/repository/conf/carbon.xml
  2.    
        <Offset>1</Offset>  
       
    
  3. Change the hostURL under <authenticator class="org.wso2.carbon.andes.authentication.andes.OAuth2BasedMQTTAuthenticator"> in <IoTS_HOME>/repository/conf/broker.xml according to the port offset.
  4.    
        <authenticator class = "org.wso2.carbon.andes.authentication.andes.OAuth2BasedMQTTAuthenticator">  
         <property name = "hostURL">https://<IoTS_HOST>:<IoTS_PORT>/services/OAuth2TokenValidationService</property>  
          <property name = "username">admin</property>  
          <property name = "password">admin</property>  
          <property name = "maxConnectionsPerHost">10</property>  
          <property name = "maxTotalConnections">150</property>  
       </authenticator>  
       
       
    
  5. Start the Server.