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

Domain_realm mapping interop with MIT Kerberos #327

Open
grawity opened this issue Nov 25, 2024 · 1 comment
Open

Domain_realm mapping interop with MIT Kerberos #327

grawity opened this issue Nov 25, 2024 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@grawity
Copy link

grawity commented Nov 25, 2024

I don't know whether the implementation of the krb5.conf file is meant to be fully compatible with MIT Kerberos (which defined the file) but posting anyway.

#326 added:

fn matches_domain(domain: &str, mapping_domain: &str) -> bool {
    if mapping_domain.starts_with('.') {
        domain
            .split_once('.')
            .map(|(_, remaining)| remaining.eq_ignore_ascii_case(&mapping_domain[1..]))
            .unwrap_or(false)
    } else {
        domain.eq_ignore_ascii_case(mapping_domain)
    }
    domain.to_string()
}

which, if I understand the code correctly, treats example.com as an exact match and .example.com as a suffix match.

According to krb5/krb5@8f5ce82, however, that's not how MIT Kerberos handles it – their docs claimed it did but that
didn't match the code, and they chose to keep the code behavior and change docs. So instead, a plain example.com matches itself and subdomains (unless overridden by an explicit .example.com setting), whereas .example.com only matches subdomains but not itself.

(I don't know how Heimdal Kerberos handles it; couldn't figure out the code.)

@CBenoit
Copy link
Member

CBenoit commented Nov 26, 2024

Thank you for reporting this. I think we should aim to be as close as possible.
FYI @TheBestTvarynka

@CBenoit CBenoit added the enhancement New feature or request label Nov 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

3 participants