-
Notifications
You must be signed in to change notification settings - Fork 208
feat: Support OIDC configs in mongodbatlas_stream_connection #3766
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
Conversation
|
APIx bot: a message has been sent to Docs Slack channel |
.gitignore
Outdated
|
|
||
| #used for schema code generation but is not commited to avoid constant updates | ||
| tools/codegen/open-api-spec.yml | ||
| vendor/ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's vendor and why do we need to ignore it? is it needed for development?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I usually run go mod vendor locally to get the dependencies, which generates this folder. I accidentally merged the files the day before yesterday that triggered a secret leak alert.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in this repo you just need to run the first time: make link-git-hooks tools, and I recommend with any change: make build && golangci-lint run
nothing else needed
| } | ||
| } | ||
|
|
||
| resource "mongodbatlas_stream_connection" "example-kafka-oauthbearer" { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there a README.md for this example? should we add more information there about this new resource?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have this README.md file. Do you mean by adding some information to the file? I don't see we add any information about the example resources?
| } | ||
| ``` | ||
|
|
||
| ### Example Kafka SASL OAuthbearer Connection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is there any Altas docs link we could add here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you show me an example of adding an atlas doc link to the docs? The atlas doc is WIP. But I think I can get the link for it. I followed the pattern in this file to add this example. But I'd like to add extra information if needed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you show me an example of adding an atlas doc link to the docs
you should be able to find it in the advanced_cluster.md file. We usually link the public external link of the docs if there is any other further explanation of how things work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LijieZhang1998 please reach out to @jvincent-mongodb he can create a dochub link (our redirect layer) so you can add a link that we can redirect to a different location on our end when the docs are live
|
@LijieZhang1998 your tests are failing, I haven't looked into why but as a general rule would you mind asking for review only when all your tests are succeeding? if they are flaky, please add this information in the ticket summary to show they're also failing in master for some time |
The failed tests are still the two ones Oriol and I looked into. We'll revert one change from our side to fix the test about stream processor states transition. I'm still checking the other failed test. And, neither of them are related to this change. I updated the description of the PR with the content. |
|
Hi @kanchana-mongodb @marcosuma, can you review it again? We have a task depending on its release. Thanks. |
|
The failed tests |
internal/service/streamconnection/resource_stream_connection_test.go
Outdated
Show resolved
Hide resolved
| } | ||
| ``` | ||
|
|
||
| ### Example Kafka SASL OAuthbearer Connection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you show me an example of adding an atlas doc link to the docs
you should be able to find it in the advanced_cluster.md file. We usually link the public external link of the docs if there is any other further explanation of how things work.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
few minor comments but LGTM overall
| ``` | ||
|
|
||
| ```release-note:enhancement | ||
| data-source/mongodbatlas_stream_connection: Adds new authentication mechanism (OIDC) to the Kafka connection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| data-source/mongodbatlas_stream_connection: Adds new authentication mechanism (OIDC) to the Kafka connection | |
| data-source/mongodbatlas_stream_connection: Adds new authentication mechanism (OIDC) to the Kafka connection. |
| * `method` - SASL OAUTHBEARER authentication method. Value must be OIDC. | ||
| * `username` - Username of the account to connect to the Kafka cluster. | ||
| * `password` - Password of the account to connect to the Kafka cluster. | ||
| * `token_endpoint_url` - OAUTH issuer (IdP provider) token endpoint HTTP(S) URI used to retrieve the token. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this be either an HTTP or HTTPS URI? or more than one HTTP URI? might be useful to clarify
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just one HTTP(S) URI.
| } | ||
| ``` | ||
|
|
||
| ### Example Kafka SASL OAuthbearer Connection |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@LijieZhang1998 please reach out to @jvincent-mongodb he can create a dochub link (our redirect layer) so you can add a link that we can redirect to a different location on our end when the docs are live
|
|
||
| * `mechanism` - Style of authentication. Can be one of `PLAIN`, `SCRAM-256`, or `SCRAM-512`. | ||
| * `mechanism` - Method of authentication. Value can be `PLAIN`, `SCRAM-256`, `SCRAM-512`, or `OAUTHBEARER`. | ||
| * `method` - SASL OAUTHBEARER authentication method. Value must be OIDC. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if this value must be OIDC does the user really need to specify it here? or could it be implicit whenever mechanism = OAUTHBEARER
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's just for now. We may add more method value in the future. Should I say Value must be OIDC currently
Description
Please include a summary of the fix/feature/change, including any relevant motivation and context.
Link to any related issue(s): https://jira.mongodb.org/browse/CLOUDP-338207
This PR is very similar to this PR we've reviewed and merged. But it was reverted in the master for the last release.
This PR has the two failed tests that Oriol and I looked into in the test run. We'll revert one change from our side to fix the test about stream processor states transition. I'm still checking the other failed test. And, neither of them are related to this change.
Type of change:
Required Checklist:
Further comments