Repository navigation
ldaps: add LDAPS support #264
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
Open
shridhargadekar
wants to merge
8
commits into
SSSD:master
Choose a base branch
from
shridhargadekar:cert_ldaps
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
a4b1f65
roles: add export_root_ca_certificate() to all providers
shridhargadekar 4dbadd2
utils: add OpenSSLUtils and CA certificate install helpers
shridhargadekar 4956b85
topology_controllers: install CA cert during topology setup
shridhargadekar 9701e20
utils/sssd: add ssl_tls() to SSSDCommonConfiguration
shridhargadekar a527b02
roles/client: replace cert helpers with OpenSSLUtils, remove use_ldaps()
shridhargadekar 4727a65
hosts/ad: move get_ca_cert() and _get_ca_config() to ADHost
shridhargadekar d61eee7
utils/tools: make install_ca_cert idempotent
shridhargadekar beefd15
topology_controllers,utils/tools: address review feedback
shridhargadekar File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -120,7 +120,7 @@ def password_policy(self) -> GenericPasswordPolicy: | |
| :caption: Example usage | ||
|
|
||
| @pytest.mark.topology(KnownTopologyGroup.Any) | ||
| def test_example(client: Client, provider: GenericProvider): | ||
| def test_password_policy__lockout(client: Client, provider: GenericProvider): | ||
| # Enable password complexity | ||
| provider.password_policy.complexity(enable=True) | ||
|
|
||
|
|
@@ -382,6 +382,30 @@ def test_certificate_operations(client: Client, provider: GenericProvider): | |
| """ | ||
| pass | ||
|
|
||
| @abstractmethod | ||
| def export_root_ca_certificate(self) -> str: | ||
| """ | ||
| Export the root CA certificate in PEM format. | ||
|
|
||
| Used to install the CA certificate on the client for LDAPS connections via | ||
| :meth:`~sssd_test_framework.roles.client.Client.install_ca_cert` or | ||
| :meth:`~sssd_test_framework.utils.sssd.SSSDCommonConfiguration.use_ldaps`. | ||
|
|
||
| .. code-block:: python | ||
| :caption: Example usage | ||
|
|
||
| @pytest.mark.topology(KnownTopologyGroup.AnyDC) | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should use actual tests for examples, because they'll be generated sphinx docs. |
||
| def test_ldaps__certificate_install(client: Client, provider: GenericProvider): | ||
| client.install_ca_cert(provider) | ||
| client.firewall.outbound.drop_port(389) | ||
| # ... join or LDAPS operation | ||
|
|
||
| :return: PEM-formatted root CA certificate. | ||
| :rtype: str | ||
| :raises RuntimeError: If the certificate cannot be exported. | ||
| """ | ||
| pass | ||
|
|
||
|
|
||
| class GenericADProvider(GenericProvider): | ||
| """ | ||
|
|
@@ -1694,3 +1718,14 @@ def get(self, cert_path: str) -> dict[str, list[str]]: | |
| :rtype: dict[str, list[str]] | ||
| """ | ||
| pass | ||
|
|
||
| @abstractmethod | ||
| def export_root_ca_certificate(self) -> str: | ||
| """ | ||
| Export the root CA certificate in PEM format. | ||
|
|
||
| :return: PEM-formatted root CA certificate. | ||
| :rtype: str | ||
| :raises RuntimeError: If the certificate cannot be exported. | ||
| """ | ||
| pass | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.