OpenAPITools / OpenAPITools/openapi-generator

[REQ] Support for with_aws_v4_signature in python Generator

Open
#10,226 2 comments 8 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Client: Python Enhancement: Feature
Dominant language
Java
Stars
26.8k
Forks
7.7k
PR merge metrics
PR metrics pending

Description

Is your feature request related to a problem? Please describe.

Python generator lacks support for signing apis with AWS v4 generator.

Describe the solution you'd like

This generator lacks with_aws_v4_signature which indicates whether to include AWS v4 signature support. This feature is available in Go generator: https://openapi-generator.tech/docs/generators/go/

I have a looked into how to use urllib3 with aws signature v4 support, but cannot found any existed library to support this...
may require referring aws sample code to modify header when making request by urllib3 to support

Describe alternatives you've considered

Maybe not good, but if with_aws_v4_signature is true, we can use awscurl instead of [urllib3.PoolManager](https://github.com/OpenAPITools/openapi-generator/blob/master/modules/openapi-generator/src/main/resources/python/rest.mustache] to make to request, and adapt the response to urllib3 response

Additional context

Here is the PR to add AWS V4 signature support to the Go client generator: https://github.com/OpenAPITools/openapi-generator/pull/7326/files.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Python generator's rest.mustache and compare the existing Go generator support described in PR 7326. Review the AWS Python signing sample and the urllib3.PoolManager approach to determine how the requested option should affect generated requests. Done means generated Python clients support AWS V4 signing when with_aws_v4_signature is enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
aws, python
Domain
api, security
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.