The Simplest Way to Make Crossplane and Fido2 Work Like They Should
Using crossplane and fido2 together lets teams build cloud resources with hardware key checks. A user taps a key to log in, and the cluster builds the cloud tools. This workflow links human logins to automated cloud management. Engineers prove who they are with a physical key before changing cluster state. Then the control plane reads those changes and updates the cloud provider. How crossplane and fido2 handle logins and permissions The login flow starts when an engineer runs a cluster comm
Your coding agents run with your access.
Claude Code reaches prod with a developer's credentials, and approval prompts get clicked through. hoop.dev checks every query, masks sensitive data, and holds risky changes for a human.
Using crossplane and fido2 together lets teams build cloud resources with hardware key checks. A user taps a key to log in, and the cluster builds the cloud tools.
This workflow links human logins to automated cloud management. Engineers prove who they are with a physical key before changing cluster state. Then the control plane reads those changes and updates the cloud provider.
How crossplane and fido2 handle logins and permissions
The login flow starts when an engineer runs a cluster command. An identity provider asks the user to tap a FIDO2 hardware key. The key signs a challenge using a private secret stored on the device.
Next, the identity provider checks the signature and sends back a short token. The engineer sends this token to the Kubernetes API server. The API server checks the token and looks up the user role.
Role rules decide which custom resource files the user can read or write. When the user writes a valid resource file, Crossplane takes over the work. It reads the desired state from the cluster and talks to the cloud API.
Note that the control plane does not use the human hardware key directly. Instead, it uses its own cloud provider role to create databases or networks. The hardware key protects the cluster API where the cloud request starts.
Common failure modes and how to scope roles
Many teams fail by giving one broad cluster role to every developer. If any user with a valid key can edit all files, mistakes happen. A junior engineer might delete a live database by changing one file.
Shared service accounts cause another big problem for cloud teams. Teams often bypass hardware keys by using static tokens for quick fixes. These static tokens never expire and leave no clear user log behind.
Unlogged queries and changes also hurt security during an audit. If two tools share one role, you cannot tell who made a change. You must map each hardware key login to a single human identity.
FIDO2 / WebAuthn + Crossplane Composition Security: architecture patterns and best practices
Continue reading? Get the full guide.
Free. No spam. Unsubscribe anytime.
To fix this, split cluster roles by team and project namespace. Give developers write permissions only for the specific resource types they own. Keep provider secret files locked inside a separate system namespace.
You should also lock down network paths between the cluster and cloud APIs. Only the control plane pods need outbound network paths to the cloud provider. Developer machines only need a network path to the cluster API server.
Auditing human changes to cloud state
Good security requires a clear trail from the key tap to the cloud. Turn on API server audit logs to record every write action. Each log entry should show the user identity from the hardware key check.
Match those cluster logs with the logs from your cloud provider. When a new cloud database appears, you can trace why it exists. You see which controller built it and which user asked for it.
Also set short lifetimes for the tokens created after a key tap. Short tokens force users to tap their key again for new work sessions. If a laptop gets stolen, the old token stops working very soon.
Finally, test your break-glass plan for lost or broken hardware keys. Let users register a backup key so one lost device does not block work. Keep admin recovery accounts locked away with strict alert rules on every login.
Add runtime guardrails and masking beside your databases and APIs
Login rules, role grants, and CI checks govern who connects to your stack. Yet any allowed script, engineer, or AI agent still runs commands with the full scope of its role. For workloads on Postgres, MySQL, SQL Server, MongoDB, ClickHouse, Kubernetes, SSH, or internal HTTP services, hoop.dev sits beside the service as an open-source proxy, a sidecar for your database or API.
Before a query runs, hoop.dev guardrails check the statement against your rules. An AI Analyzer you configure can score intent or hold risky calls for human review. Next, hoop.dev data masking rewrites sensitive fields in responses, and each verdict is logged per listener. Explore the MIT-licensed project on GitHub.
Frequently asked questions
Can Crossplane providers prompt for a FIDO2 key tap on every cloud API call?
No, background controllers run without a human present to tap a physical key. You use the hardware key when a human writes the cluster resource file.
How do CI pipelines work when we require FIDO2 for cluster changes?
Require a hardware key tap when engineers approve code merges in your git tool. The pipeline then uses its own scoped machine identity to sync the cluster.
What happens to running cloud resources if a user loses their FIDO2 key?
Running cloud resources stay up because the control plane uses its own cloud role. An admin just revokes the lost key and issues a new one to the user.
Related guides
In this post