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

add validation to prevent filters on dn lookups #9134

Merged
merged 1 commit into from
Jun 3, 2016

Conversation

deads2k
Copy link
Contributor

@deads2k deads2k commented Jun 2, 2016

Bug https://bugzilla.redhat.com/show_bug.cgi?id=1339325

Tightens validation for ldap sync config. Filters on dn lookups don't work.

@stevekuznetsov can you tag this for the right extended test?

@stevekuznetsov
Copy link
Contributor

[testonlyextended][extended:ldap_groups]

@deads2k
Copy link
Contributor Author

deads2k commented Jun 2, 2016

[test]

@stevekuznetsov
Copy link
Contributor

error: validation of LDAP sync config failed: usersQuery.filter: Invalid value: "(objectclass=inetOrgPerson)": cannot specify a filter when using "dn" as the UID attribute
See 'oadm groups sync -h' for help and examples.
!!! Error in test/extended/ldap_groups.sh:231
    'oadm groups sync --sync-config=sync-config-paging.yaml --confirm' exited with status 1

hoisted by your own petard?

@deads2k
Copy link
Contributor Author

deads2k commented Jun 2, 2016

hoisted by your own petard?

I blame the guy who wrote a set of tests that were wrong :).

@deads2k
Copy link
Contributor Author

deads2k commented Jun 2, 2016

@stevekuznetsov other than the test, anything?

}
return validationResults
}

if _, err := ldap.CompileFilter(query.Filter); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This implicitly disallows not specifying a filter, so how is the validation not failing for those missing filters?

@stevekuznetsov
Copy link
Contributor

This allows queries without filters, which complicates the config substantially... let's see the Docs PR to determine how onerous it is to explain this.

@deads2k
Copy link
Contributor Author

deads2k commented Jun 2, 2016

This allows queries without filters, which complicates the config substantially... let's see the Docs PR to determine how onerous it is to explain this.

It only allows them when the caller explicitly says, "this exact one (not category) will only be used to lookup dns". I don't think it affects docs at all. Even if it does, do you see us not doing this?

@stevekuznetsov
Copy link
Contributor

I understand it's correct, but clearly there is a documentation gap -- we should definitely doc that a filter is not expected and will not be used if the UID attribute for a query is the DN.

@openshift-bot
Copy link
Contributor

Evaluated for origin testonlyextended up to 9351adc

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 9351adc

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/testonlyextended SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin_extended/206/) (Extended Tests: ldap_groups)

@deads2k
Copy link
Contributor Author

deads2k commented Jun 3, 2016

[merge]

@openshift-bot
Copy link
Contributor

openshift-bot commented Jun 3, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/4422/) (Image: devenv-rhel7_4311)

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 9351adc

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/4422/)

@openshift-bot openshift-bot merged commit ad7eca0 into openshift:master Jun 3, 2016
wsun1 added a commit to openshift-qe/v3-testfiles that referenced this pull request Aug 4, 2016
@deads2k deads2k deleted the fix-ldap branch September 6, 2016 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants