-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Openapi new auth #4086
Openapi new auth #4086
Conversation
Hi @vlavorini , may I ask if there are any plans to expand the connector to return information about POST endpoints as well? |
Hi @xiphl, in my idea you can obtain datasets only with 'get' methods, but i acknowledge that also POST requests can return data. There are two theoretical issues with POST:
From the practical point of view, even if you are sure about your endpoints, you need to fill the request Body, and that mean that you have to know what to insert in there. I'm pretty sure that even faced to the same set of APIs, different POST endpoints need different content in their body. I don't know how to model this. |
Unit Test Results (metadata ingestion) 5 files + 2 5 suites +2 43m 25s ⏱️ +28s Results for commit 80a557e. ± Comparison against base commit 60c17a2. This pull request removes 6 and adds 43 tests. Note that renamed tests count towards both.
♻️ This comment has been updated with latest results. |
I see... So these were the considerations behind it. Thanks for sharing! |
I think we should make note that using user/pass in the URL should be done cautiously. Depending on set-up, this could log the username & password combo in the webserver logs as a part of the request URL. Otherwise LGTM cc: @dexter-mh-lee |
Hi @RyanHolstien , do you think it will be good to add few lines in the docs? Cheers |
After discussing with the team, we think that this should be done through an auth token rather than directly supplying the username and password. This adds an extra step of reaching out to the auth provider separately from the script to get the auth token, but we believe it to be a more secure pattern to follow. |
I understand, and agree with you. The problem is that there are applications that leave you no choice, like the one I faced, for which I had to implement such a poor method. |
Yeah in the case that your auth provider does not provide an option to produce a token, I think this is the only option that makes sense. We should still add some docs on the drawbacks of this approach and if possible include another option to support a token in addition to the user/pass combo. |
@@ -269,7 +297,7 @@ def close(self): | |||
|
|||
class OpenApiSource(APISource): | |||
def __init__(self, config: OpenApiConfig, ctx: PipelineContext): | |||
super().__init__(config, ctx, "OpenApi") |
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 this (changing
OpenApi
toopenapi
) intentional? - what happens to previously ingested urns? when you re-run ingestion they get new urns, so the old entities will continue to exist?
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.
Yes, it's intentional. I spotted that there was issues with finding the icon, so I uniformed all to the lowercase format, as in other ingestion plugins.
The older urns will continue to exist as different entities.
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.
LGTM
…atahub-project#4086)" This reverts commit a113e43.
@vlavorini I am sending a PR to revert this after discussing with @shirshanka. This is backward incompatible and it will cause issues for companies using OpenApi already in production. Problem in finding logo -> Please fix here to change the case so logo is found correctly https://github.com/linkedin/datahub/blob/master/metadata-service/war/src/main/resources/boot/data_platforms.json#L171
|
Checklist
Context
In order to interrogate the endpoints, an authentication via token is required.
Before this PR, only a POST request with username/password in the body was available. Now also a GET method, with username/password directly wrote in the url, is available.