1 Reply Latest reply on May 25, 2006 9:54 AM by chris griffith

    Adding Role to container managed security if client  has a s

    Jochen Unger Newbie

      Hi everyone,

      i like to use the container managed security with a FORM-Login and a DatabaseLoginModule. In addition to that, i want to add a Role to those clients which do their request from a specified IP-Range.

      To do that i configured a filter in which i call the LoginContext to a custom LoginModule. This Module takes the IP-address an does the login. I get the suggested Subject-Object, in wich my Roles are defined.

      Now in the one way i want to create a UserPriciple with the included roles if no User already exists. In the other way, if the client uses the login-form the role associated with the IP should be added to UserPrinciple created by the login-form.

      Is this possible? How can i add Roles to an already created Subject? Does anyone have an idea, how to get this scenario work? Is there already a filter, wich can handle IP-based authetication?

      Thanks for help