Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

Authentication using the AuthSample and stax

Help
Anonymous
2012-12-04
2013-06-12

  • Anonymous
    2012-12-04

    I’m using user based authentication using the AuthSample on a farm with several machines
    The authentication works just fine when I’m directly execute processes on a remote machines.

    STAF local HANDLE AUTHENTICATE USER user CREDENTIALS password
    staf remote process start command winver

    for instance.

    But when I try to use a stax script creating this process on the remote machine


                <process name="'winver'">
                    <location>'remote'</location>
                    <command>'winver.exe'</command>
                </process>

    STAF local HANDLE AUTHENTICATE USER user CREDENTIALS password
    STAF local STAX EXECUTE FILE sample.xml" WAIT RETURNRESULT

    The process failed to start, RC: 25, STAFResult: Trust level 5 required for the PROCESS service's START request
    Requester has trust level 1 on machine remote
    Requesting machine: ssl://local
    Requesting user   : none://anonymous

    Seems like stax is creating a new handle for that process, which is not authenticated.
    Shouldn’t this inherit the credentials?
    (BTW: <location>'local'</location> works)

    Am I doing anything wrong?

    Thanks!
    Hartmut

     
  • Sharon Lucas
    Sharon Lucas
    2012-12-05

    The STAX service creates a new STAF handle for each new STAX job and uses it to submit STAF service requests for that job.  The new STAF handle created for a STAX job does not "inherit" credentials from the STAF handle that submitted the STAX EXECUTE request.

    For example, if your local systems is Windows:

    C:\&gt;STAF local CREATE HANDLE NAME MyHandle
    C:\&gt;set STAF_STATIC_HANDLE=nn    (set to whatever the handle# that the CREATE HANDLE request created)
    C:\&gt;STAF local HANDLE AUTHENTICATE USER user1 CREDENTIALS password1
    C:\&gt;STAF local STAX EXECUTE FILE "C:/stax/sample.xml" WAIT RETURNRESULT

    This results in using the authenticated handle (in this case named MyHandle) to submit the STAX EXECUTE request on the local machine.  However, this has no effect on the STAF handle that the STAX job creates at the beginning of the job and uses to submit STAF service requests like a PROCESS START request to a remote machine.

     

  • Anonymous
    2012-12-05

    So how would I authenticate the handle STAX creates for the

               <process name="'winver'">
                    <location>'remote'</location>
                    <command>'winver.exe'</command>
                </process>

    command to be executed on the remote machine?

    Or is that just impossible?
    Any ideas or recommendations?

    I'd not be afraid of modifying AuthSample if necessary.

     
  • Sharon Lucas
    Sharon Lucas
    2012-12-05

    Can't think of a way to do this via a <process> element in a STAX job.

    You could submit a new STAF Feature Request for this.