Your question is Certificate Rotation Automation. Start with the requirements on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Can you write a function to automate the rotation and validation of expired security certificates across multiple cloud environments?
Implement rotate_and_validate(certificates, now, rotation_window, policies). Return actions only for certificates expiring at or before now + rotation_window, sorted by cloud, environment, service, and certificate ID. A replacement is valid when its ID is new and unique, it references the original certificate, matches cloud, environment, and service, expires later, and satisfies that cloud's issuer and key-type policy. Return rotated or blocked with a specific reason.
def rotate_and_validate(certificates, now, rotation_window, policies):