Deploy no Glassfish[NENHUMA RESPOSTA]

Ai pessoal, como eu faço o deploy de uma web app no GlassFish, implementando Realms? tipo meu web.xml e sun-web.xml estão assim:

Web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
    <display-name>TesteRealm</display-name>
    <session-config>
        <session-timeout>
            30
        </session-timeout>
    </session-config>
    <welcome-file-list>
        <welcome-file>index.jsp</welcome-file>
        </welcome-file-list>
        
    <security-constraint>
        <display-name>Constraint1</display-name>
        <web-resource-collection>
            <web-resource-name>Protected</web-resource-name>
            <description>tipo protegido</description>
            <url-pattern>/*</url-pattern>
            <http-method>GET</http-method>
            <http-method>POST</http-method>
            <http-method>HEAD</http-method>
            <http-method>PUT</http-method>
            <http-method>OPTIONS</http-method>
            <http-method>TRACE</http-method>
            <http-method>DELETE</http-method>
        </web-resource-collection>
        </security-constraint>
    
    <login-config>
        <auth-method>BASIC</auth-method>
        <realm-name>TesteRealm</realm-name>
        </login-config>
    <security-role>
        <description>administrador</description>
        <role-name>Admin</role-name>
    </security-role>
    <security-role>
        <description>Gerente</description>
        <role-name>Gere</role-name>
    </security-role>
    </web-app>

Sun-web.xml

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE sun-web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Application Server 9.0 Servlet 2.5//EN" "http://www.sun.com/software/appserver/dtds/sun-web-app_2_5-0.dtd">
<sun-web-app error-url="">
  <context-root>/TesteRealm</context-root>
  <class-loader delegate="true"/>
  <jsp-config>
    <property name="keepgenerated" value="true">
      <description>Keep a copy of the generated servlet class' java code.</description>
    </property>
  </jsp-config>
</sun-web-app>

Localmente roda blz, mas não funfa no server, o realm jaas, como eu configuro? Se alguém tiver algum material eu agradeço.