[CXP-35] feat: add single-hop assume role for self-hosted deployments#99
Conversation
…oyments When use-assume is set with role-arn but WITHOUT global-role-arn, the connector now performs single-hop assume role (IRSA -> target role). This supports self-hosted deployments (e.g., EKS with IRSA) that don't need an intermediate binding account. Changes: - external-id is only required for two-hop mode (when global-role-arn is set) - Dockerfile uses correct binary name (baton-aws) 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
When globalRoleARN is empty but roleARN is set, assume directly into the target role without an intermediate binding account hop. This enables self-hosted deployments (e.g., EKS with IRSA) to use assume role without needing ConductorOne's binding account flow. Co-Authored-By: Claude <noreply@anthropic.com>
WalkthroughThese changes introduce a single-hop assume role path directly to a Role ARN via STS while restructuring validation logic to only validate ExternalID when using the two-hop flow (GlobalRoleArnField present). ExternalIdField is removed from the public configuration schema. Changes
Sequence DiagramsequenceDiagram
participant Client
participant Config as Config Validator
participant Connector
participant STS as AWS STS
rect rgba(100, 200, 100, 0.5)
Note over Client,STS: Single-Hop Assume Role Flow (New)
Client->>Config: Validate with roleARN only
Config->>Config: Validate roleARN
Config-->>Client: Validation complete
Client->>Connector: getCallingConfig(roleARN, empty globalRoleARN)
Connector->>STS: AssumeRole(roleARN, optional ExternalID)
STS-->>Connector: Credentials
Connector->>Connector: Cache credentials
Connector-->>Client: Config with credentials
end
rect rgba(100, 100, 200, 0.5)
Note over Client,STS: Two-Hop Assume Role Flow (Existing)
Client->>Config: Validate with globalRoleARN
Config->>Config: Validate roleARN
Config->>Config: Validate ExternalID
Config-->>Client: Validation complete
Client->>Connector: getCallingConfig(roleARN, globalRoleARN)
Connector->>STS: AssumeRole(globalRoleARN)
STS-->>Connector: Instance credentials
Connector->>STS: AssumeRole(roleARN) from instance account
STS-->>Connector: Customer account credentials
Connector->>Connector: Cache credentials
Connector-->>Client: Config with credentials
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
Tip 🧪 Unit Test Generation v2 is now available!We have significantly improved our unit test generation capabilities. To enable: Add this to your reviews:
finishing_touches:
unit_tests:
enabled: trueTry it out by using the Have feedback? Share your thoughts on our Discord thread! Comment |
|
@abebars Thanks for your contribution! I've tagged v0.1.9 and it should be available now. |
Note
🤖 Generated with Claude Code
Summary
Adds single-hop assume role support for self-hosted deployments (e.g., EKS with IRSA) that don't need ConductorOne's intermediate binding account.
Problem
The current
use-assumemode requires a two-hop flow designed for ConductorOne SaaS:For self-hosted deployments using IRSA, we only need single-hop:
Previously, if
global-role-arnwas empty withuse-assume=true, the connector would fail with:Solution
When
globalRoleARNis empty butroleARNis provided, assume directly into the target role without requiring the binding hop.Changes
getCallingConfig()- whenglobalRoleARNis empty butroleARNis set, directly assume into roleARN using STSexternal-idonly required for two-hop mode (whenglobal-role-arnis set)Usage
Testing
Production Validation
This fix has been deployed and validated in production:
Backwards Compatibility
global-role-arnis providedglobal-role-arnis emptyRollback Plan
Revert PR - existing authentication flows are unchanged.