Skip to content

AWS IAM OAUTHBEARER support via optional oauthbearer-aws module#2267

Draft
pranav shah (prashah-confluent) wants to merge 15 commits into
masterfrom
dev_prashah_aws_iam
Draft

AWS IAM OAUTHBEARER support via optional oauthbearer-aws module#2267
pranav shah (prashah-confluent) wants to merge 15 commits into
masterfrom
dev_prashah_aws_iam

Remove redundant comments

3dfe67c
Select commit
Loading
Failed to load commit list.
SonarQube-Confluent / SonarQube Code Analysis failed Jun 11, 2026 in 1m 0s

Quality Gate failed

Failed conditions
75.2% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube

Annotations

Check failure on line 453 in tests/oauthbearer/aws/test_aws_sts_token_provider.py

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / SonarQube Code Analysis

Remove this identity check; it will always be True.

[S5727] Comparison to None should not be constant
 See more on https://sonarqube.confluent.io/project/issues?id=confluent-kafka-python&pullRequest=2267&issues=fc997c1d-5fde-445f-a18c-8ceee34e7881&open=fc997c1d-5fde-445f-a18c-8ceee34e7881

Check failure on line 158 in src/confluent_kafka/oauthbearer/aws/_aws_oauthbearer_config.py

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / SonarQube Code Analysis

Refactor this function to reduce its Cognitive Complexity from 26 to the 15 allowed.

[S3776] Cognitive Complexity of functions should not be too high
 See more on https://sonarqube.confluent.io/project/issues?id=confluent-kafka-python&pullRequest=2267&issues=60d48d05-7521-4118-89e0-428bd84270e7&open=60d48d05-7521-4118-89e0-428bd84270e7

Check failure on line 248 in tests/oauthbearer/aws/test_dispatch.py

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / SonarQube Code Analysis

Remove this identity check; it will always be True.

[S5727] Comparison to None should not be constant
 See more on https://sonarqube.confluent.io/project/issues?id=confluent-kafka-python&pullRequest=2267&issues=ab1d3b12-0575-4f0e-b45c-2b6ec105c143&open=ab1d3b12-0575-4f0e-b45c-2b6ec105c143

Check warning on line 214 in tests/oauthbearer/aws/test_aws_oauthbearer_config.py

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / SonarQube Code Analysis

Merge these implicitly concatenated strings; or did you forget a comma?

[S5799] Implicit string and byte concatenations should not be confusing
 See more on https://sonarqube.confluent.io/project/issues?id=confluent-kafka-python&pullRequest=2267&issues=6f674624-6f03-4478-8d16-e33fa0194611&open=6f674624-6f03-4478-8d16-e33fa0194611

Check warning on line 372 in tests/oauthbearer/aws/test_aws_sts_token_provider.py

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / SonarQube Code Analysis

Merge these implicitly concatenated strings; or did you forget a comma?

[S5799] Implicit string and byte concatenations should not be confusing
 See more on https://sonarqube.confluent.io/project/issues?id=confluent-kafka-python&pullRequest=2267&issues=f61e6203-3699-43db-9232-ff8505a03453&open=f61e6203-3699-43db-9232-ff8505a03453

Check warning on line 263 in tests/oauthbearer/aws/test_dispatch.py

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / SonarQube Code Analysis

Use asynchronous features in this function or remove the `async` keyword.

[S7503] Async functions should use async features
 See more on https://sonarqube.confluent.io/project/issues?id=confluent-kafka-python&pullRequest=2267&issues=fbe3e09d-e9e6-45e4-bab0-96422a365d7b&open=fbe3e09d-e9e6-45e4-bab0-96422a365d7b

Check warning on line 387 in tests/oauthbearer/aws/test_real_sts.py

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / SonarQube Code Analysis

Merge these implicitly concatenated strings; or did you forget a comma?

[S5799] Implicit string and byte concatenations should not be confusing
 See more on https://sonarqube.confluent.io/project/issues?id=confluent-kafka-python&pullRequest=2267&issues=7a9b7043-d1f7-4292-a994-8f3ac8226e31&open=7a9b7043-d1f7-4292-a994-8f3ac8226e31

Check failure on line 123 in src/confluent_kafka/oauthbearer/aws/_aws_oauthbearer_config.py

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / SonarQube Code Analysis

Refactor this function to reduce its Cognitive Complexity from 20 to the 15 allowed.

[S3776] Cognitive Complexity of functions should not be too high
 See more on https://sonarqube.confluent.io/project/issues?id=confluent-kafka-python&pullRequest=2267&issues=912e4064-2f83-4891-9ef1-cbc725b23df1&open=912e4064-2f83-4891-9ef1-cbc725b23df1

Check warning on line 146 in tests/oauthbearer/aws/test_real_sts.py

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / SonarQube Code Analysis

Merge these implicitly concatenated strings; or did you forget a comma?

[S5799] Implicit string and byte concatenations should not be confusing
 See more on https://sonarqube.confluent.io/project/issues?id=confluent-kafka-python&pullRequest=2267&issues=308b7498-7844-4813-9dc2-f7746eb2b5e3&open=308b7498-7844-4813-9dc2-f7746eb2b5e3

Check failure on line 26 in tests/_util/test_kv_string_parser.py

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / SonarQube Code Analysis

Change this argument; Function "parse_kv" expects a different type

[S5655] Arguments given to functions should be of an expected type
 See more on https://sonarqube.confluent.io/project/issues?id=confluent-kafka-python&pullRequest=2267&issues=35c89b23-16c0-4697-99f7-63d34dd287f2&open=35c89b23-16c0-4697-99f7-63d34dd287f2

Check warning on line 42 in src/confluent_kafka/oauthbearer/aws/_aws_jwt_subject_extractor.py

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / SonarQube Code Analysis

Merge these implicitly concatenated strings; or did you forget a comma?

[S5799] Implicit string and byte concatenations should not be confusing
 See more on https://sonarqube.confluent.io/project/issues?id=confluent-kafka-python&pullRequest=2267&issues=868a6bff-5f02-4b88-8f5d-7340638aef8d&open=868a6bff-5f02-4b88-8f5d-7340638aef8d

Check warning on line 2702 in src/confluent_kafka/src/confluent_kafka.c

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / SonarQube Code Analysis

Make the type of this variable a pointer-to-const. The current type of "cb" is "struct _object *".

[S5350] Pointer and reference local variables should be "const" if the corresponding object is not modified
 See more on https://sonarqube.confluent.io/project/issues?id=confluent-kafka-python&pullRequest=2267&issues=322ca6ef-ef2e-48c0-8861-70099bb1e0f5&open=322ca6ef-ef2e-48c0-8861-70099bb1e0f5

Check warning on line 2837 in src/confluent_kafka/src/confluent_kafka.c

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / SonarQube Code Analysis

Make the type of this variable a pointer-to-const. The current type of "existing" is "struct _object *".

[S5350] Pointer and reference local variables should be "const" if the corresponding object is not modified
 See more on https://sonarqube.confluent.io/project/issues?id=confluent-kafka-python&pullRequest=2267&issues=9aba13f3-2166-4da7-b7f2-2b3788927d14&open=9aba13f3-2166-4da7-b7f2-2b3788927d14

Check warning on line 362 in tests/oauthbearer/aws/test_dispatch.py

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / SonarQube Code Analysis

Remove this unnecessary `list()` call on an already iterable object.

[S7504] When iterating over an iterable object, using "list()" should be avoided
 See more on https://sonarqube.confluent.io/project/issues?id=confluent-kafka-python&pullRequest=2267&issues=6d7a848c-0b58-4279-8323-908369eb5669&open=6d7a848c-0b58-4279-8323-908369eb5669

Check failure on line 117 in tests/oauthbearer/aws/test_dispatch.py

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / SonarQube Code Analysis

Remove this identity check; it will always be True.

[S5727] Comparison to None should not be constant
 See more on https://sonarqube.confluent.io/project/issues?id=confluent-kafka-python&pullRequest=2267&issues=9faf34e1-d45d-43fe-a971-6d7512016c2b&open=9faf34e1-d45d-43fe-a971-6d7512016c2b

Check warning on line 284 in tests/oauthbearer/aws/test_dispatch.py

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / SonarQube Code Analysis

Remove this unnecessary `list()` call on an already iterable object.

[S7504] When iterating over an iterable object, using "list()" should be avoided
 See more on https://sonarqube.confluent.io/project/issues?id=confluent-kafka-python&pullRequest=2267&issues=ce10bf69-158a-4e8f-92e4-1d310b0b5034&open=ce10bf69-158a-4e8f-92e4-1d310b0b5034

Check failure on line 32 in tests/oauthbearer/aws/test_aws_autowire.py

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / SonarQube Code Analysis

Change this argument; Function "create_handler" expects a different type

[S5655] Arguments given to functions should be of an expected type
 See more on https://sonarqube.confluent.io/project/issues?id=confluent-kafka-python&pullRequest=2267&issues=b5f50902-b038-4134-aad3-29848b5fb882&open=b5f50902-b038-4134-aad3-29848b5fb882

Check warning on line 124 in tests/oauthbearer/aws/test_dispatch.py

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / SonarQube Code Analysis

Remove this unnecessary `list()` call on an already iterable object.

[S7504] When iterating over an iterable object, using "list()" should be avoided
 See more on https://sonarqube.confluent.io/project/issues?id=confluent-kafka-python&pullRequest=2267&issues=4ea0d562-4a6d-4c7e-9c76-2de5a8fdab15&open=4ea0d562-4a6d-4c7e-9c76-2de5a8fdab15

Check warning on line 89 in src/confluent_kafka/oauthbearer/aws/_aws_jwt_subject_extractor.py

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / SonarQube Code Analysis

Remove this redundant Exception class; it derives from another which is already caught.

[S5713] A subclass should not be in the same "except" statement as a parent class
 See more on https://sonarqube.confluent.io/project/issues?id=confluent-kafka-python&pullRequest=2267&issues=d2b9d04e-a32e-4e31-be8c-f8b5c8fadfb9&open=d2b9d04e-a32e-4e31-be8c-f8b5c8fadfb9

Check warning on line 208 in src/confluent_kafka/oauthbearer/aws/_aws_oauthbearer_config.py

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / SonarQube Code Analysis

Merge these implicitly concatenated strings; or did you forget a comma?

[S5799] Implicit string and byte concatenations should not be confusing
 See more on https://sonarqube.confluent.io/project/issues?id=confluent-kafka-python&pullRequest=2267&issues=574ca079-b7ad-4771-8df5-8acb599f39d4&open=574ca079-b7ad-4771-8df5-8acb599f39d4

Check warning on line 131 in src/confluent_kafka/oauthbearer/aws/_aws_oauthbearer_config.py

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / SonarQube Code Analysis

Merge these implicitly concatenated strings; or did you forget a comma?

[S5799] Implicit string and byte concatenations should not be confusing
 See more on https://sonarqube.confluent.io/project/issues?id=confluent-kafka-python&pullRequest=2267&issues=3a7dabc9-2369-48e4-8f91-5cd7da53968f&open=3a7dabc9-2369-48e4-8f91-5cd7da53968f

Check failure on line 46 in tests/oauthbearer/aws/test_aws_oauthbearer_config.py

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / SonarQube Code Analysis

Change this argument; Function "parse" expects a different type

[S5655] Arguments given to functions should be of an expected type
 See more on https://sonarqube.confluent.io/project/issues?id=confluent-kafka-python&pullRequest=2267&issues=fd43b27a-24ca-48e9-a2a8-15fd8c5e7d74&open=fd43b27a-24ca-48e9-a2a8-15fd8c5e7d74

Check failure on line 156 in tests/oauthbearer/aws/test_aws_jwt_subject_extractor.py

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / SonarQube Code Analysis

Change this argument; Function "extract_sub" expects a different type

[S5655] Arguments given to functions should be of an expected type
 See more on https://sonarqube.confluent.io/project/issues?id=confluent-kafka-python&pullRequest=2267&issues=6c358559-7ece-4a6f-b722-58a6ff291004&open=6c358559-7ece-4a6f-b722-58a6ff291004

Check warning on line 2985 in src/confluent_kafka/src/confluent_kafka.c

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / SonarQube Code Analysis

Complete the task associated to this "TODO" comment.

[S1135] Track uses of "TODO" tags
 See more on https://sonarqube.confluent.io/project/issues?id=confluent-kafka-python&pullRequest=2267&issues=dcc1139b-6b97-4555-8b91-776e95a67964&open=dcc1139b-6b97-4555-8b91-776e95a67964

Check warning on line 251 in tests/oauthbearer/aws/test_dispatch.py

See this annotation in the file changed.

@sonarqube-confluent sonarqube-confluent / SonarQube Code Analysis

Use asynchronous features in this function or remove the `async` keyword.

[S7503] Async functions should use async features
 See more on https://sonarqube.confluent.io/project/issues?id=confluent-kafka-python&pullRequest=2267&issues=c000a2a9-a801-4154-98e9-12f0bf5cc3b5&open=c000a2a9-a801-4154-98e9-12f0bf5cc3b5