SlideShare ist ein Scribd-Unternehmen logo
1 von 56
Downloaden Sie, um offline zu lesen
Apache Roller, Acegi Security
    and Single Sign-on
               Matt Raible
        matt@raibledesigns.com
        http://raibledesigns.com




                                   © 2007 Raible Designs, Inc.
Today’s Agenda
Introductions
Integrating Roller with LDAP and CAS on Tomcat
Introduction to Acegi Security
Introduction to Apache Roller
Conclusions
Q and A




                                         © 2007 Raible Designs, Inc.
Introductions
Do you blog?
Do you use Roller or JRoller?
What do you want to get from this session?
Experience with Acegi Security, LDAP, or SSO
Solutions?
Preferred Server: Tomcat, Geronimo, JBoss or
GlassFish?




                                             © 2007 Raible Designs, Inc.
Who is Matt Raible?
One of the first Roller users and Committers - started
in August 2002
Java Blogger since 2002
Power user of Java Web Frameworks
Author of Spring Live and Pro JSP 2.0
Founder of AppFuse (http://appfuse.org)
Member of Java EE 5, JSF 1.2 and Bean Validation
Expert Groups




                                            © 2007 Raible Designs, Inc.
Integrating Roller with
             CAS on Tomcat




http://cwiki.apache.org/confluence/display/ROLLER/Roller+4.0+with+LDAP+and+CAS

                                                             © 2007 Raible Designs, Inc.
Installing Roller on
           Apache Geronimo




http://cwiki.apache.org/confluence/display/ROLLER/Roller+4.0+on+Geronimo

                                                          © 2007 Raible Designs, Inc.
Acegi Security
A powerful, flexible security
solution for enterprise software,
with a particular emphasis on
applications that use Spring.




                                    © 2007 Raible Designs, Inc.
J2EE’s CMA
Container Managed Authentication (CMA) built into
the Servlet API
Configure security-constraints in web.xml
Configure Authentication Realm in your application
server




                                           © 2007 Raible Designs, Inc.
Form Authentication
<security-constraint>
    <web-resource-collection>
        <web-resource-name>Secure Area</web-resource-name>
        <url-pattern>*.html</url-pattern>
    </web-resource-collection>

    <auth-constraint>
        <role-name>*</role-name>
    </auth-constraint>
</security-constraint>

<login-config>
    <auth-method>FORM</auth-method>
    <form-login-config>
        <form-login-page>/login.jsp</form-login-page>
        <form-error-page>/loginError.jsp</form-error-page>
    </form-login-config>
</login-config>




                                                             © 2007 Raible Designs, Inc.
Form Authentication
      /login.jsp
<form id=quot;loginFormquot; method=quot;postquot; action=quot;j_security_checkquot;>
    <p>
        <label for=quot;j_usernamequot;>Username:</label>
        <input type=quot;textquot; name=quot;j_usernamequot; id=quot;j_usernamequot;/><br/>

           <label for=quot;j_passwordquot;>Password:</label>
           <input type=quot;passwordquot; name=quot;j_passwordquot; id=quot;j_passwordquot;/>

           <button type=quot;submitquot;>Login</button>
    </p>
</form>




      /loginError.jsp
<p>
    Login failed - please <a href=quot;index.jspquot;>try again</a>.
</p>



                                                                        © 2007 Raible Designs, Inc.
Tomcat Realms
 MemoryRealm, JDBCRealm, DataSourceRealm,
 JAASRealm, JNDIRealm
 JDBCRealm Example:

<Context path=quot;quot; docBase=quot;rollerquot; debug=quot;99quot;
    reloadable=quot;truequot; antiJARLocking=quot;truequot; antiResourceLocking=quot;truequot;>

    <Realm className=quot;org.apache.catalina.realm.JDBCRealmquot; debug=quot;99quot;
           driverName=quot;com.mysql.jdbc.Driverquot;
       connectionURL=quot;jdbc:mysql://localhost/roller?autoReconnect=truequot;
      connectionName=quot;rootquot; connectionPassword=quot;quot;
            userTable=quot;usersquot; userNameCol=quot;usernamequot; userCredCol=quot;passwordquot;
       userRoleTable=quot;user_rolesquot; roleNameCol=quot;rolenamequot;/>
</Context>




                                                                 © 2007 Raible Designs, Inc.
Problems with CMA
Not as portable as you’d think
Every server has proprietary configuration
Form-based authentication problems:
    Often can’t control SQL for user/role query
    No way to filter on /j_security_check to trap when
    users first login
    Implementation different on various servers
However - Vendors love it!



                                            © 2007 Raible Designs, Inc.
Solution: Acegi Security
Everything can be configured in your application
Secure URLs by role with regular expressions
URL patterns can be regular expressions or Ant-style
patterns (i.e. /**/admin*.html)
Authentication methods supported: Basic, Digest,
Form, Yale Central Authentication Service (CAS)
Authentication Providers: JDBC, XML, LDAP, CAS




                                            © 2007 Raible Designs, Inc.
Configuration: web.xml
<filter>
    <filter-name>securityFilter</filter-name>
    <filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class>
    <init-param>
         <param-name>targetClass</param-name>
         <param-value>org.acegisecurity.util.FilterChainProxy</param-value>
    </init-param>
</filter>

<filter-mapping>
    <filter-name>securityFilter</filter-name>
    <url-pattern>/*</url-pattern>
</filter-mapping>




                                                                 © 2007 Raible Designs, Inc.
security.xml
The filterChainProxy bean contains the filter list that will process the
authentication process. These filters each perform specific duties:
      httpSessionContextIntegrationFilter: This filter is responsible
      for communicating with the user's session to store the user's
      authentication in the SecurityContextHolder.
      basicProcessingFilter: This filter processes an HTTP request's
      BASIC authorization headers, placing the result into the
      SecurityContextHolder.
      exceptionTranslationFilter: Defines exceptions and entry point
      (URL and SSL)




                                                          © 2007 Raible Designs, Inc.
security.xml
<bean id=quot;filterChainProxyquot; class=quot;org.acegisecurity.util.FilterChainProxyquot;>
    <property name=quot;filterInvocationDefinitionSourcequot;>
        <value>
            CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON
            PATTERN_TYPE_APACHE_ANT
            /**=httpSessionContextIntegrationFilter,authenticationProcessingFilter,
                remoteUserFilter,rememberMeProcessingFilter,anonymousProcessingFilter,
                exceptionTranslationFilter,filterInvocationInterceptor
        </value>
    </property>
</bean>




                                                                       © 2007 Raible Designs, Inc.
Form Authentication

Changing from Basic to Form-based authentication is
just XML configuration
Login and Error pages can be same as CMA pages
No code needed to support Remember Me and
Password Encryption - just XML
Can configure SSL “channels” based on URL-pattern




                                          © 2007 Raible Designs, Inc.
Authentication Providers
 Custom: write your own
 In-Memory: credentials in XML file
 JAAS: provided by LoginModule
 JDBC: credentials in database
 LDAP: credentials in database
 OpenID: experimental support, see SEC-432
 Windows NT: experimental support, see SEC-8
 SSO: Yale’s CAS, SiteMinder



                                         © 2007 Raible Designs, Inc.
Authentication Providers
 <bean id=quot;daoAuthenticationProviderquot;
     class=quot;org.acegisecurity.providers.dao.DaoAuthenticationProviderquot;>
     <property name=quot;userDetailsServicequot; ref=quot;inMemoryDaoImplquot;/>
 </bean>

 ...

 <bean id=quot;inMemoryDaoImplquot;
     class=quot;org.acegisecurity.providers.dao.memory.InMemoryDaoImplquot;>
     <property name=quot;userMapquot;>
         <value>
             tomcat=tomcat,ROLE_USER
             springlive=springlive,ROLE_USER
         </value>
     </property>
 </bean>




                                                                © 2007 Raible Designs, Inc.
Password Encryption
bean id=quot;inMemoryDaoImplquot;
    class=quot;org.acegisecurity.providers.dao.memory.InMemoryDaoImplquot;>
    <property name=quot;userMapquot;>
        <value>
          tomcat=536c0b339345616c1b33caf454454d8b8a190d6c,ROLE_USER
          springlive=2a9152cff1d25b5bbaa3e5fbc7acdc6905c9f251,ROLE_USER
        </value>
    </property>
</bean>

<bean id=quot;daoAuthenticationProviderquot;
    class=quot;org.acegisecurity.providers.dao.DaoAuthenticationProviderquot;>
    <property name=quot;userDetailsServicequot; ref=quot;inMemoryDaoImplquot;/>
    <property name=quot;passwordEncoderquot; ref=quot;passwordEncoderquot;/>
</bean>

<bean id=quot;passwordEncoderquot;
    class=quot;org.acegisecurity.providers.encoding.ShaPasswordEncoderquot;/>




                                                                  © 2007 Raible Designs, Inc.
JDBC Provider
To use JDBC, just define a bean with a dataSource
dependency:
 <bean id=quot;jdbcDaoImplquot;
     class=quot;org.acegisecurity.providers.dao.jdbc.JdbcDaoImplquot;>
     <property name=quot;dataSourcequot; ref=quot;dataSourcequot;/>
 </bean>



Default SQL for select users and roles:
   quot;SELECT username,password,enabled FROM users WHERE username = ?quot;;
   quot;SELECT username,authority FROM authorities WHERE username = ?quot;;




                                                                 © 2007 Raible Designs, Inc.
Cool Features
Event Listeners
SecurityContextAwareRequestFilter
Secure Methods by Role
Remember Me
SSL Switching




                                    © 2007 Raible Designs, Inc.
Other Features
Anonymous Filter: Creates Authentication object
with anonymous user information
Access Control Lists (ACLs): Control permissions
per object
AfterMethodInvocation Interceptor: Removes
objects from collections when user can’t read
them




                                         © 2007 Raible Designs, Inc.
J2EE vs. Acegi Security
Security Framework   Pros                            Cons

                     It is easy to set up from an    It can be difficult to port from
J2EE Security        application perspective.        one application server to the
                                                     other.
                     User Realm configuration is in
                     the hands of the deployer.      Even though the application-
                                                     developer configuration is
                     Because it's a standard, many   standardized, the realm
                     sources of documentation are    configuration for servers is not.
                     available.
                                                     Service layer methods can
                                                     only be secured if using EJBs.




                                                                         © 2007 Raible Designs, Inc.
J2EE vs. Acegi Security
Security Framework   Pros                                            Cons
Acegi Security       Security configuration is completely self-       It requires a lot of XML to
                     contained in the application – you don't        configure.
                     have to worry about application server
                     portability.                                    The learning curve can be a
                                                                     little steep and seem
                     It solves many of the shortcomings of J2EE      overwhelming at first.
                     security and allows all the same things, with
                     the option to customize.                        Realm information is packaged
                     It supports single sign-on with CAS.            with the application, making it
                                                                     tough for a deployer to change.
                     It’s evolving and improving very rapidly.

                     It allows you to secure methods of any
                     Spring-managed bean and filtering objects
                     based on their ACLs.




                                                                                     © 2007 Raible Designs, Inc.
Apache Roller
What is Apache Roller?
Installing Roller
Roller Architecture
    Blog Customization
    Server Customization
Other Features: Clients and Planet




                                     © 2007 Raible Designs, Inc.
What is Apache Roller?
Apache Roller is a full-featured, multi-user and group-
blog server suitable for blog sites large and small
Cool Features:
    Multi-user and Group blogging
    Comment moderation and spam prevention
    Complete control over UI with templates
    Built-in Search
    RSS 2.0 and Atom 1.0 Support



                                             © 2007 Raible Designs, Inc.
History
Started by Dave Johnson in 2000 as “Homeport”




        http://rollerweblogger.org/roller/date/20021231

                                                          © 2007 Raible Designs, Inc.
History of Roller
In 2002, Dave ditched EJBs and HAHTsite IDE for
open source tools (Ant, Castor, Struts, and Velocity)
April 5, 2002: Roller 0.9.0 Released
April 17, 2002: O’Reilly Article “Building an Open
Source J2EE Weblogger” Published
July 31 - August 7, 2002: The world starts blogging
with Roller
       http://rollerweblogger.org/roller/date/20021231




                                                         © 2007 Raible Designs, Inc.
Roller since 2002
Roller now powers jroller.com, blogs.sun.com, IBM
developerWorks blogs and many others
Dave hired by Sun to work on Roller full-time in
September 2004
Roller began incubation at Apache in June 2005
April 23, 2007: Graduated and released 3.1




                                             © 2007 Raible Designs, Inc.
But what is Roller?
Roller is a blogging engine
Blogs make web publishing easy
    Everyone can do it
    No need for IT or Webmasters
    Tools are in the users hands
Feeds make reading blogs easy
    Feeds are XML-based: RSS or Atom
    You subscribe to a feed in a Feed Reader
    Feed Readers are like inboxes for the web

                                       © 2007 Raible Designs, Inc.
Posting a Weblog Entry




                   © 2007 Raible Designs, Inc.
Viewing a Weblog Entry




                   © 2007 Raible Designs, Inc.
Reading a Weblog Entry




                   © 2007 Raible Designs, Inc.
Why choose Roller?

Proven, full-featured blogging solution for big sites
    Used by Sun, IBM, Yale University, Covalent and
    ESRI
Open Source and Apache Licensed
Active and growing community at Apache
Standard Java Web Application Architecture




                                              © 2007 Raible Designs, Inc.
Why choose Roller?
It works great if you know what you’re doing
Nice looking example sites:
    http://blogs.sun.com/greimer
    http://blogs.sun.com/jonathan
    http://blogs.usd.edu/jrbethke
    http://rollerweblogger.org/roller
    http://raibledesigns.com
    http://ryandelaplante.com
Awesome themes at http://rollerthemes.com!


                                           © 2007 Raible Designs, Inc.
Installing Roller
Download Roller 3.1 from http://cwiki.apache.org/
confluence/display/ROLLER/Roller+Downloads
Download Hibernate and other JARs from https://
roller.dev.java.net/servlets/ProjectDocumentList?
folderID=6962
Copy JARs from java.net download into apache-
roller-3.1/webapp/roller/WEB-INF/lib




                        37                  © 2007 Raible Designs, Inc.
Installing Roller: Java &
 Download and Install Java 5 from:
      http://java.sun.com/javase/downloads
 Download and install MySQL 5 from:
      http://dev.mysql.com/downloads
 Create database with files in WEB-INF/dbscripts:
      mysqladmin -u root -p create roller
      cd webapp/roller/WEB-INF/dbscripts/mysql
      mysql -u root -p roller < createdb.sql


NOTE: Use /WEB-INF/classes/dbscripts in Roller 4.0.

                                             © 2007 Raible Designs, Inc.
Installing Roller: Tomcat
 Download and install Tomcat 6 from:
     http://tomcat.apache.org/download-60.cgi
 Copy apache-roller-3.1/webapp/roller to
 $CATALINA_HOME/webapps/ROOT
 Copy activation.jar, mail.jar and mysql-connector-
 java-5.0.3-bin.jar to $CATALINA_HOME/lib
 (common/lib for Tomcat 5.x)


          » continued on next page



                                             © 2007 Raible Designs, Inc.
Installing Roller: Tomcat
 Create ROOT/META-INF/context.xml with the
 following contents:
  <Context path=quot;quot; reloadable=quot;falsequot; antiJARLocking=quot;truequot;
      antiResourceLocking=quot;falsequot; allowLinking=quot;truequot;>

      <Resource name=quot;jdbc/rollerdbquot; auth=quot;Containerquot;
                type=quot;javax.sql.DataSourcequot;
                maxActive=quot;20quot; maxIdle=quot;10quot; maxWait=quot;100quot;
                driverClassName=quot;com.mysql.jdbc.Driverquot;
                username=quot;rootquot; password=quot;quot;
                url=quot;jdbc:mysql://localhost/rollerquot;/>


      <Resource name=quot;mail/Sessionquot; auth=quot;Containerquot;
                type=quot;javax.mail.Sessionquot;
                mail.smtp.host=quot;localhostquot; />
  </Context>

                                                       © 2007 Raible Designs, Inc.
Roller Install: Startup
Start Tomcat and create your weblog at http:/localhost:8080




                                              © 2007 Raible Designs, Inc.
Create a User




      42        © 2007 Raible Designs, Inc.
Create a Weblog




       43         © 2007 Raible Designs, Inc.
The obligatory first post




            44       © 2007 Raible Designs, Inc.
Roller Architecture:
Web UI via Java Servlets and JSP
    Front controller, Web MVC and Open Session In
    View patterns
Persistence via JDBC
    Factory, Façade and Data Mapper patterns




                       45                © 2007 Raible Designs, Inc.
Roller Architecture: Geek
 Roller Web: Web and UI Layer
      Editor UI via Struts and JSP, blog and feed rendering via
      Velocity
      Feed parsing via ROME, Blogger API via Apache XML-RPC
 Roller Beans: Business and Persistence Layer
      Hibernate/JPA for DBMS, Lucene for search




                             46                       © 2007 Raible Designs, Inc.
What’s New in Roller 4.0
 Easier Theme Customization
 Easy Installation
 Java 5, Open JPA and Struts 2
 http://cwiki.apache.org/confluence/display/ROLLER/
 What%27s+New+in+Roller+4.0




                                          © 2007 Raible Designs, Inc.
Conclusion




             © 2007 Raible Designs, Inc.
Conclusion




             © 2007 Raible Designs, Inc.
Conclusion

     Rocks!




              © 2007 Raible Designs, Inc.
Conclusion

                            Rocks!

Apache Roller is a full-featured blogging system




                                              © 2007 Raible Designs, Inc.
Conclusion

                            Rocks!

Apache Roller is a full-featured blogging system
Installing Roller is Easy




                                              © 2007 Raible Designs, Inc.
Conclusion

                             Rocks!

Apache Roller is a full-featured blogging system
Installing Roller is Easy
Integrating with SSO is Painless




                                              © 2007 Raible Designs, Inc.
Conclusion

                             Rocks!

Apache Roller is a full-featured blogging system
Installing Roller is Easy
Integrating with SSO is Painless
Blogging is fun - and great for your career!


                                               © 2007 Raible Designs, Inc.
Additional Resources
Acegi Security Forums:
    http://forum.springframework.org/
    forumdisplay.php?f=33
Yale’s CAS:
    http://ja-sig.org/products/cas/
    community/lists/index.html
Roller User Mailing List:
    user@roller.apache.org




                             49         © 2007 Raible Designs, Inc.
Questions?
       matt@raibledesigns.com
       http://raibledesigns.com


         Download presentation from:
http://raibledesigns.com/rd/page/publications




                                                © 2007 Raible Designs, Inc.

Weitere ähnliche Inhalte

Was ist angesagt?

JAX-RS JavaOne Hyderabad, India 2011
JAX-RS JavaOne Hyderabad, India 2011JAX-RS JavaOne Hyderabad, India 2011
JAX-RS JavaOne Hyderabad, India 2011
Shreedhar Ganapathy
 
Hybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKitHybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKit
Ariya Hidayat
 

Was ist angesagt? (20)

Web App Security for Java Developers - UberConf 2021
Web App Security for Java Developers - UberConf 2021Web App Security for Java Developers - UberConf 2021
Web App Security for Java Developers - UberConf 2021
 
Front End Development for Back End Java Developers - Jfokus 2020
Front End Development for Back End Java Developers - Jfokus 2020Front End Development for Back End Java Developers - Jfokus 2020
Front End Development for Back End Java Developers - Jfokus 2020
 
Java REST API Framework Comparison - PWX 2021
Java REST API Framework Comparison - PWX 2021Java REST API Framework Comparison - PWX 2021
Java REST API Framework Comparison - PWX 2021
 
What's New in Spring 3.1
What's New in Spring 3.1What's New in Spring 3.1
What's New in Spring 3.1
 
Bootiful Development with Spring Boot and React - UberConf 2018
Bootiful Development with Spring Boot and React - UberConf 2018Bootiful Development with Spring Boot and React - UberConf 2018
Bootiful Development with Spring Boot and React - UberConf 2018
 
JAX-RS JavaOne Hyderabad, India 2011
JAX-RS JavaOne Hyderabad, India 2011JAX-RS JavaOne Hyderabad, India 2011
JAX-RS JavaOne Hyderabad, India 2011
 
Spark IT 2011 - Developing RESTful Web services with JAX-RS
Spark IT 2011 - Developing RESTful Web services with JAX-RSSpark IT 2011 - Developing RESTful Web services with JAX-RS
Spark IT 2011 - Developing RESTful Web services with JAX-RS
 
Spark IT 2011 - Java EE 6 Workshop
Spark IT 2011 - Java EE 6 WorkshopSpark IT 2011 - Java EE 6 Workshop
Spark IT 2011 - Java EE 6 Workshop
 
A Gentle Introduction to Angular Schematics - Devoxx Belgium 2019
A Gentle Introduction to Angular Schematics - Devoxx Belgium 2019A Gentle Introduction to Angular Schematics - Devoxx Belgium 2019
A Gentle Introduction to Angular Schematics - Devoxx Belgium 2019
 
Java Web Application Security - Utah JUG 2011
Java Web Application Security - Utah JUG 2011Java Web Application Security - Utah JUG 2011
Java Web Application Security - Utah JUG 2011
 
Choosing a Java Web Framework
Choosing a Java Web FrameworkChoosing a Java Web Framework
Choosing a Java Web Framework
 
Os Johnson
Os JohnsonOs Johnson
Os Johnson
 
A Gentle Introduction to Angular Schematics - Angular SF 2019
A Gentle Introduction to Angular Schematics - Angular SF 2019A Gentle Introduction to Angular Schematics - Angular SF 2019
A Gentle Introduction to Angular Schematics - Angular SF 2019
 
Java Web Application Security with Java EE, Spring Security and Apache Shiro ...
Java Web Application Security with Java EE, Spring Security and Apache Shiro ...Java Web Application Security with Java EE, Spring Security and Apache Shiro ...
Java Web Application Security with Java EE, Spring Security and Apache Shiro ...
 
Front End Development for Backend Developers - GIDS 2019
Front End Development for Backend Developers - GIDS 2019Front End Development for Backend Developers - GIDS 2019
Front End Development for Backend Developers - GIDS 2019
 
Seven Simple Reasons to Use AppFuse
Seven Simple Reasons to Use AppFuseSeven Simple Reasons to Use AppFuse
Seven Simple Reasons to Use AppFuse
 
How to Win at UI Development in the World of Microservices - THAT Conference ...
How to Win at UI Development in the World of Microservices - THAT Conference ...How to Win at UI Development in the World of Microservices - THAT Conference ...
How to Win at UI Development in the World of Microservices - THAT Conference ...
 
Clojure Web Development
Clojure Web DevelopmentClojure Web Development
Clojure Web Development
 
Hybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKitHybrid Apps (Native + Web) via QtWebKit
Hybrid Apps (Native + Web) via QtWebKit
 
Use Angular Schematics to Simplify Your Life - Develop Denver 2019
Use Angular Schematics to Simplify Your Life - Develop Denver 2019Use Angular Schematics to Simplify Your Life - Develop Denver 2019
Use Angular Schematics to Simplify Your Life - Develop Denver 2019
 

Ähnlich wie Apache Roller, Acegi Security and Single Sign-on

Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
Sagar Nakul
 
Intro To Mvc Development In Php
Intro To Mvc Development In PhpIntro To Mvc Development In Php
Intro To Mvc Development In Php
funkatron
 
From Developer to Production, Promoting your Webservices
From Developer to Production, Promoting your WebservicesFrom Developer to Production, Promoting your Webservices
From Developer to Production, Promoting your Webservices
kingsfleet
 
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
Carles Farré
 
Microformats HTML to API
Microformats HTML to APIMicroformats HTML to API
Microformats HTML to API
elliando dias
 
5 Reasons To Love CodeIgniter
5 Reasons To Love CodeIgniter5 Reasons To Love CodeIgniter
5 Reasons To Love CodeIgniter
nicdev
 

Ähnlich wie Apache Roller, Acegi Security and Single Sign-on (20)

Moving applications to the cloud
Moving applications to the cloudMoving applications to the cloud
Moving applications to the cloud
 
Migration testing framework
Migration testing frameworkMigration testing framework
Migration testing framework
 
สปริงเฟรมเวิร์ค4.1
สปริงเฟรมเวิร์ค4.1สปริงเฟรมเวิร์ค4.1
สปริงเฟรมเวิร์ค4.1
 
Jsfsunum
JsfsunumJsfsunum
Jsfsunum
 
Spring and DWR
Spring and DWRSpring and DWR
Spring and DWR
 
Developing and testing ajax components
Developing and testing ajax componentsDeveloping and testing ajax components
Developing and testing ajax components
 
Struts,Jsp,Servlet
Struts,Jsp,ServletStruts,Jsp,Servlet
Struts,Jsp,Servlet
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
 
Strutsjspservlet
Strutsjspservlet Strutsjspservlet
Strutsjspservlet
 
Intro To Mvc Development In Php
Intro To Mvc Development In PhpIntro To Mvc Development In Php
Intro To Mvc Development In Php
 
T5 Oli Aro
T5 Oli AroT5 Oli Aro
T5 Oli Aro
 
Silver Light By Nyros Developer
Silver Light By Nyros DeveloperSilver Light By Nyros Developer
Silver Light By Nyros Developer
 
From Developer to Production, Promoting your Webservices
From Developer to Production, Promoting your WebservicesFrom Developer to Production, Promoting your Webservices
From Developer to Production, Promoting your Webservices
 
Introduction To ASP.NET MVC
Introduction To ASP.NET MVCIntroduction To ASP.NET MVC
Introduction To ASP.NET MVC
 
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
[DSBW Spring 2009] Unit 07: WebApp Design Patterns & Frameworks (3/3)
 
Internet Explorer 8 for Developers by Christian Thilmany
Internet Explorer 8 for Developers by Christian ThilmanyInternet Explorer 8 for Developers by Christian Thilmany
Internet Explorer 8 for Developers by Christian Thilmany
 
Microformats HTML to API
Microformats HTML to APIMicroformats HTML to API
Microformats HTML to API
 
Jsfandsecurity
JsfandsecurityJsfandsecurity
Jsfandsecurity
 
5 Reasons To Love CodeIgniter
5 Reasons To Love CodeIgniter5 Reasons To Love CodeIgniter
5 Reasons To Love CodeIgniter
 
Grails and Dojo
Grails and DojoGrails and Dojo
Grails and Dojo
 

Mehr von Matt Raible

Mehr von Matt Raible (20)

Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022
Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022
Keep Identities in Sync the SCIMple Way - ApacheCon NA 2022
 
Micro Frontends for Java Microservices - Belfast JUG 2022
Micro Frontends for Java Microservices - Belfast JUG 2022Micro Frontends for Java Microservices - Belfast JUG 2022
Micro Frontends for Java Microservices - Belfast JUG 2022
 
Micro Frontends for Java Microservices - Dublin JUG 2022
Micro Frontends for Java Microservices - Dublin JUG 2022Micro Frontends for Java Microservices - Dublin JUG 2022
Micro Frontends for Java Microservices - Dublin JUG 2022
 
Micro Frontends for Java Microservices - Cork JUG 2022
Micro Frontends for Java Microservices - Cork JUG 2022Micro Frontends for Java Microservices - Cork JUG 2022
Micro Frontends for Java Microservices - Cork JUG 2022
 
Comparing Native Java REST API Frameworks - Seattle JUG 2022
Comparing Native Java REST API Frameworks - Seattle JUG 2022Comparing Native Java REST API Frameworks - Seattle JUG 2022
Comparing Native Java REST API Frameworks - Seattle JUG 2022
 
Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022
Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022
Reactive Java Microservices with Spring Boot and JHipster - Spring I/O 2022
 
Comparing Native Java REST API Frameworks - Devoxx France 2022
Comparing Native Java REST API Frameworks - Devoxx France 2022Comparing Native Java REST API Frameworks - Devoxx France 2022
Comparing Native Java REST API Frameworks - Devoxx France 2022
 
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...
Lock That Sh*t Down! Auth Security Patterns for Apps, APIs, and Infra - Devne...
 
Native Java with Spring Boot and JHipster - Garden State JUG 2021
Native Java with Spring Boot and JHipster - Garden State JUG 2021Native Java with Spring Boot and JHipster - Garden State JUG 2021
Native Java with Spring Boot and JHipster - Garden State JUG 2021
 
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
Mobile App Development with Ionic, React Native, and JHipster - Connect.Tech ...
 
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...
Lock That Shit Down! Auth Security Patterns for Apps, APIs, and Infra - Joker...
 
Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021Java REST API Framework Comparison - UberConf 2021
Java REST API Framework Comparison - UberConf 2021
 
Native Java with Spring Boot and JHipster - SF JUG 2021
Native Java with Spring Boot and JHipster - SF JUG 2021Native Java with Spring Boot and JHipster - SF JUG 2021
Native Java with Spring Boot and JHipster - SF JUG 2021
 
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
Reactive Java Microservices with Spring Boot and JHipster - Denver JUG 2021
 
Get Hip with JHipster - Colorado Springs Open Source User Group 2021
Get Hip with JHipster - Colorado Springs Open Source User Group 2021Get Hip with JHipster - Colorado Springs Open Source User Group 2021
Get Hip with JHipster - Colorado Springs Open Source User Group 2021
 
JHipster and Okta - JHipster Virtual Meetup December 2020
JHipster and Okta - JHipster Virtual Meetup December 2020JHipster and Okta - JHipster Virtual Meetup December 2020
JHipster and Okta - JHipster Virtual Meetup December 2020
 
Java REST API Comparison: Micronaut, Quarkus, and Spring Boot - jconf.dev 2020
Java REST API Comparison: Micronaut, Quarkus, and Spring Boot - jconf.dev 2020Java REST API Comparison: Micronaut, Quarkus, and Spring Boot - jconf.dev 2020
Java REST API Comparison: Micronaut, Quarkus, and Spring Boot - jconf.dev 2020
 
Security Patterns for Microservice Architectures - SpringOne 2020
Security Patterns for Microservice Architectures - SpringOne 2020Security Patterns for Microservice Architectures - SpringOne 2020
Security Patterns for Microservice Architectures - SpringOne 2020
 
Security Patterns for Microservice Architectures - ADTMag Microservices & API...
Security Patterns for Microservice Architectures - ADTMag Microservices & API...Security Patterns for Microservice Architectures - ADTMag Microservices & API...
Security Patterns for Microservice Architectures - ADTMag Microservices & API...
 
Microservices for the Masses with Spring Boot, JHipster, and OAuth - South We...
Microservices for the Masses with Spring Boot, JHipster, and OAuth - South We...Microservices for the Masses with Spring Boot, JHipster, and OAuth - South We...
Microservices for the Masses with Spring Boot, JHipster, and OAuth - South We...
 

Kürzlich hochgeladen

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Victor Rentea
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Kürzlich hochgeladen (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
Biography Of Angeliki Cooney | Senior Vice President Life Sciences | Albany, ...
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 

Apache Roller, Acegi Security and Single Sign-on

  • 1. Apache Roller, Acegi Security and Single Sign-on Matt Raible matt@raibledesigns.com http://raibledesigns.com © 2007 Raible Designs, Inc.
  • 2. Today’s Agenda Introductions Integrating Roller with LDAP and CAS on Tomcat Introduction to Acegi Security Introduction to Apache Roller Conclusions Q and A © 2007 Raible Designs, Inc.
  • 3. Introductions Do you blog? Do you use Roller or JRoller? What do you want to get from this session? Experience with Acegi Security, LDAP, or SSO Solutions? Preferred Server: Tomcat, Geronimo, JBoss or GlassFish? © 2007 Raible Designs, Inc.
  • 4. Who is Matt Raible? One of the first Roller users and Committers - started in August 2002 Java Blogger since 2002 Power user of Java Web Frameworks Author of Spring Live and Pro JSP 2.0 Founder of AppFuse (http://appfuse.org) Member of Java EE 5, JSF 1.2 and Bean Validation Expert Groups © 2007 Raible Designs, Inc.
  • 5. Integrating Roller with CAS on Tomcat http://cwiki.apache.org/confluence/display/ROLLER/Roller+4.0+with+LDAP+and+CAS © 2007 Raible Designs, Inc.
  • 6. Installing Roller on Apache Geronimo http://cwiki.apache.org/confluence/display/ROLLER/Roller+4.0+on+Geronimo © 2007 Raible Designs, Inc.
  • 7. Acegi Security A powerful, flexible security solution for enterprise software, with a particular emphasis on applications that use Spring. © 2007 Raible Designs, Inc.
  • 8. J2EE’s CMA Container Managed Authentication (CMA) built into the Servlet API Configure security-constraints in web.xml Configure Authentication Realm in your application server © 2007 Raible Designs, Inc.
  • 9. Form Authentication <security-constraint> <web-resource-collection> <web-resource-name>Secure Area</web-resource-name> <url-pattern>*.html</url-pattern> </web-resource-collection> <auth-constraint> <role-name>*</role-name> </auth-constraint> </security-constraint> <login-config> <auth-method>FORM</auth-method> <form-login-config> <form-login-page>/login.jsp</form-login-page> <form-error-page>/loginError.jsp</form-error-page> </form-login-config> </login-config> © 2007 Raible Designs, Inc.
  • 10. Form Authentication /login.jsp <form id=quot;loginFormquot; method=quot;postquot; action=quot;j_security_checkquot;> <p> <label for=quot;j_usernamequot;>Username:</label> <input type=quot;textquot; name=quot;j_usernamequot; id=quot;j_usernamequot;/><br/> <label for=quot;j_passwordquot;>Password:</label> <input type=quot;passwordquot; name=quot;j_passwordquot; id=quot;j_passwordquot;/> <button type=quot;submitquot;>Login</button> </p> </form> /loginError.jsp <p> Login failed - please <a href=quot;index.jspquot;>try again</a>. </p> © 2007 Raible Designs, Inc.
  • 11. Tomcat Realms MemoryRealm, JDBCRealm, DataSourceRealm, JAASRealm, JNDIRealm JDBCRealm Example: <Context path=quot;quot; docBase=quot;rollerquot; debug=quot;99quot; reloadable=quot;truequot; antiJARLocking=quot;truequot; antiResourceLocking=quot;truequot;> <Realm className=quot;org.apache.catalina.realm.JDBCRealmquot; debug=quot;99quot; driverName=quot;com.mysql.jdbc.Driverquot; connectionURL=quot;jdbc:mysql://localhost/roller?autoReconnect=truequot; connectionName=quot;rootquot; connectionPassword=quot;quot; userTable=quot;usersquot; userNameCol=quot;usernamequot; userCredCol=quot;passwordquot; userRoleTable=quot;user_rolesquot; roleNameCol=quot;rolenamequot;/> </Context> © 2007 Raible Designs, Inc.
  • 12. Problems with CMA Not as portable as you’d think Every server has proprietary configuration Form-based authentication problems: Often can’t control SQL for user/role query No way to filter on /j_security_check to trap when users first login Implementation different on various servers However - Vendors love it! © 2007 Raible Designs, Inc.
  • 13. Solution: Acegi Security Everything can be configured in your application Secure URLs by role with regular expressions URL patterns can be regular expressions or Ant-style patterns (i.e. /**/admin*.html) Authentication methods supported: Basic, Digest, Form, Yale Central Authentication Service (CAS) Authentication Providers: JDBC, XML, LDAP, CAS © 2007 Raible Designs, Inc.
  • 14. Configuration: web.xml <filter> <filter-name>securityFilter</filter-name> <filter-class>org.acegisecurity.util.FilterToBeanProxy</filter-class> <init-param> <param-name>targetClass</param-name> <param-value>org.acegisecurity.util.FilterChainProxy</param-value> </init-param> </filter> <filter-mapping> <filter-name>securityFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> © 2007 Raible Designs, Inc.
  • 15. security.xml The filterChainProxy bean contains the filter list that will process the authentication process. These filters each perform specific duties: httpSessionContextIntegrationFilter: This filter is responsible for communicating with the user's session to store the user's authentication in the SecurityContextHolder. basicProcessingFilter: This filter processes an HTTP request's BASIC authorization headers, placing the result into the SecurityContextHolder. exceptionTranslationFilter: Defines exceptions and entry point (URL and SSL) © 2007 Raible Designs, Inc.
  • 16. security.xml <bean id=quot;filterChainProxyquot; class=quot;org.acegisecurity.util.FilterChainProxyquot;> <property name=quot;filterInvocationDefinitionSourcequot;> <value> CONVERT_URL_TO_LOWERCASE_BEFORE_COMPARISON PATTERN_TYPE_APACHE_ANT /**=httpSessionContextIntegrationFilter,authenticationProcessingFilter, remoteUserFilter,rememberMeProcessingFilter,anonymousProcessingFilter, exceptionTranslationFilter,filterInvocationInterceptor </value> </property> </bean> © 2007 Raible Designs, Inc.
  • 17. Form Authentication Changing from Basic to Form-based authentication is just XML configuration Login and Error pages can be same as CMA pages No code needed to support Remember Me and Password Encryption - just XML Can configure SSL “channels” based on URL-pattern © 2007 Raible Designs, Inc.
  • 18. Authentication Providers Custom: write your own In-Memory: credentials in XML file JAAS: provided by LoginModule JDBC: credentials in database LDAP: credentials in database OpenID: experimental support, see SEC-432 Windows NT: experimental support, see SEC-8 SSO: Yale’s CAS, SiteMinder © 2007 Raible Designs, Inc.
  • 19. Authentication Providers <bean id=quot;daoAuthenticationProviderquot; class=quot;org.acegisecurity.providers.dao.DaoAuthenticationProviderquot;> <property name=quot;userDetailsServicequot; ref=quot;inMemoryDaoImplquot;/> </bean> ... <bean id=quot;inMemoryDaoImplquot; class=quot;org.acegisecurity.providers.dao.memory.InMemoryDaoImplquot;> <property name=quot;userMapquot;> <value> tomcat=tomcat,ROLE_USER springlive=springlive,ROLE_USER </value> </property> </bean> © 2007 Raible Designs, Inc.
  • 20. Password Encryption bean id=quot;inMemoryDaoImplquot; class=quot;org.acegisecurity.providers.dao.memory.InMemoryDaoImplquot;> <property name=quot;userMapquot;> <value> tomcat=536c0b339345616c1b33caf454454d8b8a190d6c,ROLE_USER springlive=2a9152cff1d25b5bbaa3e5fbc7acdc6905c9f251,ROLE_USER </value> </property> </bean> <bean id=quot;daoAuthenticationProviderquot; class=quot;org.acegisecurity.providers.dao.DaoAuthenticationProviderquot;> <property name=quot;userDetailsServicequot; ref=quot;inMemoryDaoImplquot;/> <property name=quot;passwordEncoderquot; ref=quot;passwordEncoderquot;/> </bean> <bean id=quot;passwordEncoderquot; class=quot;org.acegisecurity.providers.encoding.ShaPasswordEncoderquot;/> © 2007 Raible Designs, Inc.
  • 21. JDBC Provider To use JDBC, just define a bean with a dataSource dependency: <bean id=quot;jdbcDaoImplquot; class=quot;org.acegisecurity.providers.dao.jdbc.JdbcDaoImplquot;> <property name=quot;dataSourcequot; ref=quot;dataSourcequot;/> </bean> Default SQL for select users and roles: quot;SELECT username,password,enabled FROM users WHERE username = ?quot;; quot;SELECT username,authority FROM authorities WHERE username = ?quot;; © 2007 Raible Designs, Inc.
  • 22. Cool Features Event Listeners SecurityContextAwareRequestFilter Secure Methods by Role Remember Me SSL Switching © 2007 Raible Designs, Inc.
  • 23. Other Features Anonymous Filter: Creates Authentication object with anonymous user information Access Control Lists (ACLs): Control permissions per object AfterMethodInvocation Interceptor: Removes objects from collections when user can’t read them © 2007 Raible Designs, Inc.
  • 24. J2EE vs. Acegi Security Security Framework Pros Cons It is easy to set up from an It can be difficult to port from J2EE Security application perspective. one application server to the other. User Realm configuration is in the hands of the deployer. Even though the application- developer configuration is Because it's a standard, many standardized, the realm sources of documentation are configuration for servers is not. available. Service layer methods can only be secured if using EJBs. © 2007 Raible Designs, Inc.
  • 25. J2EE vs. Acegi Security Security Framework Pros Cons Acegi Security Security configuration is completely self- It requires a lot of XML to contained in the application – you don't configure. have to worry about application server portability. The learning curve can be a little steep and seem It solves many of the shortcomings of J2EE overwhelming at first. security and allows all the same things, with the option to customize. Realm information is packaged It supports single sign-on with CAS. with the application, making it tough for a deployer to change. It’s evolving and improving very rapidly. It allows you to secure methods of any Spring-managed bean and filtering objects based on their ACLs. © 2007 Raible Designs, Inc.
  • 26. Apache Roller What is Apache Roller? Installing Roller Roller Architecture Blog Customization Server Customization Other Features: Clients and Planet © 2007 Raible Designs, Inc.
  • 27. What is Apache Roller? Apache Roller is a full-featured, multi-user and group- blog server suitable for blog sites large and small Cool Features: Multi-user and Group blogging Comment moderation and spam prevention Complete control over UI with templates Built-in Search RSS 2.0 and Atom 1.0 Support © 2007 Raible Designs, Inc.
  • 28. History Started by Dave Johnson in 2000 as “Homeport” http://rollerweblogger.org/roller/date/20021231 © 2007 Raible Designs, Inc.
  • 29. History of Roller In 2002, Dave ditched EJBs and HAHTsite IDE for open source tools (Ant, Castor, Struts, and Velocity) April 5, 2002: Roller 0.9.0 Released April 17, 2002: O’Reilly Article “Building an Open Source J2EE Weblogger” Published July 31 - August 7, 2002: The world starts blogging with Roller http://rollerweblogger.org/roller/date/20021231 © 2007 Raible Designs, Inc.
  • 30. Roller since 2002 Roller now powers jroller.com, blogs.sun.com, IBM developerWorks blogs and many others Dave hired by Sun to work on Roller full-time in September 2004 Roller began incubation at Apache in June 2005 April 23, 2007: Graduated and released 3.1 © 2007 Raible Designs, Inc.
  • 31. But what is Roller? Roller is a blogging engine Blogs make web publishing easy Everyone can do it No need for IT or Webmasters Tools are in the users hands Feeds make reading blogs easy Feeds are XML-based: RSS or Atom You subscribe to a feed in a Feed Reader Feed Readers are like inboxes for the web © 2007 Raible Designs, Inc.
  • 32. Posting a Weblog Entry © 2007 Raible Designs, Inc.
  • 33. Viewing a Weblog Entry © 2007 Raible Designs, Inc.
  • 34. Reading a Weblog Entry © 2007 Raible Designs, Inc.
  • 35. Why choose Roller? Proven, full-featured blogging solution for big sites Used by Sun, IBM, Yale University, Covalent and ESRI Open Source and Apache Licensed Active and growing community at Apache Standard Java Web Application Architecture © 2007 Raible Designs, Inc.
  • 36. Why choose Roller? It works great if you know what you’re doing Nice looking example sites: http://blogs.sun.com/greimer http://blogs.sun.com/jonathan http://blogs.usd.edu/jrbethke http://rollerweblogger.org/roller http://raibledesigns.com http://ryandelaplante.com Awesome themes at http://rollerthemes.com! © 2007 Raible Designs, Inc.
  • 37. Installing Roller Download Roller 3.1 from http://cwiki.apache.org/ confluence/display/ROLLER/Roller+Downloads Download Hibernate and other JARs from https:// roller.dev.java.net/servlets/ProjectDocumentList? folderID=6962 Copy JARs from java.net download into apache- roller-3.1/webapp/roller/WEB-INF/lib 37 © 2007 Raible Designs, Inc.
  • 38. Installing Roller: Java & Download and Install Java 5 from: http://java.sun.com/javase/downloads Download and install MySQL 5 from: http://dev.mysql.com/downloads Create database with files in WEB-INF/dbscripts: mysqladmin -u root -p create roller cd webapp/roller/WEB-INF/dbscripts/mysql mysql -u root -p roller < createdb.sql NOTE: Use /WEB-INF/classes/dbscripts in Roller 4.0. © 2007 Raible Designs, Inc.
  • 39. Installing Roller: Tomcat Download and install Tomcat 6 from: http://tomcat.apache.org/download-60.cgi Copy apache-roller-3.1/webapp/roller to $CATALINA_HOME/webapps/ROOT Copy activation.jar, mail.jar and mysql-connector- java-5.0.3-bin.jar to $CATALINA_HOME/lib (common/lib for Tomcat 5.x) » continued on next page © 2007 Raible Designs, Inc.
  • 40. Installing Roller: Tomcat Create ROOT/META-INF/context.xml with the following contents: <Context path=quot;quot; reloadable=quot;falsequot; antiJARLocking=quot;truequot; antiResourceLocking=quot;falsequot; allowLinking=quot;truequot;> <Resource name=quot;jdbc/rollerdbquot; auth=quot;Containerquot; type=quot;javax.sql.DataSourcequot; maxActive=quot;20quot; maxIdle=quot;10quot; maxWait=quot;100quot; driverClassName=quot;com.mysql.jdbc.Driverquot; username=quot;rootquot; password=quot;quot; url=quot;jdbc:mysql://localhost/rollerquot;/> <Resource name=quot;mail/Sessionquot; auth=quot;Containerquot; type=quot;javax.mail.Sessionquot; mail.smtp.host=quot;localhostquot; /> </Context> © 2007 Raible Designs, Inc.
  • 41. Roller Install: Startup Start Tomcat and create your weblog at http:/localhost:8080 © 2007 Raible Designs, Inc.
  • 42. Create a User 42 © 2007 Raible Designs, Inc.
  • 43. Create a Weblog 43 © 2007 Raible Designs, Inc.
  • 44. The obligatory first post 44 © 2007 Raible Designs, Inc.
  • 45. Roller Architecture: Web UI via Java Servlets and JSP Front controller, Web MVC and Open Session In View patterns Persistence via JDBC Factory, Façade and Data Mapper patterns 45 © 2007 Raible Designs, Inc.
  • 46. Roller Architecture: Geek Roller Web: Web and UI Layer Editor UI via Struts and JSP, blog and feed rendering via Velocity Feed parsing via ROME, Blogger API via Apache XML-RPC Roller Beans: Business and Persistence Layer Hibernate/JPA for DBMS, Lucene for search 46 © 2007 Raible Designs, Inc.
  • 47. What’s New in Roller 4.0 Easier Theme Customization Easy Installation Java 5, Open JPA and Struts 2 http://cwiki.apache.org/confluence/display/ROLLER/ What%27s+New+in+Roller+4.0 © 2007 Raible Designs, Inc.
  • 48. Conclusion © 2007 Raible Designs, Inc.
  • 49. Conclusion © 2007 Raible Designs, Inc.
  • 50. Conclusion Rocks! © 2007 Raible Designs, Inc.
  • 51. Conclusion Rocks! Apache Roller is a full-featured blogging system © 2007 Raible Designs, Inc.
  • 52. Conclusion Rocks! Apache Roller is a full-featured blogging system Installing Roller is Easy © 2007 Raible Designs, Inc.
  • 53. Conclusion Rocks! Apache Roller is a full-featured blogging system Installing Roller is Easy Integrating with SSO is Painless © 2007 Raible Designs, Inc.
  • 54. Conclusion Rocks! Apache Roller is a full-featured blogging system Installing Roller is Easy Integrating with SSO is Painless Blogging is fun - and great for your career! © 2007 Raible Designs, Inc.
  • 55. Additional Resources Acegi Security Forums: http://forum.springframework.org/ forumdisplay.php?f=33 Yale’s CAS: http://ja-sig.org/products/cas/ community/lists/index.html Roller User Mailing List: user@roller.apache.org 49 © 2007 Raible Designs, Inc.
  • 56. Questions? matt@raibledesigns.com http://raibledesigns.com Download presentation from: http://raibledesigns.com/rd/page/publications © 2007 Raible Designs, Inc.