Langsung ke konten
Skillpedia
Database35k Β· #8305

performing-service-account-credential-rotation

Fungsinya

Alat ini mengotomatiskan penggantian berkala kata sandi dan access key untuk akun yang digunakan oleh program (service account). Hal ini membantu mencegah kredensial lama dimanfaatkan oleh penyerang.

Kapan dipakai

  • βœ“Saat mengganti kata sandi service account.
  • βœ“Saat menyiapkan penggantian kata sandi otomatis.
  • βœ“Saat memverifikasi keamanan service account.

Link skill

https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-service-account-credential-rotation/SKILL.md

Salin lalu tempelkan ke AI Anda (Claude, ChatGPT, atau Cursor) dan minta AI mengikuti instruksinya.

Cara pakai

Cara paling mudah: salin pesan ini dan tempelkan ke AI Anda. AI akan membaca skill dan mengikuti instruksinya.

Pesan siap tempel

Gunakan skill ini untuk membantu saya: https://github.com/mukul975/Anthropic-Cybersecurity-Skills/blob/main/skills/performing-service-account-credential-rotation/SKILL.md Baca file SKILL.md di link tersebut dan ikuti instruksinya untuk tugas saya.
Mau AI Anda menemukan skill seperti ini sendiri?Pasang MCP Skillpedia gratis: cukup satu baris, dan AI mencari di antara 15.000+ skill sebelum tiap tugas.Pasang dalam 1 menit β†’

Contoh permintaan ke AI

β€œRotasi kredensial service account untuk database dan aplikasi web kami.”

5 skill baru setiap minggu. 1 menit baca.

Cara kerjanya

Alat ini terhubung ke sistem seperti Active Directory, platform cloud (AWS, Azure, GCP), dan database. Alat ini membuat kredensial baru, memperbaruinya di tempat yang digunakan, lalu memastikan semuanya tetap berfungsi.

Konten teknis (SKILL.md asli)

Teks asli dari pembuat, dalam bahasa Inggris, langsung dari GitHub.

Performing Service Account Credential Rotation

Overview

Service accounts are non-human identities used by applications, daemons, CI/CD pipelines, and automated processes to authenticate to systems and APIs. These accounts often have elevated privileges and their credentials (passwords, API keys, certificates, tokens) are frequently long-lived and shared across teams, making them prime targets for attackers. Credential rotation is the systematic process of replacing these secrets on a scheduled basis, propagating new credentials to all dependent systems, and verifying service continuity after rotation.

When to Use

  • When conducting security assessments that involve performing service account credential rotation
  • When following incident response procedures for related security events
  • When performing scheduled security testing or auditing activities
  • When validating security controls through hands-on testing

Prerequisites

  • Inventory of all service accounts across AD, cloud, and applications
  • Secrets management platform (HashiCorp Vault, AWS Secrets Manager, Azure Key Vault, or CyberArk)
  • Service dependency mapping (which services use which credentials)
  • Change management process for rotation windows
  • Monitoring for service health post-rotation

Core Concepts

Service Account Types

Type Platform Credential Rotation Method
Active Directory Service Account Windows/AD Password gMSA (automatic) or PAM-managed
AWS IAM User AWS Access Key/Secret Key AWS Secrets Manager rotation Lambda
GCP Service Account GCP JSON key file Key rotation via IAM API
Azure Service Principal Azure Client secret/certificate Key Vault + rotation policy
Database Service Account SQL/Oracle/Postgres Password Vault dynamic secrets
API Key SaaS applications API token Application-specific API

Group Managed Service Accounts (gMSA)

Windows gMSAs provide automatic password management by Active Directory:

  • AD automatically rotates the password every 30 days
  • Password is 240 bytes, cryptographically random
  • Multiple servers can use the same gMSA simultaneously
  • No administrator knows or manages the password
  • Eliminates manual rotation for Windows services

Rotation Architecture

Secrets Manager / Vault
        β”‚
        β”œβ”€β”€ Rotation Trigger (schedule or on-demand)
        β”‚
        β”œβ”€β”€ Generate new credential
        β”‚
        β”œβ”€β”€ Update credential at source (AD, cloud IAM, database)
        β”‚
        β”œβ”€β”€ Update credential in all consumers:
        β”‚   β”œβ”€β”€ Application configuration
        β”‚   β”œβ”€β”€ CI/CD pipeline secrets
        β”‚   β”œβ”€β”€ Kubernetes secrets
        β”‚   └── Other dependent services
        β”‚
        β”œβ”€β”€ Verify service health
        β”‚   β”œβ”€β”€ Health check endpoints
        β”‚   β”œβ”€β”€ Authentication test
        β”‚   └── Functional smoke test
        β”‚
        └── Revoke old credential (after grace period)

Workflow

Step 1: Discover and Inventory Service Accounts

Enumerate all service accounts and their dependencies:

# Active Directory: Find all service accounts
Get-ADServiceAccount -Filter * -Properties *
Get-ADUser -Filter {ServicePrincipalName -ne "$null"} -Properties ServicePrincipalName,PasswordLastSet,LastLogonDate

# Find accounts with passwords older than 90 days
$threshold = (Get-Date).AddDays(-90)
Get-ADUser -Filter {PasswordLastSet -lt $threshold -and Enabled -eq $true} -Properties PasswordLastSet,ServicePrincipalName |
    Where-Object {$_.ServicePrincipalName} |
    Select-Object Name, PasswordLastSet, ServicePrincipalName

Step 2: Implement gMSA for Windows Services

# Create KDS Root Key (one-time, domain-wide)
Add-KdsRootKey -EffectiveImmediately

# Create the gMSA account
New-ADServiceAccount -Name "svc-webapp-gmsa" `
    -DNSHostName "svc-webapp-gmsa.corp.example.com" `
    -PrincipalsAllowedToRetrieveManagedPassword "WebServerGroup" `
    -KerberosEncryptionType AES128,AES256

# Install on target server
Install-ADServiceAccount -Identity "svc-webapp-gmsa"

# Test the account
Test-ADServiceAccount -Identity "svc-webapp-gmsa"

# Configure IIS Application Pool to use gMSA
# Set identity to: CORP\svc-webapp-gmsa$

Step 3: AWS Access Key Rotation with Secrets Manager

import boto3
import json

def rotate_iam_access_key(secret_arn, iam_username):

…
Pertanyaan umum

Apa itu service account?

Service account adalah akun yang digunakan program dan sistem untuk saling berkomunikasi, tanpa perlu seseorang memasukkan kata sandi secara manual.

Mengapa kredensial perlu dirotasi?

Kata sandi dan kunci lama bisa ditemukan oleh peretas. Mengganti kredensial secara berkala mengurangi risiko serangan.

Apa saja yang dibutuhkan untuk menggunakan alat ini?

Anda memerlukan daftar semua service account, tempat penyimpanan kredensial yang aman (seperti brankas digital), dan pengetahuan tentang program mana yang menggunakan kredensial apa.

Detail

Deskripsi asli dari pembuat

Automates credential rotation for service accounts across Active Directory, cloud platforms, and application databases to eliminate stale secrets and reduce compromise risk. Use when rotating or automating rotation of service account passwords, API keys, or secrets stored in a vault.

repo: mukul975/Anthropic-Cybersecurity-Skills

Popularitas

Bintang GitHub
35k
Peringkat
#8305
Lisensi
Apache-2.0
Diperbarui
31/8/2026

Apakah skill ini berguna?

0

Masuk untuk memberi suara.

Komentar

  • …

Skill lain dari repositori ini

Skill serupa