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

[kafka/internal, kafkaexporter, kafkareceiver] Add SASL mechanism "AWS_MSK_IAM_OAUTHBEARER" to kafkaexporter #32500

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

donald-cheung
Copy link

@donald-cheung donald-cheung commented Apr 18, 2024

Description:
This PR added the SASL mechanism "AWS_MSK_IAM_OAUTHBEARER" to kafkaexporter and kafkareceiver. This mechanism use the AWS MSK IAM SASL Signer for Go https://github.com/aws/aws-msk-iam-sasl-signer-go. This mechanism is added because the "AWS_MSK_IAM" is not working in our cluster and also in this issue. We added an new mechanism instead of replace the existing one because we want to keep the backward compatibility just in case someone is using "AWS_MSK_IAM".

Link to tracking Issue:
19747

Testing:
We built the images and tested the SASL mechanism in our team.
We added related unit tests.

Documentation:
We updated the kafkaexporter and kafakreciever README on the SASL mechanism.

Copy link

linux-foundation-easycla bot commented Apr 18, 2024

CLA Signed

The committers listed above are authorized under a signed CLA.

Copy link
Contributor

github-actions bot commented May 2, 2024

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label May 2, 2024
@mx-psi
Copy link
Member

mx-psi commented May 2, 2024

@donald-cheung Thanks for your contribution! We need to you to sign the CLA in order to be able to accept your contribution

@github-actions github-actions bot removed the Stale label May 3, 2024
@donald-cheung
Copy link
Author

@mx-psi
Thanks for the reminder. I am asking my company to sign the CCLA so it will take some time.

Copy link
Contributor

This PR was marked stale due to lack of activity. It will be closed in 14 days.

@github-actions github-actions bot added the Stale label May 21, 2024
Copy link
Contributor

github-actions bot commented Jun 4, 2024

Closed as inactive. Feel free to reopen if this PR is still being worked on.

@github-actions github-actions bot closed this Jun 4, 2024
@mattiasnensen
Copy link

Hey, this would be awesome to have. What's going on?

@donald-cheung
Copy link
Author

Sorry, we are in the process of getting approval from the upper organization. This will take some time. Thank you.

@donald-cheung
Copy link
Author

We will have a meeting and update the progress next week.
BTW, how can I reopen this PR? There is no button in the bottom. Thank you.

@mx-psi
Copy link
Member

mx-psi commented Jun 6, 2024

@donald-cheung Let me know when you have approval from your org and want to reopen the PR and I can do it for you :)

@donald-cheung
Copy link
Author

@mx-psi Thanks. The meeting is rescheduled to next week so I will update you later.

@canhnt
Copy link
Contributor

canhnt commented Jun 20, 2024

Hi @donald-cheung, could you please keep posted on the result? This MR is useful for us.

@donald-cheung
Copy link
Author

Sorry for the late reply. The feedback from the upper organization is good. The upper organization will start their procedures to approve.

@donald-cheung donald-cheung requested a review from a team August 8, 2024 01:28
@donald-cheung
Copy link
Author

@mx-psi, @dmitryax, @MovieStoreGuy, @pavolloffay, @jpkrohling. This PR is ready for review. Thank you very much.

@mx-psi
Copy link
Member

mx-psi commented Aug 13, 2024

@pavolloffay @MovieStoreGuy PTAL!

@donald-cheung
Copy link
Author

@pavolloffay @MovieStoreGuy Please let me know if there is anything to follow up. Thank you.

Copy link
Member

@pavolloffay pavolloffay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM,

is there a way to add some functional test?

change_type: enhancement

# The name of the component, or a single word describing the area of concern, (e.g. filelogreceiver)
component: kafkaexporter, internal/kafka
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isn't receiver missing here?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we can remove the internal/kafka?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I updated the changelog.

@donald-cheung
Copy link
Author

LGTM,

is there a way to add some functional test?

No simple way, a AWS MSK is needed for testing.

@donald-cheung
Copy link
Author

@MovieStoreGuy PTAL and let me know if there is anything to follow up. Thank you.

Copy link
Contributor

@MovieStoreGuy MovieStoreGuy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, one minor nit and that is it from me.

type AWSMSKConfig struct {
// Region is the AWS region the MSK cluster is based in
Region string `mapstructure:"region"`
// BrokerAddr is the client is connecting to in order to perform the auth required
BrokerAddr string `mapstructure:"broker_addr"`
}

// Token return the AWS session token for the AWS_MSK_IAM_OAUTHBEARER mechanism
func (c *AWSMSKConfig) Token() (*sarama.AccessToken, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please pass in the context to avoid using context.TODO

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have changed the code to pass the context from parent's function. PTAL. Thank you.

@MovieStoreGuy
Copy link
Contributor

@MovieStoreGuy PTAL and let me know if there is anything to follow up. Thank you.

Sorry it has taken me a bit, there is only one outstanding nit from me @donald-cheung

@amal-v
Copy link

amal-v commented Sep 5, 2024

Waiting for this PR to be merged! 🙇

@mx-psi
Copy link
Member

mx-psi commented Sep 6, 2024

@MovieStoreGuy Could we get this merged if ready?

@donald-cheung donald-cheung force-pushed the kafka-exporter-aws-iam-oauth-bearer branch from e94ace8 to fd12dd2 Compare September 13, 2024 01:19
@sinchentinfraops
Copy link

Any idea what is left before this can be merged? :D

@donald-cheung donald-cheung requested a review from a team as a code owner September 23, 2024 02:35
@jacastello
Copy link

If I can add any more support to this PR, my team built and tested this locally against MSK, and it works as expected. Really looking forward to a mainline release!

@donald-cheung
Copy link
Author

@MovieStoreGuy, @pavolloffay
Please let me know if there is anything leave before it can be merged. Thank you.

@jalola
Copy link

jalola commented Oct 7, 2024

Our team is also looking for this feature, hope it can be merged soon 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.