<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>https://luminoussheep.net/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Security_and_Deployment_Descriptors</id>
	<title>Security and Deployment Descriptors - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://luminoussheep.net/mediawiki/index.php?action=history&amp;feed=atom&amp;title=Security_and_Deployment_Descriptors"/>
	<link rel="alternate" type="text/html" href="https://luminoussheep.net/mediawiki/index.php?title=Security_and_Deployment_Descriptors&amp;action=history"/>
	<updated>2026-05-11T19:21:24Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.8</generator>
	<entry>
		<id>https://luminoussheep.net/mediawiki/index.php?title=Security_and_Deployment_Descriptors&amp;diff=74&amp;oldid=prev</id>
		<title>Martin: Created page with &quot;References * http://java.boot.by/scea5-guide/ch08s04.html * [http://java.sun.com/xml/ns/javaee/ all schemas for j2ee] * [http://java.sun.com/xml/ns/javaee/javaee_5.xsd j2ee xs...&quot;</title>
		<link rel="alternate" type="text/html" href="https://luminoussheep.net/mediawiki/index.php?title=Security_and_Deployment_Descriptors&amp;diff=74&amp;oldid=prev"/>
		<updated>2021-09-14T21:35:52Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;References * http://java.boot.by/scea5-guide/ch08s04.html * [http://java.sun.com/xml/ns/javaee/ all schemas for j2ee] * [http://java.sun.com/xml/ns/javaee/javaee_5.xsd j2ee xs...&amp;quot;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;References&lt;br /&gt;
* http://java.boot.by/scea5-guide/ch08s04.html&lt;br /&gt;
* [http://java.sun.com/xml/ns/javaee/ all schemas for j2ee]&lt;br /&gt;
* [http://java.sun.com/xml/ns/javaee/javaee_5.xsd j2ee xsd (used by web.xsd)]&lt;br /&gt;
&lt;br /&gt;
= Declarative security =&lt;br /&gt;
* rules and permissions&lt;br /&gt;
* defined in deployment descriptors&lt;br /&gt;
** EJB = ejb-jar.xml&lt;br /&gt;
** WAR = web.xml&lt;br /&gt;
** JAR = application-client.xml&lt;br /&gt;
&lt;br /&gt;
= web.xml =&lt;br /&gt;
* [http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd web xsd]&lt;br /&gt;
&lt;br /&gt;
Can configure protocol and roles of pages that can be seen&lt;br /&gt;
  &amp;lt;web-app&amp;gt;&lt;br /&gt;
    &amp;lt;security-constraint&amp;gt;&lt;br /&gt;
      &amp;lt;web-resource-collection&amp;gt;&lt;br /&gt;
        &amp;lt;url-pattern&amp;gt;  &amp;lt;/url-pattern&amp;gt;&lt;br /&gt;
        &amp;lt;http-method&amp;gt;GET or POST&amp;lt;/http-method&amp;gt;&lt;br /&gt;
      &amp;lt;/web-resource-collection&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
      &amp;lt;auth-constraint&amp;gt;&lt;br /&gt;
        &amp;lt;role-name&amp;gt;&amp;lt;/role-name&amp;gt;&lt;br /&gt;
      &amp;lt;/auth-constraint&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
      &amp;lt;user-data-constraint&amp;gt;&lt;br /&gt;
        &amp;lt;transport-guarantee&amp;gt;NONE (=http) or INTEGRAL (must not be tampered with = ssl) or CONFIDENTIAL (must not be intercepted = ssl)&amp;lt;/transport-guarantee&amp;gt;&lt;br /&gt;
      &amp;lt;/user-data-constraint&amp;gt;&lt;br /&gt;
    &amp;lt;/security-constraint&amp;gt;&lt;br /&gt;
  &amp;lt;/web-app&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= ejb.xml =&lt;br /&gt;
[http://java.sun.com/xml/ns/javaee/ejb-jar_3_0.xsd ejb xsd]&lt;br /&gt;
* Can map roles to logical names for use within beans&lt;br /&gt;
* Can define roles the bean will run as&lt;br /&gt;
* Can define the roles required to access methods of beans&lt;br /&gt;
** can distinguish between methods overridden, interfaces - remote/local&lt;br /&gt;
** in assembly descriptor&lt;br /&gt;
* message driven only has security role to run as&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;ejb-jar&amp;gt;&lt;br /&gt;
    &amp;lt;enterprise-beans&amp;gt;&lt;br /&gt;
      &amp;lt;entity|session&amp;gt;&lt;br /&gt;
        &amp;lt;security-role-ref&amp;gt; &amp;lt; !-- only for use in security context methods within bean -- &amp;gt;&lt;br /&gt;
          &amp;lt;role-name&amp;gt;Name to use in bean&amp;lt;/role-name&amp;gt;&lt;br /&gt;
          &amp;lt;role-link&amp;gt;actual role or logic role mapped by assembly descriptor&amp;lt;/role-link&amp;gt;&lt;br /&gt;
        &amp;lt;/security-role-ref&amp;gt;&lt;br /&gt;
   &lt;br /&gt;
        &amp;lt;security-identity&amp;gt;&lt;br /&gt;
          * &amp;lt;use-caller-identity/&amp;gt; &amp;lt; !-- empty tag run as calling user -- &amp;gt;&lt;br /&gt;
          * OR&lt;br /&gt;
          * &amp;lt;run-as&amp;gt;&lt;br /&gt;
        &amp;lt;/security-identity&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  ...&lt;br /&gt;
  &amp;lt;message-driven&amp;gt;&lt;br /&gt;
    ....&lt;br /&gt;
    &amp;lt;security-identity&amp;gt;&lt;br /&gt;
      * &amp;lt;use-caller-identity/&amp;gt; &amp;lt; !-- empty tag run as calling user -- &amp;gt;&lt;br /&gt;
      * OR&lt;br /&gt;
      * &amp;lt;run-as&amp;gt;&lt;br /&gt;
    &amp;lt;/security-identity&amp;gt;&lt;br /&gt;
  &amp;lt;message-driven&amp;gt;&lt;br /&gt;
  &lt;br /&gt;
  &amp;lt;assembly-descriptor&amp;gt;&lt;br /&gt;
    &amp;lt;security-role-ref&amp;gt; &amp;lt; !-- see above -- &amp;gt; &amp;lt;/security-role-ref&amp;gt; &lt;br /&gt;
    &amp;lt;method-permission&amp;gt;&lt;br /&gt;
      * &amp;lt;role-name&amp;gt;&amp;lt;/role-name&amp;gt;&lt;br /&gt;
      * or &lt;br /&gt;
      * &amp;lt;unchecked/&amp;gt;&lt;br /&gt;
      &amp;lt;method&amp;gt;&lt;br /&gt;
        &amp;lt;ejb-name&amp;gt;&amp;lt;/ejb-name&amp;gt;&lt;br /&gt;
        &amp;lt;method-intf&amp;gt;optional - one of Home,Remote,LocalHome,Local,ServiceEndpoint&amp;lt;/method-intf&amp;gt;&lt;br /&gt;
        &amp;lt;method-name&amp;gt;&amp;lt;/method-name&amp;gt;&lt;br /&gt;
        &amp;lt;method-params&amp;gt;optional - distinguish between overridden methods repeated with fully specified class&amp;lt;/method-params&amp;gt;&lt;br /&gt;
      &amp;lt;/method&amp;gt;&lt;/div&gt;</summary>
		<author><name>Martin</name></author>
	</entry>
</feed>