Repository navigation
feat: add identity.assumeRoleChainRef for a dynamic assume-role chain #13
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
b6f5c99
feat: add identity.assumeRoleChainRef for a dynamic assume-role chain
kaessert f9837cd
fix: decode assumeRoleChainRef strictly and reject an empty chain
kaessert f958926
fix: make an unresolved assumeRoleChainRef fatal when there is no sta…
kaessert 64d753a
docs: add an assumeRoleChainRef example and render target
kaessert File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| apiVersion: apiextensions.crossplane.io/v1 | ||
| kind: Composition | ||
| metadata: | ||
| name: function-aws-query-assume-role-chain-ref | ||
| spec: | ||
| compositeTypeRef: | ||
| apiVersion: example.io/v1alpha1 | ||
| kind: XAccount | ||
| mode: Pipeline | ||
| pipeline: | ||
| # The role to assume is chosen at runtime from the pipeline context, so one | ||
| # Composition can target a different AWS account per control plane. In a real | ||
| # control plane a function-environment-configs step loads it from a | ||
| # platform-owned EnvironmentConfig into the environment context key; `crossplane | ||
| # render` seeds that key with --context-values (see `make render-assume-role`). | ||
| # Prefer a context path over spec.*: a spec path lets any XR author pick the role. | ||
| # | ||
| # There is no static assumeRoleChain, so if the path doesn't resolve the step is | ||
| # fatal instead of silently querying as the function's base identity. | ||
| # GetCallerIdentity makes the assumed role visible in status.callerIdentity.arn. | ||
| - step: caller-identity | ||
| functionRef: | ||
| name: function-aws-query | ||
| input: | ||
| apiVersion: aws.fn.crossplane.io/v1beta1 | ||
| kind: Input | ||
| queryType: GetCallerIdentity | ||
| target: status.callerIdentity | ||
| identity: | ||
| assumeRoleChainRef: context.[apiextensions.crossplane.io/environment].awsQuery.roleChain | ||
| credentials: | ||
| - name: aws-creds | ||
| source: Secret | ||
| secretRef: | ||
| namespace: crossplane-system | ||
| name: aws-creds |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.