2022

Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Username and Password can be used to keep your DBSync Cloud Replication more secured. The below steps should be followed to setup username and password.

  • Go to Install Folder > conf > tomcat-users.xml
  • tomcat-users.xml should be edited by including the below code at the end just before </tomcat-users>

<role rolename="manager"/>
   <role rolename="tomcat"/>
   <role rolename="admin"/>
   <role rolename="role1"/>
   <role rolename="dbsync"/>
   <user username="manager" password="manager" roles="manager"/>
   <user username="both" password="tomcat" roles="tomcat,role1"/>
   <user username="tomcat" password="tomcat" roles="tomcat"/>
   <user username="role1" password="tomcat" roles="role1"/>
   <user username="adminuser" password="adminpassword" roles="admin"/>
   <user username="repl" password="avankia1" roles="dbsync"/>

  • In this code, you need to specify the username and password that you would like to setup for admin role.
  • In this example, username is adminuser and password is adminpassword for role admin.
  • Save these changes and close tomcat-users.xml
  • Go to Install Folder > dbsync-repl > WEB-INF > web.xml
  • web.xml should be edited by including the below code at the end just before </web-app>

<security-constraint>
   <web-resource-collection>
      <web-resource-name>admin</web-resource-name>
      <url-pattern>/*</url-pattern>
                  <http-method>GET</http-method>
                <http-method>POST</http-method>
    </web-resource-collection>
    <auth-constraint>
      <role-name>tomcat</role-name>
                  <role-name>admin</role-name>
    </auth-constraint>
</security-constraint>
<login-config>
       <auth-method>BASIC</auth-method>
</login-config>

<security-role>
     <role-name>admin</role-name>
</security-role>

  • Save these changes and close web.xml
  • Restart tomcat and try to access DBSync Cloud Replication User Interface.
  • You will see a prompt to enter username and password.
  • With these code, the username and password would be adminuser and adminpassword
  • You can change the username and password by editing tomcat-users.xml