Bug 1151127 - [AD] fetchPrincipalRecord returns invalid record if pools are not authenticated
Summary: [AD] fetchPrincipalRecord returns invalid record if pools are not authenticated
Keywords:
Status: CLOSED WORKSFORME
Alias: None
Product: ovirt-engine-extension-aaa-ldap
Classification: oVirt
Component: Profile.ad
Version: master
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: Alon Bar-Lev
QA Contact: Ondra Machacek
URL:
Whiteboard: infra
Depends On:
Blocks: oVirt-AAA-LDAP
TreeView+ depends on / blocked
 
Reported: 2014-10-09 15:59 UTC by Ondra Machacek
Modified: 2016-02-10 19:26 UTC (History)
14 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-02-11 20:43:06 UTC
oVirt Team: Infra
Embargoed:


Attachments (Terms of Use)
engine.log (25.02 KB, text/plain)
2014-10-09 15:59 UTC, Ondra Machacek
no flags Details


Links
System ID Private Priority Status Summary Last Updated
oVirt gerrit 34314 0 None MERGED profiles: ad: authz: properly fail if upn cannot be found 2020-06-10 14:33:09 UTC

Description Ondra Machacek 2014-10-09 15:59:41 UTC
Created attachment 945381 [details]
engine.log

Description of problem:


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

How reproducible:
always

Steps to Reproduce:
1. install ovirt-engine-extension-aaa-ldap-0.0.0-0.0.4.master.el6ev.noarch

2.
-- conf_ldap-authn-test_digest_ad.properties --

include = <ad.properties>

vars.user = vdcadmin
vars.password = xxxxxx
vars.server = qa1.qa.lab.tlv.redhat.com

pool.default.serverset.type = single
pool.default.serverset.single.server = ${global:vars.server}

auth-check.default.auth.type = digest-md5

pool.authz.auth.type = digest-md5
pool.authz.auth.digest-md5.authenticationID = ${global:vars.user}
pool.authz.auth.digest-md5.password = ${global:vars.password}

-- ldap-authn-test_digest_ad.properties --
ovirt.engine.extension.enabled = true
ovirt.engine.extension.name = ldap-auth-test_digest_ad
ovirt.engine.extension.bindings.method = jbossmodule
ovirt.engine.extension.binding.jbossmodule.module = org.ovirt.engine-extensions.aaa.ldap
ovirt.engine.extension.binding.jbossmodule.class = org.ovirt.engineextensions.aaa.ldap.AuthnExtension
ovirt.engine.extension.provides = org.ovirt.engine.api.extensions.aaa.Authn
config.profile.file.1 = /etc/ovirt-engine/extensions.d/conf_ldap-authn-test_digest_ad.properties
ovirt.engine.aaa.authn.profile.name = ldap-authn-test_digest_ad
ovirt.engine.aaa.authn.authz.plugin = ldap-authz-test_digest_ad

-- ldap-authz-test_digest_ad.properties --
ovirt.engine.extension.enabled = true
ovirt.engine.extension.name = ldap-authz-test_digest_ad
ovirt.engine.extension.bindings.method = jbossmodule
ovirt.engine.extension.binding.jbossmodule.module = org.ovirt.engine-extensions.aaa.ldap
ovirt.engine.extension.binding.jbossmodule.class = org.ovirt.engineextensions.aaa.ldap.AuthzExtension
ovirt.engine.extension.provides = org.ovirt.engine.api.extensions.aaa.Authz
config.profile.file.1 = /etc/ovirt-engine/extensions.d/conf_ldap-authn-test_digest_ad.propertie

3. Login as user vdcadmin from ldap-auth-test_digest_ad to engine.

Actual results:
User can't login.

Expected results:
User successfully logged in.

Additional info:

Comment 1 Yair Zaslavsky 2014-10-21 10:32:23 UTC
You probably forgot to mention assigning permissions to vdcadmin somehow?

Comment 2 Ondra Machacek 2014-10-21 11:09:06 UTC
It's not needed for reproducing.

Comment 3 Alon Bar-Lev 2014-10-21 12:55:43 UTC
The gc pool was not authenticated in this case.

Adding the following resolves the issue.

pool.gc.auth.type = digest-md5
pool.gc.auth.digest-md5.authenticationID = ${global:vars.user}
pool.gc.auth.digest-md5.password = ${global:vars.password}

However, there should have been a proper failure.

Comment 4 Alon Bar-Lev 2014-10-21 15:32:59 UTC
took me a while... but per configuration in comment#0 is incorrect. it should be:

---
include = <ad.properties>

vars.domain = qa.lab.tlv.redhat.com
vars.user = vdcadmin
vars.password = xxxxxx
vars.server = qa1.${global:vars.domain}

pool.default.serverset.type = single
pool.default.serverset.single.server = ${global:vars.server}

pool.default.auth.simple.bindDN = ${global:vars.user}@${global:vars.domain}
pool.default.auth.simple.password = ${global:vars.password}
pool.default.auth.digest-md5.authenticationID = ${global:vars.user}
pool.default.auth.digest-md5.realm = ${global:vars.domain}
pool.default.auth.digest-md5.password = ${global:vars.password}

auth-check.default.auth.type = digest-md5
pool.authz.auth.type = digest-md5
//pool.gc.auth.type = digest-md5
---

active directory requires gc access to be authenticated, so we must provide credentials to all pools, the authn will not perform authentication so it is good.
however, active directory user format differs when using digest-md5 and simple, so we need to provide correct credentials to each if we do not set the gc pool to perform digest-md5 as well.


Note You need to log in before you can comment on or make changes to this bug.