-
Notifications
You must be signed in to change notification settings - Fork 592
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
security: fix security-config circular dependency #20821
Conversation
Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
v::config depends on v::security_config which is composed of config_bsl/rcl.cc which both include mtls.h which in turn depends on config headers for things like config::binding, creating a circular dependency on headers. this commit splits out tls::rule which is the only type needed by v::config and doesn't have dependences on any config headers. Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
@@ -22,8 +22,6 @@ | |||
|
|||
#include <seastar/util/noncopyable_function.hh> | |||
|
|||
#include <boost/intrusive/list.hpp> |
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.
unrelated to the purpose of the pr, just a vehicle for a trivial fix.
gssapi_rule.cc | ||
logger.cc |
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.
v::security_config also fills a role as a sort of v::security_common
v::config depends on v::security_config which is composed of config_bsl/rcl.cc one which include gssapi_principal_mapper.h which in turn depends on config headers for things like config::binding, creating a circular dependency on headers. this commit splits out gssapi_rule which is the only type needed by v::config and doesn't have dependences on any config headers. Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Before this change oidc_principal_mapping parsing and application from jwt to acl_principal were combined into one unit. However, v::config needs the parsing component to perform validation, but doesn't want to take on all of the transitive dependencies that come from acl.h etc... So we split out the parsing component and add a helper to handle the final apply logic. Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
Depending on gssapi_principal_mapper.h for this meant bringing in config::binding dependency. but that is unnecessary after this commit moves the declaration into config.h. Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
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, thanks.
Fixes circular dependency between security and config libraries.
Backports Required
Release Notes