Commit d8a665f56fadbf81074851bb97192facaf707283
1 parent
15bf6469
Exists in
master
IN PROGRESS - issue FWK-119: Testes da extensão Servlet
https://demoiselle.atlassian.net/browse/FWK-119
Showing
10 changed files
with
520 additions
and
89 deletions
Show diff stats
impl/extension/jpa/src/test/resources/arquillian.xml
| ... | ... | @@ -43,6 +43,12 @@ |
| 43 | 43 | <property name="deploymentExportPath">target/deployments</property> |
| 44 | 44 | </engine> |
| 45 | 45 | |
| 46 | + <container qualifier="glassfish-embedded" default="true"> | |
| 47 | + <configuration> | |
| 48 | + <property name="resourcesXml">src/test/resources/glassfish-resources.xml</property> | |
| 49 | + </configuration> | |
| 50 | + </container> | |
| 51 | + | |
| 46 | 52 | <!-- |
| 47 | 53 | <container qualifier="jbossas-managed" default="true"> |
| 48 | 54 | <protocol type="Servlet 3.0" /> | ... | ... |
impl/extension/servlet/pom.xml
| ... | ... | @@ -84,12 +84,22 @@ |
| 84 | 84 | <scope>test</scope> |
| 85 | 85 | </dependency> |
| 86 | 86 | --> |
| 87 | + | |
| 88 | + <dependency> | |
| 89 | + <groupId>org.apache.httpcomponents</groupId> | |
| 90 | + <artifactId>httpclient</artifactId> | |
| 91 | + <version>4.2.6</version> | |
| 92 | + <scope>test</scope> | |
| 93 | + </dependency> | |
| 94 | + | |
| 95 | + <!-- | |
| 87 | 96 | <dependency> |
| 88 | 97 | <groupId>commons-httpclient</groupId> |
| 89 | 98 | <artifactId>commons-httpclient</artifactId> |
| 90 | 99 | <version>3.1</version> |
| 91 | 100 | <scope>test</scope> |
| 92 | 101 | </dependency> |
| 102 | + --> | |
| 93 | 103 | </dependencies> |
| 94 | 104 | |
| 95 | 105 | <repositories> | ... | ... |
impl/extension/servlet/src/test/java/producer/HttpServletRequestProducerTest.java
| 1 | 1 | package producer; |
| 2 | 2 | |
| 3 | -import static org.junit.Assert.assertEquals; | |
| 4 | -import static org.junit.Assert.assertTrue; | |
| 5 | -import static org.junit.Assert.fail; | |
| 3 | +import static junit.framework.Assert.assertEquals; | |
| 6 | 4 | |
| 5 | +import java.io.IOException; | |
| 7 | 6 | import java.net.URL; |
| 8 | 7 | |
| 9 | -import javax.inject.Inject; | |
| 10 | - | |
| 11 | -import org.apache.commons.httpclient.HttpClient; | |
| 12 | -import org.apache.commons.httpclient.HttpStatus; | |
| 13 | -import org.apache.commons.httpclient.methods.GetMethod; | |
| 8 | +import org.apache.http.HttpResponse; | |
| 9 | +import org.apache.http.HttpStatus; | |
| 10 | +import org.apache.http.client.ClientProtocolException; | |
| 11 | +import org.apache.http.client.methods.HttpGet; | |
| 12 | +import org.apache.http.impl.client.DefaultHttpClient; | |
| 14 | 13 | import org.jboss.arquillian.container.test.api.Deployment; |
| 15 | 14 | import org.jboss.arquillian.junit.Arquillian; |
| 16 | 15 | import org.jboss.arquillian.test.api.ArquillianResource; |
| ... | ... | @@ -19,7 +18,6 @@ import org.junit.Test; |
| 19 | 18 | import org.junit.runner.RunWith; |
| 20 | 19 | |
| 21 | 20 | import test.Tests; |
| 22 | -import br.gov.frameworkdemoiselle.context.RequestContext; | |
| 23 | 21 | |
| 24 | 22 | @RunWith(Arquillian.class) |
| 25 | 23 | public class HttpServletRequestProducerTest { |
| ... | ... | @@ -36,15 +34,13 @@ public class HttpServletRequestProducerTest { |
| 36 | 34 | } |
| 37 | 35 | |
| 38 | 36 | @Test |
| 39 | - public void createR() { | |
| 40 | - HttpClient client = new HttpClient(); | |
| 41 | - GetMethod method = new GetMethod(deploymentUrl + "/requestproducer"); | |
| 42 | - try { | |
| 43 | - int status = client.executeMethod(method); | |
| 44 | - assertEquals(HttpStatus.SC_OK, status); | |
| 45 | - } catch (Exception e) { | |
| 46 | - fail(); | |
| 47 | - } | |
| 48 | - } | |
| 37 | + public void createR() throws ClientProtocolException, IOException { | |
| 38 | + DefaultHttpClient client = new DefaultHttpClient(); | |
| 49 | 39 | |
| 40 | + HttpGet get = new HttpGet(deploymentUrl + "/requestproducer"); | |
| 41 | + HttpResponse response = client.execute(get); | |
| 42 | + | |
| 43 | + int status = response.getStatusLine().getStatusCode(); | |
| 44 | + assertEquals(HttpStatus.SC_OK, status); | |
| 45 | + } | |
| 50 | 46 | } | ... | ... |
impl/extension/servlet/src/test/java/producer/HttpServletResponseProducerTest.java
| 1 | 1 | package producer; |
| 2 | 2 | |
| 3 | -import static org.junit.Assert.assertEquals; | |
| 4 | -import static org.junit.Assert.assertTrue; | |
| 5 | -import static org.junit.Assert.fail; | |
| 3 | +import static junit.framework.Assert.assertEquals; | |
| 6 | 4 | |
| 5 | +import java.io.IOException; | |
| 7 | 6 | import java.net.URL; |
| 8 | 7 | |
| 9 | -import javax.inject.Inject; | |
| 10 | - | |
| 11 | -import org.apache.commons.httpclient.HttpClient; | |
| 12 | -import org.apache.commons.httpclient.HttpStatus; | |
| 13 | -import org.apache.commons.httpclient.methods.GetMethod; | |
| 8 | +import org.apache.http.HttpResponse; | |
| 9 | +import org.apache.http.HttpStatus; | |
| 10 | +import org.apache.http.client.ClientProtocolException; | |
| 11 | +import org.apache.http.client.methods.HttpGet; | |
| 12 | +import org.apache.http.impl.client.DefaultHttpClient; | |
| 14 | 13 | import org.jboss.arquillian.container.test.api.Deployment; |
| 15 | 14 | import org.jboss.arquillian.junit.Arquillian; |
| 16 | 15 | import org.jboss.arquillian.test.api.ArquillianResource; |
| ... | ... | @@ -19,7 +18,6 @@ import org.junit.Test; |
| 19 | 18 | import org.junit.runner.RunWith; |
| 20 | 19 | |
| 21 | 20 | import test.Tests; |
| 22 | -import br.gov.frameworkdemoiselle.context.RequestContext; | |
| 23 | 21 | |
| 24 | 22 | @RunWith(Arquillian.class) |
| 25 | 23 | public class HttpServletResponseProducerTest { |
| ... | ... | @@ -36,15 +34,14 @@ public class HttpServletResponseProducerTest { |
| 36 | 34 | } |
| 37 | 35 | |
| 38 | 36 | @Test |
| 39 | - public void createResponse() { | |
| 40 | - HttpClient client = new HttpClient(); | |
| 41 | - GetMethod method = new GetMethod(deploymentUrl + "/responseproducer"); | |
| 42 | - try { | |
| 43 | - int status = client.executeMethod(method); | |
| 44 | - assertEquals(HttpStatus.SC_OK, status); | |
| 45 | - } catch (Exception e) { | |
| 46 | - fail(); | |
| 47 | - } | |
| 37 | + public void createResponse() throws ClientProtocolException, IOException { | |
| 38 | + DefaultHttpClient client = new DefaultHttpClient(); | |
| 39 | + | |
| 40 | + HttpGet get = new HttpGet(deploymentUrl + "/responseproducer"); | |
| 41 | + HttpResponse response = client.execute(get); | |
| 42 | + | |
| 43 | + int status = response.getStatusLine().getStatusCode(); | |
| 44 | + assertEquals(HttpStatus.SC_OK, status); | |
| 48 | 45 | } |
| 49 | 46 | |
| 50 | 47 | } | ... | ... |
impl/extension/servlet/src/test/java/security/SecurityServlet.java
| ... | ... | @@ -2,7 +2,6 @@ package security; |
| 2 | 2 | |
| 3 | 3 | import java.io.IOException; |
| 4 | 4 | |
| 5 | -import javax.inject.Inject; | |
| 6 | 5 | import javax.servlet.ServletException; |
| 7 | 6 | import javax.servlet.annotation.WebServlet; |
| 8 | 7 | import javax.servlet.http.HttpServlet; |
| ... | ... | @@ -13,25 +12,24 @@ import org.apache.http.HttpStatus; |
| 13 | 12 | |
| 14 | 13 | import br.gov.frameworkdemoiselle.security.Credentials; |
| 15 | 14 | import br.gov.frameworkdemoiselle.security.SecurityContext; |
| 15 | +import br.gov.frameworkdemoiselle.util.Beans; | |
| 16 | 16 | |
| 17 | 17 | @WebServlet("/login") |
| 18 | 18 | public class SecurityServlet extends HttpServlet { |
| 19 | 19 | |
| 20 | 20 | private static final long serialVersionUID = 1L; |
| 21 | 21 | |
| 22 | - @Inject | |
| 23 | - private SecurityContext securityContext; | |
| 24 | - | |
| 25 | - @Inject | |
| 26 | - private Credentials credentials; | |
| 27 | - | |
| 28 | 22 | @Override |
| 29 | 23 | protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { |
| 30 | - super.doGet(request, response); | |
| 31 | - | |
| 32 | - credentials.setUsername("users"); | |
| 33 | - credentials.setPassword("users"); | |
| 34 | - securityContext.login(); | |
| 24 | + String result = request.getHeader("Authorization"); | |
| 25 | + result = (result == null ? request.getHeader("authorization") : result); | |
| 26 | + | |
| 27 | + Credentials credentials = Beans.getReference(Credentials.class); | |
| 28 | + credentials.setUsername("asdrubal"); | |
| 29 | + credentials.setPassword("asdrubal"); | |
| 30 | + | |
| 31 | + Beans.getReference(SecurityContext.class).login(); | |
| 32 | + | |
| 35 | 33 | response.setStatus(HttpStatus.SC_OK); |
| 36 | 34 | } |
| 37 | 35 | } | ... | ... |
impl/extension/servlet/src/test/java/security/SecurityTest.java
| 1 | 1 | package security; |
| 2 | 2 | |
| 3 | 3 | import static org.junit.Assert.assertEquals; |
| 4 | -import static org.junit.Assert.fail; | |
| 5 | 4 | |
| 6 | 5 | import java.io.IOException; |
| 7 | 6 | import java.net.URL; |
| 8 | 7 | |
| 9 | -import org.apache.commons.httpclient.HttpClient; | |
| 10 | -import org.apache.commons.httpclient.HttpException; | |
| 11 | -import org.apache.commons.httpclient.HttpStatus; | |
| 12 | -import org.apache.commons.httpclient.methods.GetMethod; | |
| 8 | +import org.apache.http.HttpResponse; | |
| 9 | +import org.apache.http.HttpStatus; | |
| 10 | +import org.apache.http.client.ClientProtocolException; | |
| 11 | +import org.apache.http.client.methods.HttpGet; | |
| 12 | +import org.apache.http.impl.client.DefaultHttpClient; | |
| 13 | 13 | import org.jboss.arquillian.container.test.api.Deployment; |
| 14 | 14 | import org.jboss.arquillian.junit.Arquillian; |
| 15 | 15 | import org.jboss.arquillian.test.api.ArquillianResource; |
| ... | ... | @@ -19,6 +19,8 @@ import org.junit.runner.RunWith; |
| 19 | 19 | |
| 20 | 20 | import test.Tests; |
| 21 | 21 | |
| 22 | +import com.sun.enterprise.security.auth.login.FileLoginModule; | |
| 23 | + | |
| 22 | 24 | @RunWith(Arquillian.class) |
| 23 | 25 | public class SecurityTest { |
| 24 | 26 | |
| ... | ... | @@ -29,22 +31,17 @@ public class SecurityTest { |
| 29 | 31 | |
| 30 | 32 | @Deployment(testable = false) |
| 31 | 33 | public static WebArchive createDeployment() { |
| 32 | - return Tests.createDeployment().addClass(SecurityServlet.class) | |
| 34 | + return Tests.createDeployment().addClasses(SecurityServlet.class, FileLoginModule.class) | |
| 33 | 35 | .addAsWebInfResource(Tests.createFileAsset(PATH + "/web.xml"), "web.xml"); |
| 34 | 36 | } |
| 35 | 37 | |
| 36 | 38 | @Test |
| 37 | - public void login() { | |
| 38 | - HttpClient client = new HttpClient(); | |
| 39 | - GetMethod method = new GetMethod(deploymentUrl + "/login"); | |
| 40 | - try { | |
| 41 | - int status = client.executeMethod(method); | |
| 42 | - assertEquals(HttpStatus.SC_OK, status); | |
| 43 | - } catch (HttpException e) { | |
| 44 | - fail(); | |
| 45 | - } catch (IOException e) { | |
| 46 | - e.printStackTrace(); | |
| 47 | - } | |
| 48 | - } | |
| 39 | + public void login() throws ClientProtocolException, IOException { | |
| 40 | + DefaultHttpClient client = new DefaultHttpClient(); | |
| 41 | + HttpGet get = new HttpGet(deploymentUrl + "/login"); | |
| 42 | + HttpResponse response = client.execute(get); | |
| 49 | 43 | |
| 44 | + int status = response.getStatusLine().getStatusCode(); | |
| 45 | + assertEquals(HttpStatus.SC_OK, status); | |
| 46 | + } | |
| 50 | 47 | } | ... | ... |
impl/extension/servlet/src/test/resources/arquillian.xml
| ... | ... | @@ -49,13 +49,11 @@ |
| 49 | 49 | </extension> |
| 50 | 50 | --> |
| 51 | 51 | |
| 52 | - <!-- | |
| 53 | - <container qualifier="glassfish" default="true"> | |
| 52 | + <container qualifier="glassfish-embedded" default="true"> | |
| 54 | 53 | <configuration> |
| 55 | - <property name="autoDelete">true</property> | |
| 54 | + <property name="configurationXml">src/test/resources/domain.xml</property> | |
| 56 | 55 | </configuration> |
| 57 | 56 | </container> |
| 58 | - --> | |
| 59 | 57 | |
| 60 | 58 | <!-- |
| 61 | 59 | <container qualifier="jbossas-managed" default="true"> | ... | ... |
| ... | ... | @@ -0,0 +1,429 @@ |
| 1 | +<domain log-root="${com.sun.aas.instanceRoot}/logs" application-root="${com.sun.aas.instanceRoot}/applications" version="23"> | |
| 2 | + <system-applications> | |
| 3 | + <application context-root="" location="${com.sun.aas.installRootURI}/lib/install/applications/__admingui" name="__admingui" directory-deployed="true" object-type="system-admin"> | |
| 4 | + <module name="__admingui"> | |
| 5 | + <engine sniffer="web"></engine> | |
| 6 | + <engine sniffer="security"></engine> | |
| 7 | + </module> | |
| 8 | + </application> | |
| 9 | + </system-applications> | |
| 10 | + <applications> | |
| 11 | + <application context-root="/AuthenticationPrj01" location="${com.sun.aas.instanceRootURI}/eclipseApps/AuthenticationPrj01/" name="AuthenticationPrj01" directory-deployed="true" object-type="user"> | |
| 12 | + <property name="appLocation" value="${com.sun.aas.instanceRootURI}/eclipseApps/AuthenticationPrj01/"></property> | |
| 13 | + <property name="defaultAppName" value="AuthenticationPrj01"></property> | |
| 14 | + <module name="AuthenticationPrj01"> | |
| 15 | + <engine sniffer="security"></engine> | |
| 16 | + <engine sniffer="web"></engine> | |
| 17 | + </module> | |
| 18 | + </application> | |
| 19 | + </applications> | |
| 20 | + <resources> | |
| 21 | + <jdbc-connection-pool datasource-classname="org.apache.derby.jdbc.ClientXADataSource" res-type="javax.sql.XADataSource" name="luciano" transaction-isolation-level="serializable"> | |
| 22 | + <property name="User" value="APP"></property> | |
| 23 | + <property name="Password" value="APP"></property> | |
| 24 | + <property name="ServerName" value="localhost"></property> | |
| 25 | + <property name="PortNumber" value="1527"></property> | |
| 26 | + <property name="DatabaseName" value="luciano"></property> | |
| 27 | + </jdbc-connection-pool> | |
| 28 | + <jdbc-resource pool-name="luciano" jndi-name="jdbc/luciano"></jdbc-resource> | |
| 29 | + <jdbc-connection-pool driver-classname="" datasource-classname="org.postgresql.xa.PGXADataSource" res-type="javax.sql.XADataSource" description="" name="postgresql"> | |
| 30 | + <property name="portNumber" value="5432"></property> | |
| 31 | + <property name="databaseName" value="bd1"></property> | |
| 32 | + <property name="serverName" value="localhost"></property> | |
| 33 | + <property name="user" value="postgres"></property> | |
| 34 | + <property name="password" value="postgres"></property> | |
| 35 | + </jdbc-connection-pool> | |
| 36 | + <jdbc-resource pool-name="postgresql" description="" jndi-name="jdbc/postgresql"></jdbc-resource> | |
| 37 | + </resources> | |
| 38 | + <servers> | |
| 39 | + <server name="server" config-ref="server-config"> | |
| 40 | + <resource-ref ref="jdbc/luciano"></resource-ref> | |
| 41 | + <resource-ref ref="jdbc/postgresql"></resource-ref> | |
| 42 | + <application-ref ref="__admingui" virtual-servers="__asadmin"></application-ref> | |
| 43 | + <application-ref ref="AuthenticationPrj01" virtual-servers="server"></application-ref> | |
| 44 | + </server> | |
| 45 | + </servers> | |
| 46 | + <nodes> | |
| 47 | + <node node-host="localhost" name="localhost-domain1" type="CONFIG" install-dir="${com.sun.aas.productRoot}"></node> | |
| 48 | + </nodes> | |
| 49 | + <configs> | |
| 50 | + <config name="server-config"> | |
| 51 | + <http-service> | |
| 52 | + <access-log></access-log> | |
| 53 | + <virtual-server id="server" network-listeners="http-listener-1,http-listener-2"></virtual-server> | |
| 54 | + <virtual-server id="__asadmin" network-listeners="admin-listener"></virtual-server> | |
| 55 | + </http-service> | |
| 56 | + <iiop-service> | |
| 57 | + <orb use-thread-pool-ids="thread-pool-1"></orb> | |
| 58 | + <iiop-listener port="3700" id="orb-listener-1" address="0.0.0.0" lazy-init="true"></iiop-listener> | |
| 59 | + <iiop-listener port="3820" id="SSL" address="0.0.0.0" security-enabled="true"> | |
| 60 | + <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as"></ssl> | |
| 61 | + </iiop-listener> | |
| 62 | + <iiop-listener port="3920" id="SSL_MUTUALAUTH" address="0.0.0.0" security-enabled="true"> | |
| 63 | + <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as" client-auth-enabled="true"></ssl> | |
| 64 | + </iiop-listener> | |
| 65 | + </iiop-service> | |
| 66 | + <admin-service system-jmx-connector-name="system" type="das-and-server"> | |
| 67 | + <jmx-connector port="8686" address="0.0.0.0" security-enabled="false" auth-realm-name="admin-realm" name="system"></jmx-connector> | |
| 68 | + <property name="adminConsoleContextRoot" value="/admin"></property> | |
| 69 | + <property name="adminConsoleDownloadLocation" value="${com.sun.aas.installRoot}/lib/install/applications/admingui.war"></property> | |
| 70 | + <property name="ipsRoot" value="${com.sun.aas.installRoot}/.."></property> | |
| 71 | + <das-config></das-config> | |
| 72 | + </admin-service> | |
| 73 | + <connector-service></connector-service> | |
| 74 | + <web-container> | |
| 75 | + <session-config> | |
| 76 | + <session-manager> | |
| 77 | + <manager-properties></manager-properties> | |
| 78 | + <store-properties></store-properties> | |
| 79 | + </session-manager> | |
| 80 | + <session-properties></session-properties> | |
| 81 | + </session-config> | |
| 82 | + </web-container> | |
| 83 | + <ejb-container session-store="${com.sun.aas.instanceRoot}/session-store"> | |
| 84 | + <ejb-timer-service></ejb-timer-service> | |
| 85 | + </ejb-container> | |
| 86 | + <mdb-container></mdb-container> | |
| 87 | + <jms-service default-jms-host="default_JMS_host"> | |
| 88 | + <jms-host host="localhost" name="default_JMS_host"></jms-host> | |
| 89 | + </jms-service> | |
| 90 | + <security-service> | |
| 91 | + <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="admin-realm"> | |
| 92 | + <property name="file" value="${com.sun.aas.instanceRoot}/config/admin-keyfile"></property> | |
| 93 | + <property name="jaas-context" value="fileRealm"></property> | |
| 94 | + </auth-realm> | |
| 95 | + <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="file"> | |
| 96 | + <property name="file" value="src/test/resources/keyfile"></property> | |
| 97 | + <property name="jaas-context" value="fileRealm"></property> | |
| 98 | + </auth-realm> | |
| 99 | + <auth-realm classname="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm" name="certificate"></auth-realm> | |
| 100 | + <jacc-provider policy-provider="com.sun.enterprise.security.provider.PolicyWrapper" name="default" policy-configuration-factory-provider="com.sun.enterprise.security.provider.PolicyConfigurationFactoryImpl"> | |
| 101 | + <property name="repository" value="${com.sun.aas.instanceRoot}/generated/policy"></property> | |
| 102 | + </jacc-provider> | |
| 103 | + <jacc-provider policy-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyProvider" name="simple" policy-configuration-factory-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyConfigurationFactory"></jacc-provider> | |
| 104 | + <audit-module classname="com.sun.enterprise.security.Audit" name="default"> | |
| 105 | + <property name="auditOn" value="false"></property> | |
| 106 | + </audit-module> | |
| 107 | + <message-security-config auth-layer="SOAP"> | |
| 108 | + <provider-config provider-type="client" provider-id="XWS_ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule"> | |
| 109 | + <request-policy auth-source="content"></request-policy> | |
| 110 | + <response-policy auth-source="content"></response-policy> | |
| 111 | + <property name="encryption.key.alias" value="s1as"></property> | |
| 112 | + <property name="signature.key.alias" value="s1as"></property> | |
| 113 | + <property name="dynamic.username.password" value="false"></property> | |
| 114 | + <property name="debug" value="false"></property> | |
| 115 | + </provider-config> | |
| 116 | + <provider-config provider-type="client" provider-id="ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule"> | |
| 117 | + <request-policy auth-source="content"></request-policy> | |
| 118 | + <response-policy auth-source="content"></response-policy> | |
| 119 | + <property name="encryption.key.alias" value="s1as"></property> | |
| 120 | + <property name="signature.key.alias" value="s1as"></property> | |
| 121 | + <property name="dynamic.username.password" value="false"></property> | |
| 122 | + <property name="debug" value="false"></property> | |
| 123 | + <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"></property> | |
| 124 | + </provider-config> | |
| 125 | + <provider-config provider-type="server" provider-id="XWS_ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule"> | |
| 126 | + <request-policy auth-source="content"></request-policy> | |
| 127 | + <response-policy auth-source="content"></response-policy> | |
| 128 | + <property name="encryption.key.alias" value="s1as"></property> | |
| 129 | + <property name="signature.key.alias" value="s1as"></property> | |
| 130 | + <property name="debug" value="false"></property> | |
| 131 | + </provider-config> | |
| 132 | + <provider-config provider-type="server" provider-id="ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule"> | |
| 133 | + <request-policy auth-source="content"></request-policy> | |
| 134 | + <response-policy auth-source="content"></response-policy> | |
| 135 | + <property name="encryption.key.alias" value="s1as"></property> | |
| 136 | + <property name="signature.key.alias" value="s1as"></property> | |
| 137 | + <property name="debug" value="false"></property> | |
| 138 | + <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"></property> | |
| 139 | + </provider-config> | |
| 140 | + </message-security-config> | |
| 141 | + <message-security-config auth-layer="HttpServlet"> | |
| 142 | + <provider-config provider-type="server" provider-id="GFConsoleAuthModule" class-name="org.glassfish.admingui.common.security.AdminConsoleAuthModule"> | |
| 143 | + <request-policy auth-source="sender"></request-policy> | |
| 144 | + <response-policy></response-policy> | |
| 145 | + <property name="restAuthURL" value="http://localhost:${ADMIN_LISTENER_PORT}/management/sessions"></property> | |
| 146 | + <property name="loginPage" value="/login.jsf"></property> | |
| 147 | + <property name="loginErrorPage" value="/loginError.jsf"></property> | |
| 148 | + </provider-config> | |
| 149 | + </message-security-config> | |
| 150 | + <property name="default-digest-algorithm" value="SHA-256"></property> | |
| 151 | + </security-service> | |
| 152 | + <transaction-service tx-log-dir="${com.sun.aas.instanceRoot}/logs"></transaction-service> | |
| 153 | + <java-config debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=9009" system-classpath="" classpath-suffix=""> | |
| 154 | + <jvm-options>-XX:MaxPermSize=192m</jvm-options> | |
| 155 | + <jvm-options>-XX:PermSize=64m</jvm-options> | |
| 156 | + <jvm-options>-client</jvm-options> | |
| 157 | + <jvm-options>-Djava.awt.headless=true</jvm-options> | |
| 158 | + <jvm-options>-Djavax.management.builder.initial=com.sun.enterprise.v3.admin.AppServerMBeanServerBuilder</jvm-options> | |
| 159 | + <jvm-options>-XX:+UnlockDiagnosticVMOptions</jvm-options> | |
| 160 | + <jvm-options>-Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot}/lib/endorsed</jvm-options> | |
| 161 | + <jvm-options>-Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy</jvm-options> | |
| 162 | + <jvm-options>-Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf</jvm-options> | |
| 163 | + <jvm-options>-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as</jvm-options> | |
| 164 | + <jvm-options>-Xmx512m</jvm-options> | |
| 165 | + <jvm-options>-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks</jvm-options> | |
| 166 | + <jvm-options>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks</jvm-options> | |
| 167 | + <jvm-options>-Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext</jvm-options> | |
| 168 | + <jvm-options>-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver</jvm-options> | |
| 169 | + <jvm-options>-DANTLR_USE_DIRECT_CLASS_LOADING=true</jvm-options> | |
| 170 | + <jvm-options>-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory</jvm-options> | |
| 171 | + <jvm-options>-Dosgi.shell.telnet.port=6666</jvm-options> | |
| 172 | + <jvm-options>-Dosgi.shell.telnet.maxconn=1</jvm-options> | |
| 173 | + <jvm-options>-Dosgi.shell.telnet.ip=127.0.0.1</jvm-options> | |
| 174 | + <jvm-options>-Dgosh.args=--nointeractive</jvm-options> | |
| 175 | + <jvm-options>-Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/</jvm-options> | |
| 176 | + <jvm-options>-Dfelix.fileinstall.poll=5000</jvm-options> | |
| 177 | + <jvm-options>-Dfelix.fileinstall.log.level=2</jvm-options> | |
| 178 | + <jvm-options>-Dfelix.fileinstall.bundles.new.start=true</jvm-options> | |
| 179 | + <jvm-options>-Dfelix.fileinstall.bundles.startTransient=true</jvm-options> | |
| 180 | + <jvm-options>-Dfelix.fileinstall.disableConfigSave=false</jvm-options> | |
| 181 | + <jvm-options>-XX:NewRatio=2</jvm-options> | |
| 182 | + </java-config> | |
| 183 | + <network-config> | |
| 184 | + <protocols> | |
| 185 | + <protocol name="http-listener-1"> | |
| 186 | + <http default-virtual-server="server" max-connections="250"> | |
| 187 | + <file-cache></file-cache> | |
| 188 | + </http> | |
| 189 | + </protocol> | |
| 190 | + <protocol security-enabled="true" name="http-listener-2"> | |
| 191 | + <http default-virtual-server="server" max-connections="250"> | |
| 192 | + <file-cache></file-cache> | |
| 193 | + </http> | |
| 194 | + <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as"></ssl> | |
| 195 | + </protocol> | |
| 196 | + <protocol name="admin-listener"> | |
| 197 | + <http default-virtual-server="__asadmin" max-connections="250" encoded-slash-enabled="true"> | |
| 198 | + <file-cache></file-cache> | |
| 199 | + </http> | |
| 200 | + </protocol> | |
| 201 | + </protocols> | |
| 202 | + <network-listeners> | |
| 203 | + <network-listener port="8080" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener> | |
| 204 | + <network-listener port="8181" protocol="http-listener-2" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool"></network-listener> | |
| 205 | + <network-listener port="4848" protocol="admin-listener" transport="tcp" name="admin-listener" thread-pool="admin-thread-pool"></network-listener> | |
| 206 | + </network-listeners> | |
| 207 | + <transports> | |
| 208 | + <transport name="tcp"></transport> | |
| 209 | + </transports> | |
| 210 | + </network-config> | |
| 211 | + <thread-pools> | |
| 212 | + <thread-pool name="admin-thread-pool" max-thread-pool-size="50" max-queue-size="256"></thread-pool> | |
| 213 | + <thread-pool name="http-thread-pool"></thread-pool> | |
| 214 | + <thread-pool name="thread-pool-1" max-thread-pool-size="200"></thread-pool> | |
| 215 | + </thread-pools> | |
| 216 | + <monitoring-service> | |
| 217 | + <module-monitoring-levels></module-monitoring-levels> | |
| 218 | + </monitoring-service> | |
| 219 | + <group-management-service> | |
| 220 | + <failure-detection></failure-detection> | |
| 221 | + </group-management-service> | |
| 222 | + </config> | |
| 223 | + <config name="default-config"> | |
| 224 | + <http-service> | |
| 225 | + <access-log></access-log> | |
| 226 | + <virtual-server id="server" network-listeners="http-listener-1, http-listener-2"> | |
| 227 | + <property name="default-web-xml" value="${com.sun.aas.instanceRoot}/config/default-web.xml"></property> | |
| 228 | + </virtual-server> | |
| 229 | + <virtual-server id="__asadmin" network-listeners="admin-listener"></virtual-server> | |
| 230 | + </http-service> | |
| 231 | + <iiop-service> | |
| 232 | + <orb use-thread-pool-ids="thread-pool-1"></orb> | |
| 233 | + <iiop-listener port="${IIOP_LISTENER_PORT}" id="orb-listener-1" address="0.0.0.0"></iiop-listener> | |
| 234 | + <iiop-listener port="${IIOP_SSL_LISTENER_PORT}" id="SSL" address="0.0.0.0" security-enabled="true"> | |
| 235 | + <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as"></ssl> | |
| 236 | + </iiop-listener> | |
| 237 | + <iiop-listener port="${IIOP_SSL_MUTUALAUTH_PORT}" id="SSL_MUTUALAUTH" address="0.0.0.0" security-enabled="true"> | |
| 238 | + <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as" client-auth-enabled="true"></ssl> | |
| 239 | + </iiop-listener> | |
| 240 | + </iiop-service> | |
| 241 | + <admin-service system-jmx-connector-name="system"> | |
| 242 | + <jmx-connector port="${JMX_SYSTEM_CONNECTOR_PORT}" address="0.0.0.0" security-enabled="false" auth-realm-name="admin-realm" name="system"></jmx-connector> | |
| 243 | + <property name="adminConsoleDownloadLocation" value="${com.sun.aas.installRoot}/lib/install/applications/admingui.war"></property> | |
| 244 | + <das-config></das-config> | |
| 245 | + </admin-service> | |
| 246 | + <web-container> | |
| 247 | + <session-config> | |
| 248 | + <session-manager> | |
| 249 | + <manager-properties></manager-properties> | |
| 250 | + <store-properties></store-properties> | |
| 251 | + </session-manager> | |
| 252 | + <session-properties></session-properties> | |
| 253 | + </session-config> | |
| 254 | + </web-container> | |
| 255 | + <ejb-container session-store="${com.sun.aas.instanceRoot}/session-store"> | |
| 256 | + <ejb-timer-service></ejb-timer-service> | |
| 257 | + </ejb-container> | |
| 258 | + <mdb-container></mdb-container> | |
| 259 | + <jms-service addresslist-behavior="priority" default-jms-host="default_JMS_host"> | |
| 260 | + <jms-host port="${JMS_PROVIDER_PORT}" host="localhost" name="default_JMS_host"></jms-host> | |
| 261 | + </jms-service> | |
| 262 | + <log-service log-rotation-limit-in-bytes="2000000" file="${com.sun.aas.instanceRoot}/logs/server.log"> | |
| 263 | + <module-log-levels></module-log-levels> | |
| 264 | + </log-service> | |
| 265 | + <security-service> | |
| 266 | + <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="admin-realm"> | |
| 267 | + <property name="file" value="${com.sun.aas.instanceRoot}/config/admin-keyfile"></property> | |
| 268 | + <property name="jaas-context" value="fileRealm"></property> | |
| 269 | + </auth-realm> | |
| 270 | + <auth-realm classname="com.sun.enterprise.security.auth.realm.file.FileRealm" name="file"> | |
| 271 | + <property name="file" value="src/test/resources/keyfile"></property> | |
| 272 | + <property name="jaas-context" value="fileRealm"></property> | |
| 273 | + </auth-realm> | |
| 274 | + <auth-realm classname="com.sun.enterprise.security.auth.realm.certificate.CertificateRealm" name="certificate"></auth-realm> | |
| 275 | + <jacc-provider policy-provider="com.sun.enterprise.security.provider.PolicyWrapper" name="default" policy-configuration-factory-provider="com.sun.enterprise.security.provider.PolicyConfigurationFactoryImpl"> | |
| 276 | + <property name="repository" value="${com.sun.aas.instanceRoot}/generated/policy"></property> | |
| 277 | + </jacc-provider> | |
| 278 | + <jacc-provider policy-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyProvider" name="simple" policy-configuration-factory-provider="com.sun.enterprise.security.jacc.provider.SimplePolicyConfigurationFactory"></jacc-provider> | |
| 279 | + <audit-module classname="com.sun.enterprise.security.Audit" name="default"> | |
| 280 | + <property name="auditOn" value="false"></property> | |
| 281 | + </audit-module> | |
| 282 | + <message-security-config auth-layer="SOAP"> | |
| 283 | + <provider-config provider-type="client" provider-id="XWS_ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule"> | |
| 284 | + <request-policy auth-source="content"></request-policy> | |
| 285 | + <response-policy auth-source="content"></response-policy> | |
| 286 | + <property name="encryption.key.alias" value="s1as"></property> | |
| 287 | + <property name="signature.key.alias" value="s1as"></property> | |
| 288 | + <property name="dynamic.username.password" value="false"></property> | |
| 289 | + <property name="debug" value="false"></property> | |
| 290 | + </provider-config> | |
| 291 | + <provider-config provider-type="client" provider-id="ClientProvider" class-name="com.sun.xml.wss.provider.ClientSecurityAuthModule"> | |
| 292 | + <request-policy auth-source="content"></request-policy> | |
| 293 | + <response-policy auth-source="content"></response-policy> | |
| 294 | + <property name="encryption.key.alias" value="s1as"></property> | |
| 295 | + <property name="signature.key.alias" value="s1as"></property> | |
| 296 | + <property name="dynamic.username.password" value="false"></property> | |
| 297 | + <property name="debug" value="false"></property> | |
| 298 | + <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"></property> | |
| 299 | + </provider-config> | |
| 300 | + <provider-config provider-type="server" provider-id="XWS_ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule"> | |
| 301 | + <request-policy auth-source="content"></request-policy> | |
| 302 | + <response-policy auth-source="content"></response-policy> | |
| 303 | + <property name="encryption.key.alias" value="s1as"></property> | |
| 304 | + <property name="signature.key.alias" value="s1as"></property> | |
| 305 | + <property name="debug" value="false"></property> | |
| 306 | + </provider-config> | |
| 307 | + <provider-config provider-type="server" provider-id="ServerProvider" class-name="com.sun.xml.wss.provider.ServerSecurityAuthModule"> | |
| 308 | + <request-policy auth-source="content"></request-policy> | |
| 309 | + <response-policy auth-source="content"></response-policy> | |
| 310 | + <property name="encryption.key.alias" value="s1as"></property> | |
| 311 | + <property name="signature.key.alias" value="s1as"></property> | |
| 312 | + <property name="debug" value="false"></property> | |
| 313 | + <property name="security.config" value="${com.sun.aas.instanceRoot}/config/wss-server-config-1.0.xml"></property> | |
| 314 | + </provider-config> | |
| 315 | + </message-security-config> | |
| 316 | + </security-service> | |
| 317 | + <transaction-service tx-log-dir="${com.sun.aas.instanceRoot}/logs" automatic-recovery="true"></transaction-service> | |
| 318 | + <diagnostic-service></diagnostic-service> | |
| 319 | + <java-config debug-options="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=${JAVA_DEBUGGER_PORT}" system-classpath="" classpath-suffix=""> | |
| 320 | + <jvm-options>-XX:MaxPermSize=192m</jvm-options> | |
| 321 | + <jvm-options>-XX:PermSize=64m</jvm-options> | |
| 322 | + <jvm-options>-server</jvm-options> | |
| 323 | + <jvm-options>-Djava.awt.headless=true</jvm-options> | |
| 324 | + <jvm-options>-XX:+UnlockDiagnosticVMOptions</jvm-options> | |
| 325 | + <jvm-options>-Djava.endorsed.dirs=${com.sun.aas.installRoot}/modules/endorsed${path.separator}${com.sun.aas.installRoot}/lib/endorsed</jvm-options> | |
| 326 | + <jvm-options>-Djava.security.policy=${com.sun.aas.instanceRoot}/config/server.policy</jvm-options> | |
| 327 | + <jvm-options>-Djava.security.auth.login.config=${com.sun.aas.instanceRoot}/config/login.conf</jvm-options> | |
| 328 | + <jvm-options>-Dcom.sun.enterprise.security.httpsOutboundKeyAlias=s1as</jvm-options> | |
| 329 | + <jvm-options>-Djavax.net.ssl.keyStore=${com.sun.aas.instanceRoot}/config/keystore.jks</jvm-options> | |
| 330 | + <jvm-options>-Djavax.net.ssl.trustStore=${com.sun.aas.instanceRoot}/config/cacerts.jks</jvm-options> | |
| 331 | + <jvm-options>-Djava.ext.dirs=${com.sun.aas.javaRoot}/lib/ext${path.separator}${com.sun.aas.javaRoot}/jre/lib/ext${path.separator}${com.sun.aas.instanceRoot}/lib/ext</jvm-options> | |
| 332 | + <jvm-options>-Djdbc.drivers=org.apache.derby.jdbc.ClientDriver</jvm-options> | |
| 333 | + <jvm-options>-DANTLR_USE_DIRECT_CLASS_LOADING=true</jvm-options> | |
| 334 | + <jvm-options>-Dcom.sun.enterprise.config.config_environment_factory_class=com.sun.enterprise.config.serverbeans.AppserverConfigEnvironmentFactory</jvm-options> | |
| 335 | + <jvm-options>-XX:NewRatio=2</jvm-options> | |
| 336 | + <jvm-options>-Xmx512m</jvm-options> | |
| 337 | + <jvm-options>-Dosgi.shell.telnet.port=${OSGI_SHELL_TELNET_PORT}</jvm-options> | |
| 338 | + <jvm-options>-Dosgi.shell.telnet.maxconn=1</jvm-options> | |
| 339 | + <jvm-options>-Dosgi.shell.telnet.ip=127.0.0.1</jvm-options> | |
| 340 | + <jvm-options>-Dgosh.args=--noshutdown -c noop=true</jvm-options> | |
| 341 | + <jvm-options>-Dfelix.fileinstall.dir=${com.sun.aas.installRoot}/modules/autostart/</jvm-options> | |
| 342 | + <jvm-options>-Dfelix.fileinstall.poll=5000</jvm-options> | |
| 343 | + <jvm-options>-Dfelix.fileinstall.log.level=3</jvm-options> | |
| 344 | + <jvm-options>-Dfelix.fileinstall.bundles.new.start=true</jvm-options> | |
| 345 | + <jvm-options>-Dfelix.fileinstall.bundles.startTransient=true</jvm-options> | |
| 346 | + <jvm-options>-Dfelix.fileinstall.disableConfigSave=false</jvm-options> | |
| 347 | + </java-config> | |
| 348 | + <availability-service> | |
| 349 | + <web-container-availability></web-container-availability> | |
| 350 | + <ejb-container-availability sfsb-store-pool-name="jdbc/hastore"></ejb-container-availability> | |
| 351 | + <jms-availability></jms-availability> | |
| 352 | + </availability-service> | |
| 353 | + <network-config> | |
| 354 | + <protocols> | |
| 355 | + <protocol name="http-listener-1"> | |
| 356 | + <http default-virtual-server="server"> | |
| 357 | + <file-cache></file-cache> | |
| 358 | + </http> | |
| 359 | + </protocol> | |
| 360 | + <protocol security-enabled="true" name="http-listener-2"> | |
| 361 | + <http default-virtual-server="server"> | |
| 362 | + <file-cache></file-cache> | |
| 363 | + </http> | |
| 364 | + <ssl classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="s1as"></ssl> | |
| 365 | + </protocol> | |
| 366 | + <protocol name="admin-listener"> | |
| 367 | + <http default-virtual-server="__asadmin" max-connections="250"> | |
| 368 | + <file-cache></file-cache> | |
| 369 | + </http> | |
| 370 | + </protocol> | |
| 371 | + <protocol security-enabled="true" name="sec-admin-listener"> | |
| 372 | + <http default-virtual-server="__asadmin" encoded-slash-enabled="true"> | |
| 373 | + <file-cache></file-cache> | |
| 374 | + </http> | |
| 375 | + <ssl client-auth="want" classname="com.sun.enterprise.security.ssl.GlassfishSSLImpl" cert-nickname="glassfish-instance"></ssl> | |
| 376 | + </protocol> | |
| 377 | + <protocol name="admin-http-redirect"> | |
| 378 | + <http-redirect secure="true"></http-redirect> | |
| 379 | + </protocol> | |
| 380 | + <protocol name="pu-protocol"> | |
| 381 | + <port-unification> | |
| 382 | + <protocol-finder protocol="sec-admin-listener" name="http-finder" classname="com.sun.grizzly.config.HttpProtocolFinder"></protocol-finder> | |
| 383 | + <protocol-finder protocol="admin-http-redirect" name="admin-http-redirect" classname="com.sun.grizzly.config.HttpProtocolFinder"></protocol-finder> | |
| 384 | + </port-unification> | |
| 385 | + </protocol> | |
| 386 | + </protocols> | |
| 387 | + <network-listeners> | |
| 388 | + <network-listener port="${HTTP_LISTENER_PORT}" protocol="http-listener-1" transport="tcp" name="http-listener-1" thread-pool="http-thread-pool"></network-listener> | |
| 389 | + <network-listener port="${HTTP_SSL_LISTENER_PORT}" protocol="http-listener-2" transport="tcp" name="http-listener-2" thread-pool="http-thread-pool"></network-listener> | |
| 390 | + <network-listener port="${ASADMIN_LISTENER_PORT}" protocol="pu-protocol" transport="tcp" name="admin-listener" thread-pool="http-thread-pool"></network-listener> | |
| 391 | + </network-listeners> | |
| 392 | + <transports> | |
| 393 | + <transport name="tcp"></transport> | |
| 394 | + </transports> | |
| 395 | + </network-config> | |
| 396 | + <thread-pools> | |
| 397 | + <thread-pool name="http-thread-pool"></thread-pool> | |
| 398 | + <thread-pool max-thread-pool-size="200" name="thread-pool-1"></thread-pool> | |
| 399 | + <thread-pool name="admin-thread-pool" max-thread-pool-size="50" max-queue-size="256"></thread-pool> | |
| 400 | + </thread-pools> | |
| 401 | + <group-management-service> | |
| 402 | + <failure-detection></failure-detection> | |
| 403 | + </group-management-service> | |
| 404 | + <management-rules></management-rules> | |
| 405 | + <system-property name="ASADMIN_LISTENER_PORT" value="24848"></system-property> | |
| 406 | + <system-property name="HTTP_LISTENER_PORT" value="28080"></system-property> | |
| 407 | + <system-property name="HTTP_SSL_LISTENER_PORT" value="28181"></system-property> | |
| 408 | + <system-property name="JMS_PROVIDER_PORT" value="27676"></system-property> | |
| 409 | + <system-property name="IIOP_LISTENER_PORT" value="23700"></system-property> | |
| 410 | + <system-property name="IIOP_SSL_LISTENER_PORT" value="23820"></system-property> | |
| 411 | + <system-property name="IIOP_SSL_MUTUALAUTH_PORT" value="23920"></system-property> | |
| 412 | + <system-property name="JMX_SYSTEM_CONNECTOR_PORT" value="28686"></system-property> | |
| 413 | + <system-property name="OSGI_SHELL_TELNET_PORT" value="26666"></system-property> | |
| 414 | + <system-property name="JAVA_DEBUGGER_PORT" value="29009"></system-property> | |
| 415 | + <monitoring-service> | |
| 416 | + <module-monitoring-levels></module-monitoring-levels> | |
| 417 | + </monitoring-service> | |
| 418 | + <connector-service></connector-service> | |
| 419 | + </config> | |
| 420 | + </configs> | |
| 421 | + <property name="administrative.domain.name" value="domain1"></property> | |
| 422 | + <secure-admin special-admin-indicator="e4a50521-0eca-4932-bca9-805fc1d8412e"> | |
| 423 | + <secure-admin-principal dn="CN=localhost,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US"></secure-admin-principal> | |
| 424 | + <secure-admin-principal dn="CN=localhost-instance,OU=GlassFish,O=Oracle Corporation,L=Santa Clara,ST=California,C=US"></secure-admin-principal> | |
| 425 | + </secure-admin> | |
| 426 | + <load-balancers></load-balancers> | |
| 427 | + <lb-configs></lb-configs> | |
| 428 | + <clusters></clusters> | |
| 429 | +</domain> | |
| 0 | 430 | \ No newline at end of file | ... | ... |
| ... | ... | @@ -0,0 +1 @@ |
| 1 | +asdrubal;{SSHA256}xYbabe0zKCOUrsH4SNQ+MK75W7FxJujcDcAJ9iXruHm1uT5mn+yktw==;users | ... | ... |
impl/extension/servlet/src/test/resources/security/web.xml
| ... | ... | @@ -50,34 +50,33 @@ |
| 50 | 50 | <url-pattern>/*</url-pattern> |
| 51 | 51 | </filter-mapping> |
| 52 | 52 | |
| 53 | + <servlet> | |
| 54 | + <servlet-name>Security Class</servlet-name> | |
| 55 | + <servlet-class>security.SecurityServlet</servlet-class> | |
| 56 | + </servlet> | |
| 57 | + <servlet-mapping> | |
| 58 | + <servlet-name>Security Class</servlet-name> | |
| 59 | + <url-pattern>/login</url-pattern> | |
| 60 | + </servlet-mapping> | |
| 53 | 61 | |
| 62 | + <!-- | |
| 54 | 63 | <security-constraint> |
| 55 | 64 | <web-resource-collection> |
| 56 | - <web-resource-name>myapp</web-resource-name> | |
| 57 | - <url-pattern>/\*</url-pattern> | |
| 58 | - <http-method>GET</http-method> | |
| 65 | + <web-resource-name>Private URL</web-resource-name> | |
| 66 | + <url-pattern>/login</url-pattern> | |
| 59 | 67 | </web-resource-collection> |
| 60 | 68 | <auth-constraint> |
| 61 | - <role-name>users</role-name> | |
| 69 | + <role-name>*</role-name> | |
| 62 | 70 | </auth-constraint> |
| 63 | 71 | </security-constraint> |
| 72 | + | |
| 64 | 73 | <login-config> |
| 65 | 74 | <auth-method>BASIC</auth-method> |
| 66 | - <realm-name>default</realm-name> | |
| 75 | + <realm-name>fileRealm</realm-name> | |
| 67 | 76 | </login-config> |
| 77 | + | |
| 68 | 78 | <security-role> |
| 69 | - <role-name>users</role-name> | |
| 79 | + <role-name>*</role-name> | |
| 70 | 80 | </security-role> |
| 71 | - | |
| 72 | - <servlet> | |
| 73 | - <servlet-name>Security Class</servlet-name> | |
| 74 | - <servlet-class>security.SecurityServlet</servlet-class> | |
| 75 | - </servlet> | |
| 76 | - | |
| 77 | - <servlet-mapping> | |
| 78 | - <servlet-name>Security Class</servlet-name> | |
| 79 | - <url-pattern>/login</url-pattern> | |
| 80 | - </servlet-mapping> | |
| 81 | - | |
| 82 | - | |
| 81 | + --> | |
| 83 | 82 | </web-app> |
| 84 | 83 | \ No newline at end of file | ... | ... |