3 Replies Latest reply on Oct 31, 2007 5:30 AM by ropalka

    restrict access to one ip

    szaccaria

      Hi to all,
      How I can restric my web service only to restrict range of ip ?
      i've read about in http://wiki.jboss.org/wiki/Wiki.jsp?page=RMIClassLoadingService
      where be spoken about secure... is the right way?

      thanks in advance

        • 1. Re: restrict access to one ip
          ropalka

          Hi,

          you could implement JBossWS server side handler.
          This handler have method handleMessage(MessageContext).
          The MessageContext object has property SERVLET_REQUEST,
          through which you can obtain the underlying ServletRequest object.
          And on ServletRequest object there are a methods like:
          * getRemoteAddr()
          * getRemoteHost()
          which you can use for IP filtering purposes ;-)

          Richard

          • 2. Re: restrict access to one ip
            szaccaria

            Thanks Richard,
            your suggest it be a good choice but have you got some example? I made the ws with seam and annotation, and deploy to jbossAS, now how can implement the JBossWS server side handler in this case?

            • 3. Re: restrict access to one ip
              ropalka

              Hi,

              you can download JBossWS sources and take a look to org.jboss.ws.extensions.addressing.jaxws.WSAddressingServerHandler.
              It could be a good starting point for you ;-)

              Richard