Loading ...
Sorry, an error occurred while loading the content.

Method authorization

Expand Messages
  • supertux1
    Hi, I m writing a system to do method authorization. Applications will be authenticated via SSL client/server certificates. Authorization information will be
    Message 1 of 1 , Jul 24, 2003
    • 0 Attachment
      Hi,

      I'm writing a system to do method authorization.

      Applications will be authenticated via SSL client/server
      certificates. Authorization information will be stored
      in an LDAP server.

      Before calling the desired method, an authorization
      check is done to make sure that the application is allowed
      to call that particular class and method.

      If all is well, then the results of the method are returned
      as in a normal soap call, otherwise a soap fault will be returned.

      In order to do the authorization BEFORE the SOAP call is
      performed, I need to get the username and IP address, which
      are easily plucked from $ENV. The hard part is finding out
      which particular class and method the SOAP call wants.

      I think I'm half way there, but it's not quite working
      and it's probably got something to do with how I access
      the serializer.

      Here's the CGI:

      #!/usr/bin/perl

      use SOAP::Transport::HTTP;
      use UWDS::Auth;

      my $server = SOAP::Transport::HTTP::CGI;


      ## I think the next line is wrong? How do I get $req for
      ## find_target?

      my $req = $server->serializer;
      ($class,$uri,$name) = $server->find_target($req);

      my $auth = new UWDS::Auth;
      my $is_authorized = $auth->is_authorized($class,$uri,$name,$user,$ip);

      if ($is_authorized) {
      $server->dispatch_to('Demo')->handle;
      } else {
      .
      .
      .
      }


      package Demo;

      sub hi {
      return "hello, world";
      }

      sub bye {
      return "goodbye, cruel world";
      }


      1;


      Any help would be appreciated ... thanks!
    Your message has been successfully submitted and would be delivered to recipients shortly.