Skip to content
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

Unable to lookup AD user if the AD group contains '@' symbol #6055

Closed
thalman opened this issue Mar 11, 2022 · 4 comments
Closed

Unable to lookup AD user if the AD group contains '@' symbol #6055

thalman opened this issue Mar 11, 2022 · 4 comments
Labels
Bugzilla Closed: Fixed Issue was closed as fixed.

Comments

@thalman
Copy link
Contributor

thalman commented Mar 11, 2022

Description of problem:

Unable to lookup AD user if the AD group contains '@' symbol

Workaround: Adding re_expression = (((?P.+)@(?P[^@]+$))|(^(?P[^@\\]+)$)) on the IPA server and client's /etc/sssd/sssd.conf

Version-Release number of selected component (if applicable):

sssd version: sssd-2.4.0-9.el8_4.2.x86_64

@thalman
Copy link
Contributor Author

thalman commented Mar 11, 2022

@thalman
Copy link
Contributor Author

thalman commented Mar 11, 2022

We can assume that domain part (DNS name or kerberos realm) can't contain @ and the default can be improved.

thalman added a commit to thalman/sssd that referenced this issue Mar 11, 2022
Some Active Directory groups, typically those used for MS Exchange
contain an “@” sign in the name. New IPA and AD re_expression
default handles it correctly, considering that the domain is everything
that follows the last '@'.

Resolves: SSSD#6055
thalman added a commit to thalman/sssd that referenced this issue Mar 18, 2022
Some Active Directory groups, typically those used for MS Exchange
contain an “@” sign in the name. New IPA and AD re_expression
default handles it correctly, considering that the domain is everything
that follows the last '@'.

:relnote: Better default for IPA/AD re_expression. Tunning for
group names containing '@' is no longer needed.

Resolves: SSSD#6055
@pbrezina
Copy link
Member

Pushed PR: #6044

  • master
    • dde276e - TESTS: New tests for IPA/AD re_expression default
    • c159f52 - usertools: move default re_expression definition
    • 0c0705e - usertools: better default for IPA/AD re_expression

@pbrezina pbrezina added the Closed: Fixed Issue was closed as fixed. label Mar 23, 2022
sumit-bose added a commit to sumit-bose/sssd that referenced this issue Jun 8, 2022
It is allowed to have different regular-expression to split the input
name for different domains. After the regex is evaluated and a domain
name was found in the input it has to be check if the domain name
corresponds to the domain the regex is coming from.

E.g. with the implicit files provider enabled the file provider might
use a simple default regex while and additional IPA or AD provider will
have a more complex one which e.g. properly handles @-characters in
names. When evaluation in input the simple regex will come first and
will split the name but will miss part of the user name part if the name
contains an @-character. Currently SSSD check if the found domain name
matches any of the know domains or sub-domains which is wrong because
the regex was coming from the files provider and hence it should only
handle its own objects.

With this patch not all domains are checked but only the current one and
its sub-domains, if any. This behavior is also mentioned in a comment
already in the code. As a result in the above example the check with
the results form the simple regex with fail and then the more complex
regex of the other domain will be used which can split the name
properly.

Resolves: SSSD#6055
alexey-tikhonov pushed a commit that referenced this issue Jun 13, 2022
It is allowed to have different regular-expression to split the input
name for different domains. After the regex is evaluated and a domain
name was found in the input it has to be check if the domain name
corresponds to the domain the regex is coming from.

E.g. with the implicit files provider enabled the file provider might
use a simple default regex while and additional IPA or AD provider will
have a more complex one which e.g. properly handles @-characters in
names. When evaluation in input the simple regex will come first and
will split the name but will miss part of the user name part if the name
contains an @-character. Currently SSSD check if the found domain name
matches any of the know domains or sub-domains which is wrong because
the regex was coming from the files provider and hence it should only
handle its own objects.

With this patch not all domains are checked but only the current one and
its sub-domains, if any. This behavior is also mentioned in a comment
already in the code. As a result in the above example the check with
the results form the simple regex with fail and then the more complex
regex of the other domain will be used which can split the name
properly.

Resolves: #6055

Reviewed-by: Alexey Tikhonov <atikhono@redhat.com>
Reviewed-by: Tomáš Halman <thalman@redhat.com>
alexey-tikhonov pushed a commit that referenced this issue Jun 13, 2022
It is allowed to have different regular-expression to split the input
name for different domains. After the regex is evaluated and a domain
name was found in the input it has to be check if the domain name
corresponds to the domain the regex is coming from.

E.g. with the implicit files provider enabled the file provider might
use a simple default regex while and additional IPA or AD provider will
have a more complex one which e.g. properly handles @-characters in
names. When evaluation in input the simple regex will come first and
will split the name but will miss part of the user name part if the name
contains an @-character. Currently SSSD check if the found domain name
matches any of the know domains or sub-domains which is wrong because
the regex was coming from the files provider and hence it should only
handle its own objects.

With this patch not all domains are checked but only the current one and
its sub-domains, if any. This behavior is also mentioned in a comment
already in the code. As a result in the above example the check with
the results form the simple regex with fail and then the more complex
regex of the other domain will be used which can split the name
properly.

Resolves: #6055

Reviewed-by: Alexey Tikhonov <atikhono@redhat.com>
Reviewed-by: Tomáš Halman <thalman@redhat.com>
(cherry picked from commit 9656516)
@alexey-tikhonov
Copy link
Member

Pushed PR: #6205

  • master
    • 9656516 - names: only check sub-domains for regex match
  • sssd-2-7
    • 536dc9e - names: only check sub-domains for regex match

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugzilla Closed: Fixed Issue was closed as fixed.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants