2 Replies Latest reply: Jul 12, 2012 3:17 PM by SagarChoudhary RSS

    OAM: policy syntax question, regarding URLs without trailing slash

    user554940
      I've been working with basic OAM policies for a little while now, and have seen some interesting behavior that I am trying to understand and solve. Let me start off by laying the scene.


      OAM 11.1.1.6

      The only policies in place are the default policies created: '/' and '/.../*'

      On the surface everything works as planned. My resources are protected as one would expect, for instance, requests to "http://myserver.com/happy/", prompt for authentication according to the configured policies, so all is well.

      My problem occurs when I request "http://myserver.com/happy" (notice the lack of trailing slash). I still have to jump through the login hoops, but it ends up dropping me off at an OAM error page.

      After doing some reading, it looks like the resource for '/' would match only "http://myserver.com/"

      After looking at what '...' represents.... (that is to say, any number of characters, truncated by a slash... and with the inclusion of the "*", basically, any resource, that is lower than the root level. For instance, "http://myserver.com/happy/joe/andsally/and/bob/and/terry.html", would be successfully protected.


      It seems like '/happy' (no trailing slash) wouldn't match either of the default mappings, so it lends itself to some funny behavior. I would think though, that I could create a resource like '/*', that would match a slash, and then any number of characters WITHOUT a trailing slash. With that resource, I would think I'd be able to protect the resource as planned.

      I tried that resource....and no luck. Am I missing a basic resource or policy caveat here?

      Thanks!

      --james