Skip to content

Instantly share code, notes, and snippets.

@jesuino
Created August 13, 2014 05:29
Show Gist options
  • Save jesuino/8a1207192a0adc614743 to your computer and use it in GitHub Desktop.
Save jesuino/8a1207192a0adc614743 to your computer and use it in GitHub Desktop.
Descriptors to set security on my app
<?xml version="1.0" encoding="UTF-8"?>
<jboss-web>
<security-domain>other</security-domain>
</jboss-web>
<web-app 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_3_0.xsd"
version="3.0">
<display-name>People Management WEB</display-name>
<security-constraint>
<display-name>REST Security</display-name>
<web-resource-collection>
<web-resource-name>rest</web-resource-name>
<url-pattern>/rest/*</url-pattern>
<http-method>DELETE</http-method>
<http-method>POST</http-method>
<http-method>PUT</http-method>
<http-method>GET</http-method>
</web-resource-collection>
<auth-constraint>
<role-name>admin</role-name>
</auth-constraint>
</security-constraint>
<login-config>
<auth-method>BASIC</auth-method>
<realm-name>other</realm-name>
</login-config>
<security-role>
<role-name>admin</role-name>
</security-role>
</web-app>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment