-
Notifications
You must be signed in to change notification settings - Fork 51
fix(core): wrong credentials sharing #1970
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
Code Coverage (Ubuntu)DetailsDiff against developResults for commit: daac988 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Code Coverage (Windows)DetailsDiff against developResults for commit: daac988 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
sbrunato
left a comment
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.
the problem here is not that cop_marine does not need credentials but that credentials are shared between providers when it should not.
Instead of adding this new parameter need_credentials, better update PluginConfig.matches_target_auth method with:
# both match
if target_matching_conf and sort_dict(target_matching_conf) == sort_dict(
matching_conf
) and target_matching_url and target_matching_url == matching_url:
return True
# conf matches and no matching_url expected
if target_matching_conf and sort_dict(target_matching_conf) == sort_dict(
matching_conf
) and not target_matching_url:
return True
# url matches and no matching_conf expected
if target_matching_url and target_matching_url == matching_url and not target_matching_conf:
return True
return Falsedaac988 to
d91faae
Compare
Code Coverage (Ubuntu)DetailsDiff against developResults for commit: 7241c73 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
Code Coverage (Windows)DetailsDiff against developResults for commit: 7241c73 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
d91faae to
7241c73
Compare
This PR allows to share credentials between plugins only if it should be the case, i.e. in three cases:
matching_urland do not have a differentmatching_confmatching_confand do not have a differentmatching_urlmatching_urlandmatching_confIt is fixed by updating
PluginConfig.matches_target_authmethod.Furthermore, credentials received from other providers were updated until there is no matching
authconfiguration anymore while the first one was enough, it is fixed now.fedeo_cedahas been added to theuser_conf_template.ymlfile.