<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<p dir="ltr"><br>
Den 24 mars 2016 7:26 em skrev Ondra Machacek &lt;omachace@redhat.com&gt;:<br>
&gt;<br>
&gt; On 03/24/2016 06:16 PM, Karli Sjöberg wrote:<br>
&gt; &gt; Hi!<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Starting new thread instead of jacking someone else´s.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Managed to migrate from old 'engine-manage-domains' auth to aaa-ldap using:<br>
&gt; &gt;<br>
&gt; &gt; #| ovirt-engine-kerbldap-migration-tool --domain baz.foo.bar --cacert<br>
&gt; &gt; /tmp/ca.crt --apply<br>
&gt; &gt; |<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; All OK, no errors, but cannot log in:<br>
&gt; &gt;<br>
&gt; &gt; # ovirt-engine-extensions-tool aaa login-user --profile=baz.foo.bar-new<br>
&gt; &gt; --user-name=user:<br>
&gt;<br>
&gt; If you want to login with user with different upn suffix, then just <br>
&gt; append that suffix<br>
&gt;<br>
&gt; $ ovirt-engine-extensions-tool aaa login-user --profile=baz.foo.bar-new <br>
&gt; --user-name=user@foo.bar</p>
<p dir="ltr">OK, some progress, that works!</p>
<p dir="ltr">&gt;<br>
&gt; If you have more suffixes and want to have some as default you can use <br>
&gt; following approach:<br>
&gt;<br>
&gt; 1) install ovirt-engine-extension-aaa-misc<br>
&gt;<br>
&gt; 2) create new mapping extension like this:<br>
&gt; /etc/ovirt-engine/extensions.d/mapping-suffix.properties<br>
&gt;<br>
&gt; ovirt.engine.extension.name = mapping-suffix<br>
&gt; ovirt.engine.extension.bindings.method = jbossmodule<br>
&gt; ovirt.engine.extension.binding.jbossmodule.module = <br>
&gt; org.ovirt.engine-extensions.aaa.misc<br>
&gt; ovirt.engine.extension.binding.jbossmodule.class = <br>
&gt; org.ovirt.engineextensions.aaa.misc.mapping.MappingExtension<br>
&gt; ovirt.engine.extension.provides = <br>
&gt; org.ovirt.engine.api.extensions.aaa.Mapping<br>
&gt; config.mapUser.type = regex<br>
&gt; config.mapUser.pattern = ^(?&lt;user&gt;[^@]*)$</p>
<p dir="ltr">Is that supposed to really say '&lt;user&gt;' or should it be changed to a real user name? Either way, it doesn't work, I tried it all.</p>
<p dir="ltr">&gt; config.mapUser.replacement = ${user}@foo.bar<br>
&gt; config.mapUser.mustMatch = false<br>
&gt;<br>
&gt; 3) select a mapping plugin in authn configuration:<br>
&gt;<br>
&gt; ovirt.engine.aaa.authn.mapping.plugin = mapping-suffix<br>
&gt;<br>
&gt; With above configuration in use, your user 'user' witll be mapped to <br>
&gt; user 'user@foo.bar'<br>
&gt; and users 'user@anotherdomain.foo.bar' will remain <br>
&gt; 'user@anotherdomain.foo.bar'.</p>
<p dir="ltr">This however does not, it doesn't replace the suffix as it's supposed to. I tried with many different types of the 'mapUser.pattern' but it simply won't change it, even if I type in '= ^user@baz.foo.bar$', the error is the same:(</p>
<p dir="ltr">/K</p>
<p dir="ltr">&gt;<br>
&gt; &gt;<br>
&gt; &gt; API: &lt;--Authn.InvokeCommands.AUTHENTICATE_CREDENTIALS result=SUCCESS<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; but:<br>
&gt; &gt;<br>
&gt; &gt; API: --&gt;Authz.InvokeCommands.FETCH_PRINCIPAL_RECORD<br>
&gt; &gt; principal='user@baz.foo.bar'<br>
&gt; &gt; SEVERE&nbsp; Cannot resolve principal 'user@baz.foo.bar'<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; So it fails.<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; # ldapsearch -x -H ldap://baz.foo.bar -D user@foo.bar -W -b<br>
&gt; &gt; DC=baz,DC=foo,DC=bar -s sub &quot;(samAccountName=user)&quot; userPrincipalName |<br>
&gt; &gt; grep 'userPrincipalName:'<br>
&gt; &gt;<br>
&gt; &gt; userPrincipalName: user@foo.bar<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; |How do you configure AAA with base 'DC=baz,DC=foo,DC=bar' when<br>
&gt; &gt; userPrincipalName ends only on '@foo.bar'?<br>
&gt; &gt;<br>
&gt; &gt; /K<br>
&gt; &gt; |<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; _______________________________________________<br>
&gt; &gt; Users mailing list<br>
&gt; &gt; Users@ovirt.org<br>
&gt; &gt; http://lists.ovirt.org/mailman/listinfo/users<br>
&gt; &gt;<br>
</p>
</body>
</html>