faq.html 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <!--
  2. * ========================================================================
  3. *
  4. * Copyright 2004 Acegi Technology Pty Limited
  5. *
  6. * Licensed under the Apache License, Version 2.0 (the "License");
  7. * you may not use this file except in compliance with the License.
  8. * You may obtain a copy of the License at
  9. *
  10. * http://www.apache.org/licenses/LICENSE-2.0
  11. *
  12. * Unless required by applicable law or agreed to in writing, software
  13. * distributed under the License is distributed on an "AS IS" BASIS,
  14. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  15. * See the License for the specific language governing permissions and
  16. * limitations under the License.
  17. *
  18. * ========================================================================
  19. -->
  20. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  21. <html xmlns="http://www.w3.org/1999/xhtml">
  22. <head>
  23. <title>Frequently Asked Questions (FAQ) on Acegi Security</title>
  24. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
  25. </head>
  26. <body>
  27. <h1>Frequently Asked Questions</h1>
  28. <h2>How do you pronounce "Acegi"?</h2>
  29. <p><i>Ah-see-gee</i>. Said quickly, without emphasis on any part.</p>
  30. <h2>Is it called "Acegi" or "Acegi Security"?</h2>
  31. <p>It's official name is <i>Acegi Security System for Spring</i>,
  32. although we're happy for it to be abbreviated to
  33. <i>Acegi Security</i>. Please don't just call it <i>Acegi</i>, though,
  34. as that gets confused with the name of the company that maintains Acegi
  35. Security.</p>
  36. <h2>Why catches 80% of users reporting problems?</h2>
  37. <p>80% of support questions are because people have not defined
  38. the necessary filters in <code>web.xml</code>, or the filters are being
  39. mapped in the incorrect order. Check the
  40. <a href="reference.html">Reference Guide</a>, which
  41. has a specific section on filter ordering.</p>
  42. <h2>I'm sure my filters are ordered correctly. What else could be wrong?</h2>
  43. <p>The next most common source of problems step from custom
  44. <code>AuthenticationDao</code> implementations that simply don't properly
  45. implement the interface. For example, they return <code>null</code> instead
  46. of the user not found exception, or fail to add in the
  47. <code>GrantedAuthority[]</code>s. We suggest you write the
  48. <code>UserDetails</code> object generated by your <code>AuthenticationDao</code>
  49. to the log and check it looks correct.</p>
  50. <h2>How do I store custom properties, like a user's email address?</h2>
  51. <p>In most cases write an <code>AuthenticationDao</code> which returns
  52. a subclass of <code>User</code>. Alternatively, write your own
  53. <code>UserDetails</code> implementation from scratch and return that.</p>
  54. <h2>I need some help. What files should I post?</h2>
  55. <p>The most important things to post with any support requests on the
  56. <a href="http://forum.springframework.org">Spring Forums</a> are your
  57. <code>web.xml</code>, <code>applicationContext.xml</code> (or whichever
  58. XML loads the security-related beans) as well as any custom
  59. <code>AuthenticationDao</code> you might be using. For really odd problems,
  60. also switch on debug-level logging and include the resulting log.</p>
  61. <h2>How do I switch on debug-level logging?</h2>
  62. <p>Acegi Security uses Commons Logging, just as Spring does. So you use the
  63. same approach as you'd use for Spring. Most people output to Log4J, so
  64. the following <code>log4j.properties</code> would work:</p>
  65. <pre>
  66. log4j.rootCategory=WARN, stdout
  67. log4j.appender.stdout=org.apache.log4j.ConsoleAppender
  68. log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
  69. log4j.appender.stdout.layout.ConversionPattern=%d %p %c - %m%n
  70. log4j.category.net.sf.acegisecurity=DEBUG</pre>
  71. <h2>Why doesn't Acegi Security use JAAS?</h2>
  72. <p>Acegi Security targets <i>enterprise applications</i>, which are typically
  73. multi-user, data-oriented applications that are important to
  74. the core business. Acegi Security was designed to provide a portable and effective
  75. security framework for this target application type. It was not designed for securing
  76. limited privilege runtime environments, such as web browser applets.</p>
  77. <p>We did consider JAAS when designing Acegi Security, but it simply
  78. wasn't suitable for our purpose. We needed to avoid complex JRE configurations,
  79. we needed container portability, and we wanted maximum leveraging of the Spring IoC
  80. container. Particularly as limited privilege runtime environments were not
  81. an actual requirement, this lead to the natural design of Acegi Security as
  82. it exists today.</p>
  83. <p>Acegi Security already provides some JAAS integration. It can today authenticate
  84. via delegation to a JAAS login module. This means it offers the same level of JAAS
  85. integration as many web containers. Indeed the container adapter model supported by
  86. Acegi Security allows Acegi Security and container-managed security to happily
  87. co-exist and benefit from each other. Any debate about Acegi Security and JAAS
  88. should therefore centre on the authorisation issue. An evaluation of major
  89. containers and security frameworks would reveal that Acegi Security is by no
  90. means unusual in not using JAAS for authorisation.</p>
  91. <p>There are many examples of open source applications being preferred to
  92. official standards. A few that come to mind in the Java community include
  93. using Spring managed POJOs (rather than EJBs), Hibernate (instead of entity beans),
  94. Log4J (instead of JDK logging), Tapestry (instead of JSF), and Velocity/FreeMarker
  95. (instead of JSP). It's important to recognise that many open source projects do
  96. develop into de facto standards, and in doing so play a legitimate and beneficial
  97. role in the software development profession.</p>
  98. <h2>Do you welcome contributions?</h2>
  99. <p>Yes. If you've written something and it works well, please feel free to share it.
  100. Simply email the contribution to the
  101. <a href="mail-lists.html">acegisecurity-developers</a> list. If you haven't yet
  102. written the contribution, we encourage you to send your thoughts to the same
  103. list so that you can receive some initial design feedback.</p>
  104. <p>For a contribution to be used, it must have appropriate unit test coverage and
  105. detailed JavaDocs. It will ideally have some comments for the Reference Guide
  106. as well (this can be sent in word processor or HTML format if desired). This
  107. helps ensure the contribution maintains the same quality as the remainder of
  108. the project.</p>
  109. <p>We also welcome documentation improvements, unit tests, illustrations,
  110. people supporting the user community (especially on the forums), design ideas,
  111. articles, blog entries, presentations and alike. If you're looking for something
  112. to do, you can always email the
  113. <a href="mail-lists.html">acegisecurity-developers</a> list and we'll be
  114. pleased to suggest something. :-)</p>
  115. </body>
  116. </html>