Join our Newsletter — 33% off our NHI Course
Home› Glossary› NHI Lifecycle Management› User-Managed Key
NHI Lifecycle Management

User-Managed Key

← Back to Glossary
By NHI Mgmt Group Updated November 26, 2026 Domain: NHI Lifecycle Management

In Google Cloud, a User-Managed Key is a service account key pair that you create and are responsible for securing and rotating, unlike Google-managed keys. A leaked copy lets an attacker authenticate as the service account until it is deleted or disabled. Defenders inventory these keys, remove unused ones and prefer short-lived credentials.

What a user-managed key is in Google Cloud

A user-managed key is a Google Cloud service account key pair that you create and must protect yourself. The security boundary matters because the private key can authenticate as the service account until the key is deleted or disabled, so compromise of the file is equivalent to compromise of that identity path.

That makes the term less about storage and more about control: if the key exists, it is a reusable bearer credential with a lifecycle you own. The practical consequence is that teams must treat it as an identity-bearing secret, not as a benign configuration artifact.

Why user-managed keys are risky in practice

User-managed keys are dangerous because they create a durable credential that can outlive the operator who created it, the workload that used it, or the deployment that originally needed it. If the key is copied into source code, a laptop, a CI system, or a log file, an attacker can often authenticate directly as the service account until the key is revoked.

This is why Google Cloud guidance increasingly favours keyless patterns, short-lived credentials and tighter inventory control over static JSON key files. The Google Cloud Service Account Keys Security Guide covers the practical controls around removal, restriction, telemetry and safe retirement, while the Cloud Workload Identity Guide explains the keyless alternatives that reduce this exposure.

How organisations expose and inventory them

The main exposure questions are straightforward: where are the keys stored, who can download them, and which service accounts still have active keys that no longer have a business need. A mature inventory should show creation time, ownership, usage history and retirement status, because unmanaged key sprawl usually hides in old projects and automation paths.

Discovery is not just an audit task. You also need to check whether the service account key is reachable from the internet-facing systems or third-party tools that use it, because those paths widen the blast radius of theft. NHIMG’s cloud KMS health check is useful as a model for the kind of recurring review discipline that should also exist around key ownership, rotation and unused credentials.

Safer replacement patterns and lifecycle controls

The safest response is usually to avoid long-lived user-managed keys altogether where Google Cloud can issue short-lived credentials through workload identity federation or service account impersonation. If a key still exists for compatibility reasons, it should have a named owner, a documented purpose, an expiry or rotation expectation, and a clear retirement trigger tied to the system that depends on it.

That lifecycle view also helps separate necessary exceptions from legacy clutter. The Cloud Customer-Managed Keys and BYOK/HYOK Decision Guide is not about service account keys specifically, but it is a useful reminder that cloud key choices should be made deliberately, with custody, guardrails and operational trade-offs explicit rather than assumed.

Risk and Threat Considerations

User-managed keys create a classic secret-theft problem: once an attacker acquires the private key, they can reuse it until defenders notice and revoke it. The danger is persistence, because the key may remain valid long after the initial compromise that exposed it.

Failure mechanism: The key is copied from a trusted location into an untrusted one, such as a developer workstation, build system, ticket, container image or repository, and then reused for direct authentication.

Impact: The attacker can impersonate the service account, reach downstream cloud resources, and potentially move laterally through permissions granted to that account.

Standards & Framework Alignment

This section maps relevant standards and security frameworks to the operational risks and controls described in this guidance.

NIST SP 800-53 Rev 5, NIST SP 800-57 and CIS Controls v8 set the governance and control requirements practitioners need to meet.

FrameworkControl / ReferenceRelevance
NIST SP 800-53 Rev 5IA-5 — Authenticator ManagementCovers lifecycle control of authenticators used for service account access.
IA-9 — Service Identification and AuthenticationApplies when non-human services authenticate with reusable credentials.
AC-2 — Account ManagementService account keys are tied to accounts that must be governed and removed when no longer needed.
Recommendation — Rotate, revoke and inventory service account keys under IA-5 discipline. Use IA-9 to replace static service account keys with stronger service authentication patterns. Tie key issuance and retirement to account ownership and deprovisioning under AC-2.
NIST SP 800-571 — Key ManagementDefines key lifecycle, rotation and destruction practices directly relevant to user-managed keys.
Recommendation — Apply key lifecycle policy to user-managed keys and retire them when no longer required.
CIS Controls v85 — Account ManagementPrescribes managing accounts and their authenticators, including removing unused access paths.
Recommendation — Inventory service account keys and remove unused credentials under CIS-5.

Practitioner Guidance

Why practitioners should care: The key question is not whether a service account can have a key, but whether that key still needs to exist. Static keys should be exceptional, time-bound and actively monitored, because they are easy to duplicate and hard to contain once leaked.

What to watch for: Repeated key creation, keys with no clear owner, keys used by human operators instead of workloads, and keys that remain active long after the original integration has changed. Those are all signs that the environment is drifting toward avoidable credential risk.

Practitioner takeaway: Prefer keyless access by default, and when a user-managed key is unavoidable, treat it as a high-risk credential with inventory, rotation and deletion discipline from day one.

Free weekly newsletter

Subscribe to the NHI & AI Identity Journal

The latest on NHI and Agentic AI security – articles, research, breaches, news and events every week.

Bonus 33% off our NHI Course when you subscribe.

NHIMG Editorial Note
Reviewed and updated by the NHIMG editorial team on November 26, 2026.
NHI Mgmt Group — the #1 independent authority on Non-Human Identity, IAM, and Agentic AI security. nhimg.org