Feature: Provide native support for aws_iid
nodeAttestor plugin.
#377
Labels
help wanted
Extra attention is needed
aws_iid
nodeAttestor plugin.
#377
We were looking at the helm chart for deploying
spire-server
in K8s, but it seems it doesn't support theaws_iid
node attestation.Version
We have a special use case where we require to run the spire server in kubernetes and run the agents on an EC2 instance. I noticed there is an
unsupportedBuiltInPlugins
option in the spire-agent charts, that we leverage and use theaws_iid
attestation.helm-charts-hardened/charts/spire/charts/spire-agent/values.yaml
Line 293 in 2c5dfa0
We have used the same and are happy to report that it's working. However, there are a few caveats.
While using this approach we noticed that the node attestation fails, on the agent with an error.
Agent logs
ERRO[0002] Agent crashed error="failed to receive attestation response: rpc error: code = Internal desc = nodeattestor(aws_iid): failed to describe instance: operation error EC2: DescribeInstances, get identity: get credentials: failed to refresh cached credentials, no EC2 IMDS role found, operation error ec2imds: GetMetadata, exceeded maximum number of attempts, 3, request send failed, Get \"http://169.254.169.254/latest/meta-data/iam/security-credentials/\": dial tcp 169.254.169.254:80: i/o timeout"
Server logs
We figured out that access to IDMS is disabled by default in the EKS node group as a security measure, https://aws.github.io/aws-eks-best-practices/security/docs/iam/#when-your-application-needs-access-to-imds-use-imdsv2-and-increase-the-hop-limit-on-ec2-instances-to-2 .
The options available to us are below.
Although we could use
HostNetworking
, we would like to mesh the spire-server pods tolinkerd
, which doesn't work on pods with hostNet enabled. Hence, none of these options work for us.Request: Utilize alternate means of verifying instance metadata, via AWS EC2 APIs which can be used with IRSA in K8s.
The text was updated successfully, but these errors were encountered: