0 Replies Latest reply: Oct 3, 2013 4:38 AM by e54b5335-787f-41a3-9b6e-edf109eaaefd RSS

    How implement security with jazn-data.xml file?

    e54b5335-787f-41a3-9b6e-edf109eaaefd

      Hi,

       

      I cannot implement the security user/role management in a web-app (Weblogic 10.3.6).

       

      web.xml (war file)

      ------------------------------------------------------------------------------

           <!-- Security JAAS -->

          <login-config>

              <auth-method>CLIENT-CERT</auth-method>

          </login-config>

          <security-constraint>

              <web-resource-collection>

                  <web-resource-name>myApp</web-resource-name>

                  <url-pattern>/pages/index.jsp</url-pattern>

              </web-resource-collection>

              <auth-constraint>

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

              </auth-constraint>

          </security-constraint>

      ------------------------------------------------------------------------------


      jazn-data.xml (ear file)

      ------------------------------------------------------------------------------

      <?xml version="1.0" encoding="UTF-8"?>

      <!DOCTYPE jazn-data PUBLIC "JAZN-XML Data" "http://xmlns.oracle.com/ias/dtds/jazn-data.dtd">

      <jazn-data>

       

      <!-- JAZN Realm Data -->

      <jazn-realm>

          <realm>

              <name>myrealm</name>

              <users>               

                  <user>

                      <name>admin</name>

                      <display-name>admin</display-name>

                      <credentials>!pwd</credentials>

                  </user>           

              </users>

              <roles>     

                  <role>

                      <name>admin</name>

                      <members>                   

                          <member>

                              <type>user</type>

                              <name>admin</name>

                          </member>

                      </members>

                  </role>          

              </roles>

          </realm>

      </jazn-realm>

       

      <!-- Permission Class Data -->

      <jazn-permission-classes>

      </jazn-permission-classes>

       

      <!-- Principal Class Data -->

      <jazn-principal-classes>

      </jazn-principal-classes>

       

      <!-- Login Module Data -->

      <jazn-loginconfig>

      </jazn-loginconfig>

       

      </jazn-data>

      ------------------------------------------------------------------------------

      I need to set user/role in Weblogic console? :-S


      Thanks for reply,

      Matteo.