Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Jetty/Feature/Realms"

< Jetty‎ | Feature
 
(One intermediate revision by one other user not shown)
Line 1: Line 1:
 
{{Jetty Feature
 
{{Jetty Feature
 
| introduction =
 
| introduction =
 +
 +
{{Jetty TODO}}
 +
 
Security realms allow you to secure your web applications against unauthorized access. Protection is based on authentication that identifies who is requesting access to the webapp and access control that restricts what can be accessed and how it is accessed within the webapp.
 
Security realms allow you to secure your web applications against unauthorized access. Protection is based on authentication that identifies who is requesting access to the webapp and access control that restricts what can be accessed and how it is accessed within the webapp.
  
Line 6: Line 9:
 
A webapp statically declares its security requirements in its web.xml file. Authentication is controlled by the &lt;login-config&gt; element. Access controls are specified by &lt;security-constraint&gt; and &lt;security-role-ref&gt; elements. When a request is received for a protected resource, the web container checks if the user performing the request is  authenticated, and if the user has a role assignment that permits access to the requested resource.
 
A webapp statically declares its security requirements in its web.xml file. Authentication is controlled by the &lt;login-config&gt; element. Access controls are specified by &lt;security-constraint&gt; and &lt;security-role-ref&gt; elements. When a request is received for a protected resource, the web container checks if the user performing the request is  authenticated, and if the user has a role assignment that permits access to the requested resource.
  
The Servlet Specification does not address how the static security information in the {{WEB-INF/web.xml}} file is mapped to the runtime environment of the container.  Jetty does this with the "realm" concept.
+
The Servlet Specification does not address how the static security information in the '''WEB-INF/web.xml''' file is mapped to the runtime environment of the container.  Jetty does this with the "realm" concept.
  
 
A realm has a unique name, and is composed of a set of users. Each user has authentication information (e.g. a password) and a set of roles associated with him/herself.
 
A realm has a unique name, and is composed of a set of users. Each user has authentication information (e.g. a password) and a set of roles associated with him/herself.

Latest revision as of 15:26, 23 April 2013



Introduction

Warning2.png
Some or all of this content remains to be ported to Jetty 9 Documentation.
If you are interested in migrating this content see our contribution guide or contact us.


Security realms allow you to secure your web applications against unauthorized access. Protection is based on authentication that identifies who is requesting access to the webapp and access control that restricts what can be accessed and how it is accessed within the webapp.

Feature

A webapp statically declares its security requirements in its web.xml file. Authentication is controlled by the <login-config> element. Access controls are specified by <security-constraint> and <security-role-ref> elements. When a request is received for a protected resource, the web container checks if the user performing the request is authenticated, and if the user has a role assignment that permits access to the requested resource.

The Servlet Specification does not address how the static security information in the WEB-INF/web.xml file is mapped to the runtime environment of the container. Jetty does this with the "realm" concept.

A realm has a unique name, and is composed of a set of users. Each user has authentication information (e.g. a password) and a set of roles associated with him/herself.

You may configure one or many different realms depending on your needs. A single realm would indicate that you wish to share common security information across all of your web applications. Distinct realms allow you to partition your security information webapp by webapp.

When a request to a web application requires authentication or authorization, Jetty will use the <realm-name> sub-element inside <login-config> element in the web.xml file to perform an *exact match* to a realm defined in a jetty xml configuration file (or programmatically).

Additional Resources

See Configuring Security Realms tutorial for information on how to configure Jetty security realms.

Back to the top