Skip to content
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

Profile based credentials don't work with credential_process #3008

Closed
1 of 5 tasks
prencher opened this issue Jun 21, 2019 · 11 comments Β· Fixed by #11114
Closed
1 of 5 tasks

Profile based credentials don't work with credential_process #3008

prencher opened this issue Jun 21, 2019 · 11 comments Β· Fixed by #11114
Assignees
Labels
bug This issue is a bug. effort/medium Medium work item – several days of effort in-progress This issue is being actively worked on. p1 package/tools Related to AWS CDK Tools or CLI

Comments

@prencher
Copy link

prencher commented Jun 21, 2019

  • I'm submitting a ...

    • πŸͺ² bug report
    • πŸš€ feature request
    • πŸ“š construct library gap
    • ☎️ security issue or vulnerability => Please see policy
    • ❓ support request => Please see note at the top of this template.
  • What is the current behavior?
    If the current behavior is a πŸͺ²bugπŸͺ²: Please provide the steps to reproduce

When using --profile (see also #3007), the CLI doesn't respect credential_process. The profile has to have hardcoded credentials.

  • What is the expected behavior (or behavior of feature suggested)?

credentials_process is respected and invoked the same way other AWS CLI tools do.

  • What is the motivation / use case for changing the behavior or adding this feature?

Parity with AWS CLI.

  • Please tell us about your environment:

    • CDK CLI Version: 0.35.0
    • Module Version: 0.35.0
    • OS: macOS Mojave
    • Language: TypeScript
@rix0rrr rix0rrr added the package/tools Related to AWS CDK Tools or CLI label Jun 26, 2019
@rix0rrr
Copy link
Contributor

rix0rrr commented Jun 26, 2019

Limitation of the AWS SDK for JavaScript we're using. Nothing to do for us here, you should file a feature request with them: https://github.com/aws/aws-sdk-js

Duplicate: #1656

@rix0rrr rix0rrr closed this as completed Jun 26, 2019
@mb-dev
Copy link

mb-dev commented Nov 15, 2019

@rix0rrr is that the case? I am seeing some PRs that implement credentials_process: aws/aws-sdk-js#2559

@rclark
Copy link

rclark commented May 17, 2020

@rix0rrr could you please reopen this ticket? The aws-sdk-js DOES support process credentials now.

@rclark
Copy link

rclark commented May 17, 2020

const sources = [
() => new AWS.EnvironmentCredentials('AWS'),
() => new AWS.EnvironmentCredentials('AMAZON'),
];

I can hack my way to making this work by adding a line here, though there may be other consequences...

    const sources = [
      () => new AWS.EnvironmentCredentials('AWS'),
      () => new AWS.EnvironmentCredentials('AMAZON'),
      () => new AWS.ProcessCredentials({ profile }),
    ];

@3oris
Copy link

3oris commented May 29, 2020

Please reopen!

@rix0rrr rix0rrr reopened this Jun 3, 2020
@SomayaB SomayaB added the bug This issue is a bug. label Jun 5, 2020
@shivlaks shivlaks added the p1 label Jun 24, 2020
@shivlaks
Copy link
Contributor

marking as p1 to prioritize a fix

@LuqiPan
Copy link

LuqiPan commented Aug 4, 2020

[not a contribution]

Hey is there any update on this issue?

@shivlaks shivlaks added the effort/medium Medium work item – several days of effort label Aug 7, 2020
@pahud
Copy link
Contributor

pahud commented Oct 21, 2020

JS SDK now supports process_credentials now. Please check out my demo here:

pahud/gitpod-workspace#1 (comment)

However, AWS CDK does not support it. Can we add support for it given JS SDK supports it now?

@hoegertn
Copy link
Contributor

@shivlaks @rix0rrr Is there anything I can help to make this work? AWS SSO is marketed as the way to configure your users in a multi-account setup but CDK is then not usable.

@pahud
Copy link
Contributor

pahud commented Oct 24, 2020

I believe we probably need update

export class PatchedSharedIniFileCredentials extends AWS.SharedIniFileCredentials {

or
public static async credentialChain(options: CredentialChainOptions = {}) {

And determine if credential_process is configured in the profile. If yes, we simply return the AWS.ProcessCredentials to the credential provider chain and it should work.

@SomayaB SomayaB added the in-progress This issue is being actively worked on. label Oct 26, 2020
@mergify mergify bot closed this as completed in #11114 Nov 9, 2020
mergify bot pushed a commit that referenced this issue Nov 9, 2020
This adds support for the credentials_process feature.

Using the aws-sso-credential-process utility you can also use AWS SSO with this feature

This should fix #3008 
----

*By submitting this pull request, I confirm that my contribution is made under the terms of the Apache-2.0 license*
@github-actions
Copy link

github-actions bot commented Nov 9, 2020

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This issue is a bug. effort/medium Medium work item – several days of effort in-progress This issue is being actively worked on. p1 package/tools Related to AWS CDK Tools or CLI
Projects
None yet
Development

Successfully merging a pull request may close this issue.

10 participants