-
Notifications
You must be signed in to change notification settings - Fork 30
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
SNOW-715619: Support authentication with external browser #813
base: SNOW-715551v2
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## SNOW-715551v2 #813 +/- ##
=================================================
- Coverage 78.39% 77.96% -0.44%
=================================================
Files 107 108 +1
Lines 9484 9814 +330
=================================================
+ Hits 7435 7651 +216
- Misses 2049 2163 +114 ☔ View full report in Codecov by Sentry. |
@@ -248,6 +248,7 @@ endif () | |||
|
|||
if (APPLE) | |||
# macOS | |||
find_library(CORESERVICES_LIBRARY CoreServices) |
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.
For static library we should not add extra linking libs here but should be in the link options for test cases:
https://github.com/snowflakedb/libsnowflakeclient/blob/master/tests/CMakeLists.txt#L235
@sfc-gh-ext-simba-jl Just a heads up you might need to adjust build options for dynamic lib when merging your PR with the changes here.
Also CoreServices seems to be a larger one FYI ODBC are using following build options on MacOS maybe we could use the same?
if (APPLE)
target_link_libraries(snowflakeclient INTERFACE
"-framework CoreFoundation"
"-framework SystemConfiguration"
"-framework ApplicationServices"
"-framework Security"
)
endif ()
include/snowflake/IAuth.hpp
Outdated
@@ -122,6 +135,101 @@ namespace IAuth | |||
std::string oneTimeToken; | |||
std::string m_samlResponse; | |||
}; | |||
|
|||
class IAuthWebServer : public AuthErrorHandler |
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 we need IAuthWebServer defined in external header file? Does it include driver specific logic that needs to be overridden on ODBC or any other driver side?
For my understanding in ODBC IAuthWebServer is defined as pure interface without any implementation, for test purpose only so it can be overridden in unit test cases.
If we want to keep test cases on both ODBC and libsfclient side, keep IAuthWebServer as a pure interface would be better. Or if test it on libsfclient side is enough, we could move the definition to internal header files.
@@ -0,0 +1,250 @@ | |||
/* |
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.
Please check ODBC test cases and take cases as much as possible to here. https://github.com/snowflakedb/snowflake-odbc/blob/master/Tests/UnitTests/UnitAuthenticatorTest/UnitAuthenticatorTest.cpp
e.g. SF_CON_BROWSER_RESPONSE_TIMEOUT and SF_CON_DISABLE_CONSOLE_LOGIN need to be tested.
No description provided.