Skip to content

[Bug]: eks resource env-var mismatch EKS_BINDING_USER_ROLE vs EKS_ROLE_SESSION #1328

@pwillie

Description

@pwillie

Bug Description

Have been trying to test EKS resource by following documentation here https://hoop.dev/docs/quickstart/cloud-services/kubernetes/kubernetes-eks.

Have noticed in agent logs that the session-role is never populated causing a breakdown of the multiple bindings feature and the bearer token generated is authenticated but not wired up to correct role or clusterrole.

If I read code correctly the web UI names the config env var EKS_BINDING_USER_ROLE here https://github.com/hoophq/documentation/blob/65f6386c3e1eba0d84335ace1ced9806452f585b/store/connections/kubernetes-eks.yml#L59 however the agent code is expecting an env var named EKS_ROLE_SESSION here

case "envvar:EKS_ROLE_SESSION":

Steps to Reproduce

  1. Follow instructions here https://hoop.dev/docs/quickstart/cloud-services/kubernetes/kubernetes-eks
  2. Open connection and view agent logs
  3. Should see log line including "msg":"generating eks token, cluster=xxxxx, region=ap-southeast-2, session-role="

Expected Behavior

Would have expected to see the EKS Binding User Role configured on connection be populated at session-role when generating token.

Actual Behavior

Token is generated with session name such as aws-go-sdk-1774232557786624555

Version

1.51.2

Browser(s)

Microsoft Edge

Operating System

Windows Server 2022 Datacenter

Screenshots

No response

Additional Context

No response

Relevant Log Output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions