The Artima Developer Community
Sponsored Link

Java Buzz Forum
Security with dynamic configuration in MVC frameworks such as NanoWeb

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Simon Brown

Posts: 636
Nickname: simonbrown
Registered: Jun, 2003

Simon Brown is a Java developer, architect and author.
Security with dynamic configuration in MVC frameworks such as NanoWeb Posted: Aug 3, 2004 3:22 AM
Reply to this message Reply

This post originated from an RSS feed registered with Java Buzz by Simon Brown.
Original Post: Security with dynamic configuration in MVC frameworks such as NanoWeb
Feed Title: Simon Brown's weblog
Feed URL: http://www.simongbrown.com/blog/feed.xml?flavor=rss20&category=java
Feed Description: My thoughts on Java, software development and technology.
Latest Java Buzz Posts
Latest Java Buzz Posts by Simon Brown
Latest Posts From Simon Brown's weblog

Advertisement

There's been a lot of talk about NanoWeb (a good article and some blog entries) and it's a nice little project. However, there's one thing that will stop a lot of people using it. Well, perhaps only for big systems and in fact this isn't really just related to NanoWeb because I've seen a few web applications built on custom MVC frameworks that suffer the same problem.

Although most MVC frameworks need to be configured with the mappings between action names and their corresponding implementation classes, one of the benefits is that you explicitly control access to these actions from the outside world. With Struts, you might map login.do to a class called LoginAction. Although it's slightly more work in development, this explicit mapping limits what users can call via their browser. Unfortunately the world has gone XML crazy, but these config files don't have to be XML, as illustrated here.

With dynamic configuration/dispatch, the code users can access via their web browser isn't explicitly limited. Essentially, because of the naming convention, it's possible to call any method on any arbitrary class (or Groovy script in this case) that has been deployed in the right place. This is also the case when you dynamically map from URLs like /actions/LoginAction to LoginAction.class, so it's a wider problem than just NanoWeb.

Of course, for many apps this just isn't a problem. However, if you're going to deploy to the Internet then I'd be wary, particularly if the app is open source. So how do you solve this? Well, to keep in the spirit of simplicity, perhaps you could annotate callable methods with a Java annotation (e.g. @web, @action or something) and have the build process build the mapping to allow dispatch to occur. There's probably a good compromise between security and ease of development yet to be found.

Read: Security with dynamic configuration in MVC frameworks such as NanoWeb

Topic: "WebLogic EJB, with some experience making calls on EJB's" Previous Topic   Next Topic Topic: RE: Is the language the only problem? and

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use