-
Notifications
You must be signed in to change notification settings - Fork 80
feat: add restcatalog authentication api #479
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
base: main
Are you sure you want to change the base?
Conversation
| /// \param properties Configuration properties. | ||
| /// \return A session for initialization, or the catalog session by default. | ||
| virtual std::shared_ptr<AuthSession> InitSession( | ||
| HttpClient* init_client, |
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.
why use raw pointer?🤔 use std::shared_ptr instead?
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.
AuthManager simply borrows the HTTP client owned by the catalog, it isn’t supposed to manage that client’s lifetime, so here use raw pointer.
| set(ICEBERG_REST_AUTH_SOURCES auth_session.cc auth_manager.cc auth_managers.cc) | ||
|
|
||
| # Expose sources to parent scope for inclusion in iceberg_rest library | ||
| set(ICEBERG_REST_AUTH_SOURCES | ||
| ${ICEBERG_REST_AUTH_SOURCES} | ||
| PARENT_SCOPE) |
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.
| set(ICEBERG_REST_AUTH_SOURCES auth_session.cc auth_manager.cc auth_managers.cc) | |
| # Expose sources to parent scope for inclusion in iceberg_rest library | |
| set(ICEBERG_REST_AUTH_SOURCES | |
| ${ICEBERG_REST_AUTH_SOURCES} | |
| PARENT_SCOPE) | |
| iceberg_install_all_headers(iceberg/catalog/rest/auth) |
The current pattern is inconsistent with other CMake config. We should only install headers for this subdirectory here.
| # Add auth sources with proper path prefix | ||
| foreach(AUTH_SOURCE ${ICEBERG_REST_AUTH_SOURCES}) | ||
| list(APPEND ICEBERG_REST_SOURCES "auth/${AUTH_SOURCE}") | ||
| endforeach() | ||
|
|
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.
| # Add auth sources with proper path prefix | |
| foreach(AUTH_SOURCE ${ICEBERG_REST_AUTH_SOURCES}) | |
| list(APPEND ICEBERG_REST_SOURCES "auth/${AUTH_SOURCE}") | |
| endforeach() |
Let's remove these lines by directly adding those files in the above set(ICEBERG_REST_SOURCES).
| # specific language governing permissions and limitations | ||
| # under the License. | ||
|
|
||
| # Include auth subdirectory |
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.
| # Include auth subdirectory |
This comment is unnecessary.
|
|
||
| } // namespace iceberg::rest | ||
|
|
||
| namespace iceberg::rest::auth { |
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.
Do we really need the extra auth namespace?
feat: add restcatalog authentication api