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

Invoke API Gateway with IAM Auth request signing #180

Open
ghost opened this issue Oct 29, 2020 · 4 comments
Open

Invoke API Gateway with IAM Auth request signing #180

ghost opened this issue Oct 29, 2020 · 4 comments
Labels
feature-request A feature should be added or improved. module/powershell-cmdlets p2 This is a standard priority issue queued

Comments

@ghost
Copy link

ghost commented Oct 29, 2020

I'd like a way to call a API Gateway method/resource that has IAM Auth enabled. This requires signing the request in the AWS Signature V4 process, which is very cumbersome.

This similar request for a .NET method looks unfulfilled.

Describe the Feature

API Gateway is a great solution for all REST clients, including PowerShell Invoke-RestMethod. However if we'd like to enable AWS_IAM auth on a method/resource, I'm not aware of a realistic way to use PowerShell as a client.

Is your Feature Request related to a problem?

No

Proposed Solution

I see two directions we could go.

  1. An AWS-service-agnostic cmdlet that, given all the required inputs (credentials, URL, etc), and will return a hashtable of headers to use in, for example, Invoke-RestMethod.
  2. An API Gateway specific cmdlet that is nearly identical to Invoke-RestMethod, but accepts AWS credentials/profile/etc and will do the signing for you. Invoke-AG2RestMethod?

Describe alternatives you've considered

I've spent a few hours trying to write my own signer method, but it is, as previously mentioned, very cumbersome.

Additional Context

API Gateway and Lambda are incredibly useful for providing simple REST interfaces. IAM auth is something already widely adopted for AWS reasons, and thus is the most convenient authorizer without having to get into Cognito, auth tokens, or other methods.

This is a 🚀 Feature Request

@ghost ghost added feature-request A feature should be added or improved. needs-triage This issue or PR still needs to be triaged. labels Oct 29, 2020
@dhenard
Copy link

dhenard commented Feb 24, 2021

Would also be interested in being able to send web requests to an AWS API Gateway with AWS_IAM authentication enabled.

@ghost
Copy link
Author

ghost commented Mar 1, 2021

@dhenard Please thumbs-up my original request. Thanks!

@ashishdhingra
Copy link
Contributor

Needs review with the team.

@ashishdhingra ashishdhingra added needs-review and removed needs-triage This issue or PR still needs to be triaged. labels Feb 1, 2022
@ashishdhingra ashishdhingra added the p1 This is a high priority issue label Dec 23, 2022
@ashishdhingra ashishdhingra added p2 This is a standard priority issue queued and removed p1 This is a high priority issue needs-review labels May 5, 2023
@markjl-netlogix
Copy link

Adding a +1 for this feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request A feature should be added or improved. module/powershell-cmdlets p2 This is a standard priority issue queued
Projects
None yet
Development

No branches or pull requests

3 participants