Remove stub secondary_role from awsenc config#30
Merged
jgowdy-godaddy merged 1 commit intomainfrom Apr 17, 2026
Merged
Conversation
secondary_role was a config field that the parser accepted but every code path (auth.rs, serve.rs) immediately errored out of with 'chained role assumption is not supported yet'. It's been shipped in that state since the aws-okta-processor migration path landed, with no plan to implement chaining. Rip it out: - ProfileConfig.secondary_role field removed - SecondaryRoleConfig struct removed - ResolvedConfig.secondary_role field removed - ensure_supported_secondary_role() helper + its unit test removed - Runtime rejection in serve.rs + auth.rs removed - cache_disk_tests.rs updated Left alone deliberately: - The migration tool's detection of aws-okta-processor's --secondary-role flag still warns and skips those profiles. That's a property of the OTHER tool's config we read during migration, not awsenc's own schema. - serde is configured without deny_unknown_fields, so existing awsenc TOML with leftover [secondary_role] sections keeps loading cleanly; added a test covering that legacy config case. DESIGN.md Phase 5 roadmap line for chained AssumeRole removed and replaced with a brief 'out of scope' note pointing users at SDK-side role chaining.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
`secondary_role` was a config field that the parser accepted but every code path immediately errored with "chained role assumption is not supported yet":
It's been shipped in that half-wired state since the aws-okta-processor migration landed, with no plan to implement actual chaining. The threat-model review flagged it as a footgun: a user who copies `secondary_role = { role_arn = "…" }` from a legacy config hits the error at `awsenc auth` time after typing their Okta password.
Rip out the dead code:
Not removed
`DESIGN.md` Phase 5 roadmap line for chained AssumeRole replaced with an explicit out-of-scope note pointing operators at SDK-side role chaining.
Test plan