— Jobs on the Grid require security credentials throughout their run for accessing secure Grid resources, such as GridFTP data repositories. However, delegating long-lived credentials to long-running jobs brings an increased risk that a credential will be compromised and misused. Additionally, it is often difficult to predict the run-time of jobs on the Grid, due to changes in application performance and resource load, making it difficult to set the lifetime of the delegated credential in advance. We have developed a solution to this problem for the EU DataGrid project using the MyProxy online credential repository and have further evolved it during the EGEE project. Users store their long-lived credentials in a dedicated MyProxy server and delegate short-lived credentials to their jobs. When a job’s credential nears expiration, the Workload Management System retrieves a new short-lived credential from the MyProxy server on the user’s behalf and uses it to refresh the job’s c...