Credential Refresh for Long Running Jobs

CredentialManager service can also refresh the credential of a long running job. Firstly, CredentialManager service obtains all the job handles submitted to MasterForkManagedJobFactoryService (MFMJFS). Then, CredentialManager service queries the status of each job once per hour by default. If the credential of a job will expire within 2 hours and its identity is the same as the identity of the credential stored in CredentialManager service, a new credential with 12-hour-lifetime will be generated from the credential stored in CredentialManager service and used to refresh the soon-to-be-expired credential of that job. All the default values such as 12-hour-lifetime can be overwritten by specifying them in server-configure.wsdd file.

There are two options in init command related with credential refresh.

For example, if user wants CredentialManager service to refresh the credential of a long running job and he will submit his jobs to a MFMJFS running at http://127.0.0.1:8088, he may issue a init command as follows:
myproxy-cm init http://127.0.0.1:8080 songs test -refresh -jobmanager http://127.0.0.1:8088

The source code in mmjfs-3.2-src_bundle.tar.gz is changed to make credential refresh work. There is a mmjfs_src folder in the downloaded CredentialManager source code. In that folder there are three .java files and a mmjfs-3.2-src_bundle.tar.gz file. User should replace the original mmjfs-3.2-src_bundle.tar.gz with the one in the mmjfs_src folder. The .java files are the modified source code files and the modifications are discussed as follows.

It will be nice that the souce code can provide all the functionalities needed for credential refresh. And we do not need to modify the source code to refresh the credential for a long running job. We report Bug 1738 to ask for more features to support credential refresh.