Skill files5 files

references/

scripts/

SKILL.md97 lines
1
---
2
name: secrets-rotation
3
description: >
4
Implement automated secrets rotation for API keys, credentials, certificates,
5
and encryption keys. Use when managing secrets lifecycle, compliance
6
requirements, or security hardening.
7
---
8
9
# Secrets Rotation
10
11
## Table of Contents
12
13
- [Overview](#overview)
14
- [When to Use](#when-to-use)
15
- [Quick Start](#quick-start)
16
- [Reference Guides](#reference-guides)
17
- [Best Practices](#best-practices)
18
19
## Overview
20
21
Implement automated secrets rotation strategy for credentials, API keys, certificates, and encryption keys with zero-downtime deployment and comprehensive audit logging.
22
23
## When to Use
24
25
- API key management
26
- Database credentials
27
- TLS/SSL certificates
28
- Encryption key rotation
29
- Compliance requirements
30
- Security incident response
31
- Service account management
32
33
## Quick Start
34
35
Minimal working example:
36
37
```javascript
38
// secrets-manager.js
39
const AWS = require("aws-sdk");
40
const crypto = require("crypto");
41
42
class SecretsManager {
43
constructor() {
44
this.secretsManager = new AWS.SecretsManager({
45
region: process.env.AWS_REGION,
46
});
47
48
this.rotationSchedule = new Map();
49
}
50
51
/**
52
* Generate new secret value
53
*/
54
generateSecret(type = "api_key", length = 32) {
55
switch (type) {
56
case "api_key":
57
return crypto.randomBytes(length).toString("hex");
58
59
case "password":
60
// Generate strong password
61
const chars =
62
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789!@#$%^&*";
63
// ... (see reference guides for full implementation)
64
```
65
66
## Reference Guides
67
68
Detailed implementations in the `references/` directory:
69
70
| Guide | Contents |
71
|---|---|
72
| [Node.js Secrets Manager with Rotation](references/nodejs-secrets-manager-with-rotation.md) | Node.js Secrets Manager with Rotation |
73
| [Python Secrets Rotation with Vault](references/python-secrets-rotation-with-vault.md) | Python Secrets Rotation with Vault |
74
| [Kubernetes Secrets Rotation](references/kubernetes-secrets-rotation.md) | Kubernetes Secrets Rotation |
75
76
## Best Practices
77
78
### ✅ DO
79
80
- Automate rotation
81
- Use grace periods
82
- Verify new secrets
83
- Maintain rotation audit trail
84
- Implement rollback procedures
85
- Monitor rotation failures
86
- Use managed services (AWS Secrets Manager)
87
- Test rotation procedures
88
89
### ❌ DON'T
90
91
- Hardcode secrets
92
- Share secrets
93
- Skip verification
94
- Rotate without grace period
95
- Ignore rotation failures
96
- Store secrets in version control
97

© AJ Geddes · MIT · source · posted by @OpenSourceBuffGuy on promptparty.com

@OpenSourceBuffGuy

I find openly licensed prompts and post them here.

0 followers · 14,621 prompts

More by @OpenSourceBuffGuy

See all
Sea turtle carrying floating film studio island prompt image

Sea turtle carrying floating film studio island

Draws a giant sea turtle carrying a floating island film studio through a starry sky, where fairies polish rough film strips into golden film.

image-prompt, nano-banana, 3d-render, cartoon, fantasy-world, creatures, animals, whimsical, dreamy, cinematic, dramatic-lighting, vibrant-colors, bokeh, miniature, widescreen, night-scene, illustration, concept-art, surreal, storytelling, clay-3d

Desert buggy escapes drones past industrial outpost prompt image

Desert buggy escapes drones past industrial outpost

Builds a 15-second desert chase video where a racer in an armored buggy escapes drones past an industrial outpost, using five reference images with set jobs.

video-prompt, hailuo, action, multi-shot, timed-beats, camera-movement, reference-image, character-consistency, negative-prompt, cinematic, sci-fi, cars, landscape, aerial-view, tracking-shot, photorealistic, sound-effects, structured-output, long-form, widescreen

1 view
Cozy Pixel Art Farm Island Village prompt image

Cozy Pixel Art Farm Island Village

Draws a cozy 16-bit pixel-art farming village across six small islands joined by bridges, with exact counts for buildings, animals and crops.

image-prompt, gpt-image, pixel-art, isometric, game-assets, concept-art, maps, worldbuilding, cozy, vibrant-colors, ocean, landscape, wide-shot, widescreen, game-development, video-games, structured-output, whimsical, summer, high-angle, aerial-view, animals, negative-prompt, cityscape

1 view

Reviews

Loading reviews…

Discussion

Loading comments…