Package edu.ucsb.cs.scaffold.jobs
Class RotatePatKeysJob
java.lang.Object
edu.ucsb.cs.scaffold.jobs.RotatePatKeysJob
- All Implemented Interfaces:
edu.ucsb.cs156.jobs.services.JobContextConsumer
public class RotatePatKeysJob
extends Object
implements edu.ucsb.cs156.jobs.services.JobContextConsumer
Re-encrypts every stored PAT under the current PAT_ENCRYPTION_KEY. Launched by an admin (POST
/api/jobs/launch/rotatePatKeys) after the key rotation script has moved the retiring key to
PREVIOUS_PAT_ENCRYPTION_KEY and installed a new PAT_ENCRYPTION_KEY; see
docs/PAT_ENCRYPTION_KEY_instructions.md.
Credentials already on the current key version are skipped, so the job is idempotent and can simply be re-launched after a partial failure. A credential whose key version has no configured key (e.g. PREVIOUS_PAT_ENCRYPTION_KEY was removed too early) is logged and skipped rather than failing the whole job; that user must re-enter their PAT.
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface edu.ucsb.cs156.jobs.services.JobContextConsumer
getJobName, getScopeId, getScopeType
-
Constructor Details
-
RotatePatKeysJob
public RotatePatKeysJob()
-
-
Method Details
-
accept
- Specified by:
acceptin interfaceedu.ucsb.cs156.jobs.services.JobContextConsumer- Throws:
Exception
-