1 Reply Latest reply on Jan 20, 2017 3:57 PM by Ramesh Reddy

    How to avoid authentication while accessing VDBs using URL

    rahul sharma Newbie

      Hi ,

       

      I have created a VDB and exposed it with URL. when i am going to hit that URL. It ask for UserId and Password. I know that basic authentication is on by default in jboss.

       

      Is there any way by which we can avoid authentication.

        • 1. Re: How to avoid authentication while accessing VDBs using URL
          Ramesh Reddy Newbie

          Yes, you can but for that you would need to edit the "modules/system/layers/dv/org/jboss/teiid/main/deployments/teiid-olingo-odata4.war" file, in the

           

          1) jboss-web.xml remove the line "<security-domain>java:/jaas/teiid-security</security-domain>"

          2) web.xml file remove all of below

           

              <security-role>

                  <description>security role</description>

                  <role-name>odata</role-name>

              </security-role>

              <security-constraint>

                  <display-name>require valid user</display-name>

                  <web-resource-collection>

                      <web-resource-name>Teiid Rest Application</web-resource-name>

                      <url-pattern>/*</url-pattern>

                      <http-method>OPTIONS</http-method>           

                  </web-resource-collection>

              </security-constraint>

              <security-constraint>

                  <display-name>require valid user</display-name>

                  <web-resource-collection>

                      <web-resource-name>Teiid Rest Application</web-resource-name>

                      <url-pattern>/*</url-pattern>

                  </web-resource-collection>

                  <auth-constraint>

                      <role-name>odata</role-name>

                  </auth-constraint>

              </security-constraint>

              <security-constraint>

                  <web-resource-collection>

                      <web-resource-name>Teiid Rest Application</web-resource-name>

                      <url-pattern>/static/*</url-pattern>

                  </web-resource-collection>

              </security-constraint>

              <login-config>

                  <auth-method>BASIC</auth-method>

                  <realm-name>yourdomain.com</realm-name>

              </login-config>

           

          after that save the new war file, restart the server. If that does not work undeploy "teiid-olingo-odata4.war" file then restart the server.