Access to Hpc API c# while using smart card - HPC 2008 R2 RRS feed

  • Question

  • hi,

    in HPC 2008R2 we are going to use smart card to access the HPC.

    i wanted to know how to change my c# methods so they will access the hpc api without a password (with smart card, there is user name and no password).

    for example, how do i submit a job?

    thanks in advanced,


    Tuesday, August 2, 2011 7:24 AM

All replies

  • Hi Ben,

    Windows HPC Server 2008 R2 SP2 introduced support for smart card authentication. Here's the overview of how this feature works and what are the setup steps: http://technet.microsoft.com/en-us/library/hh184316(WS.10).aspx#BKMK_softcard

    With SP2 there are also new .NET APIs related to Smart Cards authentication support. As per document above, users that don't have passwords will now use softcard certificates for authentication. These have to be cached in order to submit jobs with use of the following APIs:

    - IScheduler.SetCertificateCredentials()
    - IScheduler.SetCertificateCredentialsPfx()

    where first one accepts certificate thmubprint (certificate has to be located in user's personal certificate store). Second one can import certficate from PFX provided as an array of bytes. When softcard is cached for the user, you can submit job by simply calling IScheduler.SubmitJob(job, null, null), where null value is passed for username and password parameters.
    There are also some helper methods like:
    - IScheduler.EnrollCertificate() - helps to create new softcard certificate, same as 'hpccred createcert' cmdline,
    - IScheduler.GetCertificateFromStore() - helps to export generated certificate.
    Please let me know if you have any questions.


    Wednesday, August 3, 2011 1:52 PM
  • We are in the process of trying to setup HPC Pack SP2 to support Soft Cards, but can't get it to work at all.  We get an access denied error when we do "hpcreds setcreds".  Is there a configuration document that gives step by step instructions on how to set it up per Microsoft's recommendations?




    Friday, August 5, 2011 2:07 PM