1 Reply Latest reply on Jun 13, 2014 11:20 AM by pcraveiro

    PicketLink com RolesAllowed

    dal.lira

      (Sorry about the poor and rust english)

       

      Hello

       

      I'm implementing an environment with multiple services SSO with picketlink, but for the size of the project is too much trouble configure the pages that should be protected and necessary roles in web.xml.

      As our implementation is based on CDI, we try to make changes that allow we use annotations like @ RolesAllowed, which restricts access to specific methods in backing beans.

      Our problem lies in the fact that when a user has not logged in and tries to access a method annotated with @ RolesAllowed we like to programmatically redirect it to IDP for authentication, but we could not figure out a way to accomplish this.

      Any help or direction that we can follow is very welcome.

       

      Thanks

       

      ------------------------------------------------------------------------------------

       

      Ola

       

      Estou implementando uma ambiente de vários serviços com SSO com o picketlink, mas para o tamanho do projeto fica quase enviável configurar as páginas que devem ser protegidas e os roles necessários no web.xml.

      Como nossa implementação é baseada em CDI, tentamos realizar alterações que permitam utilizarmos de anotações como a @RolesAllowed, que restringe o acesso de métodos em backing beans específicos.

      Nosso problema fica no fato que quando um usuário ainda não esta logado e tenta acessar um método anotado com @RolesAllowed gostaríamos de programaticamente redirecionar o mesmo ao IDP para autenticação, mas não conseguimos verificar uma forma de conseguir isso.

      Qualquer ajuda ou direção que poderíamos seguir é muito bem vindo.

       

      Grato.

       

      ---------------------------------------------------------------

        • 1. Re: PicketLink com RolesAllowed
          pcraveiro

          Hi Diego,

           

              In theory, your beans would never be called if the user is not authenticated. I think the valve kicks in first, and automatically redirect the user to the IdP.

           

              Why don't you use only a small set of roles to tell that an user can access or not a SP ? And leave the rest to perform a more fine-grained authorization once you retrieve them from the SAML assertion ?

           

          Regards.