-
Notifications
You must be signed in to change notification settings - Fork 40
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
DEENG-491 Support multiple AD backends #467
Conversation
Note: due to the config change, we need to update the documentation. However, the code itself is good for review. |
and documentation is now updated! |
Codecov Report
@@ Coverage Diff @@
## main #467 +/- ##
==========================================
+ Coverage 83.85% 83.98% +0.13%
==========================================
Files 71 73 +2
Lines 7483 7513 +30
==========================================
+ Hits 6275 6310 +35
+ Misses 910 907 -3
+ Partials 298 296 -2
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
...ation_tests/testdata/ServiceStatus/golden/Invalid startup time leads to unknown refresh time
Show resolved
Hide resolved
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.
Thanks for separating this into easy to parse chunks. Went over everything and it looks good to me! Great work!
We are going to separate backends from the service and ad object itself.
Change the parameters to accept backend and possible option for each backend (sssd only now).
Provide a mock backend for our tests. Change our internal tests and don’t export sssd objects.
Simplify most of the tests for ad package tests. This includes having default configuration, less parameters for each tests and create dynamically the krb5 tokens as needed. Fix some duplicated and mismatch tests. Don’t rely on GetStatus, which doesn’t exist anymore.
Ensure we control their result with golden files.
This code and tests all migrated in sssd.
We now load the backend here, adapt the existing tests for it and minimize the number of parameters. Co-authored-by: Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
Add additional tests for backend selection. For this, we need to export sssd and systemd on the local bus. Co-authored-by: Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
Co-authored-by: Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
The initialization only load the static configuration. Then, the Active Server is loaded (if no static configuration for server is provided) everytime we request for the server URL. This may this fails at that stage. Changing the backend interface signature and move it to the backend package. Co-authored-by: Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
As we thus can have another element failing, add more tests to it. Rename the tests to TestSSSD at the same time as we cover everything in a single test. Co-authored-by: Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
Change the config to use sssd by default and don’t bypass the backend with the static configuration (which does not exists anymore). Simplify some of the test logic by minimizing the number of parameters. Co-authored-by: Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
Add more test cases to cover the error expectations that moved from New to the direct call. Co-authored-by: Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
Co-authored-by: Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
Remove old config Only required part of new config, with a static server selected to avoid relying on dbus for those tests.
We were pointing to the config instead of the cache constant.
Those were due to leftover unused struct/fields, conforming names, additional spaces…
Co-authored-by: Jean-Baptiste Lallement <jean-baptiste@ubuntu.com>
Co-authored-by: Denison Barbosa <denisonbarbosa@users.noreply.github.com>
This restores the functionality prior to the refactor in PR #467, where the case of having a domain section without the ad_domain setting resorted to using the domain from the sssd.domains setting. This is valid behavior supported and suggested[1] by sssd. In addition to that, avoid being too lenient and still raise an error if the domain section is empty or does not exist. Fixes #910 / UDENG-2268 [1] https://sssd.io/docs/ad/ad-provider-manual.html#id4
This restores the functionality prior to the refactor in PR #467, where the case of having a domain section without the ad_domain setting resorted to using the domain from the sssd.domains setting. This is valid behavior supported and suggested[1] by sssd. In addition to that, avoid being too lenient and still raise an error if the domain section is empty or does not exist. Fixes #910 / UDENG-2268 [1] https://sssd.io/docs/ad/ad-provider-manual.html#id4
This restores the functionality prior to the refactor in PR #467, where the case of having a domain section without the `ad_domain` setting resorted to using the domain from the `sssd.domains` setting. This is valid behavior supported and [suggested](https://sssd.io/docs/ad/ad-provider-manual.html#id4) by sssd. In addition to that, avoid being too lenient and still raise an error if the domain section is empty or does not exist. Fixes #910 / UDENG-2268
This PR are the changes needed for supporting multiple AD backends.
Default backend is SSSd.