<div dir="ltr"><div><div>Here it comes again...<br><br></div>I have an issue with this deployment plan.<br><br></div><div>I use a script to deploy the client configuration. Outside of other things,<br>the script write a fresh sssd.conf (including &quot;dns_discovery_domain&quot; and<br>
&quot;ldap_backup_uri&quot; as discussed), and then launch authconfig.<br></div><div><br>The problem is the following :<br><br></div><div>since my &quot;fresh&quot; sssd.conf doesn&#39;t include any &quot;ldap_uri&quot; (I don&#39;t need<br>
any since I want to use the DNS service discovery), then authconfig<br>add this tuning.<br><br></div><div>When I look at the transactions with tshark, it sounds like sssd is<br>ignoring the &quot;dns_discovery_domain&quot; (and use ldap servers as declared<br>
</div><div>in &quot;ldap_uri&quot;).<br><br></div><div>Do you confirm ?<br></div><div><br></div><div>Question : is there any way to avoid authconfig configuring &quot;ldap_uri&quot;<br></div><div>in sssd.conf if &quot;dns_discovery_domain&quot; is already tuned ?<br>
</div><div><br></div><div>Other comment ?<br></div><div><br></div><div>Thanks,<br><br>---<br>Olivier<br></div><div><br></div><div><br><br><br><br><br><br></div><div><br></div><br><div><br><br><br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">2013/9/26 Jakub Hrozek <span dir="ltr">&lt;<a href="mailto:jhrozek@redhat.com" target="_blank">jhrozek@redhat.com</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Thu, Sep 26, 2013 at 11:00:00AM +0200, Olivier wrote:<br>
&gt; Hello Jakub and all,<br>
&gt;<br>
&gt; may be the following could help : to be honnest, from an operational point<br>
&gt; of view<br>
&gt; I like the centralisation perspective offered by DNS discovery.<br>
&gt;<br>
&gt; Any comment on these test/audit are welcomed.<br>
&gt;<br>
&gt; for the following audit, the client side is<br>
&gt; <a href="http://rhel6-web.prod-int.example.fr" target="_blank">rhel6-web.prod-int.example.fr</a>: 10.yy.yy.17<br>
&gt;<br>
&gt; Let see what says the dns about ldap service :<br>
&gt;<br>
&gt; # dig _ldap._<a href="http://tcp.example.fr" target="_blank">tcp.example.fr</a> SRV<br>
&gt;<br>
&gt; ;; QUESTION SECTION:<br>
&gt; ;_ldap._<a href="http://tcp.example.fr" target="_blank">tcp.example.fr</a>. IN      SRV<br>
&gt;<br>
&gt; ;; ANSWER SECTION:<br>
&gt; _ldap._<a href="http://tcp.example.fr" target="_blank">tcp.example.fr</a>. 172800   IN      SRV     10 0 389<br>
&gt; <a href="http://ldap3.location1.example.fr" target="_blank">ldap3.location1.example.fr</a>.<br>
&gt; _ldap._<a href="http://tcp.example.fr" target="_blank">tcp.example.fr</a>. 172800   IN      SRV     20 0 389<br>
&gt; <a href="http://ldap1.location2.example.fr" target="_blank">ldap1.location2.example.fr</a>.<br>
&gt; _ldap._<a href="http://tcp.example.fr" target="_blank">tcp.example.fr</a>. 172800   IN      SRV     30 0 389<br>
&gt; <a href="http://ldap2.location3.example.fr" target="_blank">ldap2.location3.example.fr</a>.<br>
&gt;<br>
&gt; ;; AUTHORITY SECTION:<br>
&gt; ...<br>
&gt;<br>
&gt; ;; ADDITIONAL SECTION:<br>
&gt; <a href="http://ldap3.example.fr" target="_blank">ldap3.example.fr</a>. 172800        IN A    10.xx.xx.3<br>
&gt; <a href="http://ldap1.example.fr" target="_blank">ldap1.example.fr</a>. 172800        IN A    10.xx.xx.1<br>
&gt; <a href="http://ldap2.example.fr" target="_blank">ldap2.example.fr</a>. 172800        IN A    10.xx.xx.2<br>
&gt;<br>
&gt; Now let&#39;s restart sssd:<br>
&gt;<br>
&gt; # tshark -i eth1 not port 22<br>
&gt;<br>
&gt;  34.525938  10.xx.xx.17 -&gt; 10.xx.xx.3   TLSv1 Application Data<br>
&gt;  34.525969  10.yy.yy.17 -&gt; 10.xx.xx.3   TLSv1 Encrypted Alert<br>
&gt;  34.525982  10.yy.yy.17 -&gt; 10.xx.xx.3   TCP 36915 &gt; ldap [FIN, ACK]<br>
&gt; Seq=1691 Ack=3075 Win=23296 Len=0 TSV=746424 TSER=60539402<br>
&gt;  34.526883   10.xx.xx.3 -&gt; 10.yy.yy.17  TCP ldap &gt; 36915 [FIN, ACK]<br>
&gt; Seq=3075 Ack=1692 Win=22016 Len=0 TSV=60551396 TSER=746424<br>
&gt;  34.526897  10.yy.yy.17 -&gt; 10.xx.xx.3   TCP 36915 &gt; ldap [ACK] Seq=1692<br>
&gt; Ack=3076 Win=23296 Len=0 TSV=746425 TSER=60551396<br>
&gt;  34.562795  10.yy.yy.17 -&gt; 10.yy.yy.162 DNS Standard query A<br>
&gt; <a href="http://rhel6-web.prod-int.example.fr" target="_blank">rhel6-web.prod-int.example.fr</a><br>
&gt;  34.563250 10.yy.yy.162 -&gt; 10.yy.yy.17  DNS Standard query response A<br>
&gt; 10.yy.yy.17<br>
&gt;  35.568646  10.yy.yy.17 -&gt; 10.yy.yy.162 DNS Standard query SRV _ldap._<br>
&gt; <a href="http://tcp.example.fr" target="_blank">tcp.example.fr</a><br>
&gt;<br>
&gt; --&gt;&gt; HERE:<br>
&gt;<br>
&gt;  35.569170 10.yy.yy.162 -&gt; 10.yy.yy.17  DNS Standard query response SRV 20<br>
&gt; 0 389 <a href="http://ldap1.example.fr" target="_blank">ldap1.example.fr</a> SRV 30 0 389 <a href="http://ldap2.example.fr" target="_blank">ldap2.example.fr</a> SRV 10 0 389 ldap\<br>
&gt; <a href="http://3.example.fr" target="_blank">3.example.fr</a><br>
&gt;  35.569421  10.yy.yy.17 -&gt; 10.yy.yy.162 DNS Standard query A<br>
&gt; <a href="http://ldap3.example.fr" target="_blank">ldap3.example.fr</a><br>
&gt;  35.569625 10.yy.yy.162 -&gt; 10.yy.yy.17  DNS Standard query response A<br>
&gt; 10.xx.xx.3<br>
&gt;  35.569774  10.yy.yy.17 -&gt; 10.xx.xx.3   TCP 36916 &gt; ldap [SYN] Seq=0<br>
&gt; Win=14600 Len=0 MSS=1460 TSV=747468 TSER=0 WS=6<br>
&gt;  35.570242   10.xx.xx.3 -&gt; 10.yy.yy.17  TCP ldap &gt; 36916 [SYN, ACK] Seq=0<br>
&gt; Ack=1 Win=14480 Len=0 MSS=1460 TSV=60552439 TSER=747468 WS=7<br>
&gt;  35.570257  10.yy.yy.17 -&gt; 10.xx.xx.3   TCP 36916 &gt; ldap [ACK] Seq=1 Ack=1<br>
&gt; Win=14656 Len=0 TSV=747468 TSER=60552439<br>
&gt;  35.570594  10.yy.yy.17 -&gt; 10.xx.xx.3   LDAP extendedReq(1)<br>
&gt; LDAP_START_TLS_OID<br>
&gt;  35.570786   10.xx.xx.3 -&gt; 10.yy.yy.17  TCP ldap &gt; 36916 [ACK] Seq=1 Ack=32<br>
&gt; Win=14592 Len=0 TSV=60552440 TSER=747469<br>
&gt;  35.570987   10.xx.xx.3 -&gt; 10.yy.yy.17  LDAP extendedResp(1)<br>
&gt; [LDAP_START_TLS_OID responseName missing]<br>
&gt;  35.570994  10.yy.yy.17 -&gt; 10.xx.xx.3   TCP 36916 &gt; ldap [ACK] Seq=32<br>
&gt; Ack=15 Win=14656 Len=0 TSV=747469 TSER=60552440<br>
&gt;<br>
&gt; --&gt;&gt; HERE:<br>
&gt;<br>
&gt;  35.578964  10.yy.yy.17 -&gt; 10.xx.xx.3   SSL Client Hello<br>
&gt;  35.579506   10.xx.xx.3 -&gt; 10.yy.yy.17  TCP [TCP segment of a reassembled<br>
&gt; PDU]<br>
&gt;  35.579513   10.xx.xx.3 -&gt; 10.yy.yy.17  TLSv1 Server Hello, Certificate,<br>
&gt; Certificate Request, Server Hello Done<br>
&gt;  35.579537  10.yy.yy.17 -&gt; 10.xx.xx.3   TCP 36916 &gt; ldap [ACK] Seq=134<br>
&gt; Ack=2005 Win=20416 Len=0 TSV=747478 TSER=60552448<br>
&gt;  35.581211  10.yy.yy.17 -&gt; 10.xx.xx.3   TLSv1 Certificate, Client Key<br>
&gt; Exchange, Change Cipher Spec, Encrypted Handshake Message<br>
&gt;  35.581994   10.xx.xx.3 -&gt; 10.yy.yy.17  TLSv1 Change Cipher Spec, Encrypted<br>
&gt; Handshake Message<br>
&gt;<br>
&gt; --&gt; sound&#39;s OK !<br>
&gt;<br>
&gt; now let&#39;s have a look if I log in from <a href="http://civette.example.fr" target="_blank">civette.example.fr</a> (10.zz.zz.94) :<br>
&gt;<br>
&gt; # tshark -i eth1 not port 22<br>
&gt;   0.000000  10.yy.yy.17 -&gt; 10.yy.yy.162 DNS Standard query PTR<br>
&gt; 94.zz.zz.10.in-addr.arpa<br>
&gt;   0.000306 10.yy.yy.162 -&gt; 10.yy.yy.17  DNS Standard query response PTR<br>
&gt; <a href="http://civette.example.fr" target="_blank">civette.example.fr</a><br>
&gt;   0.000507  10.yy.yy.17 -&gt; 10.yy.yy.162 DNS Standard query A<br>
&gt; <a href="http://civette.example.fr" target="_blank">civette.example.fr</a><br>
&gt;   0.000703 10.yy.yy.162 -&gt; 10.yy.yy.17  DNS Standard query response A<br>
&gt; 10.zz.zz.94<br>
&gt;   0.007700  10.yy.yy.17 -&gt; 10.xx.xx.3   TCP 36916 &gt; ldap [PSH, ACK] Seq=1<br>
&gt; Ack=1 Win=364 Len=565 TSV=845893 TSER=60553254<br>
&gt;   0.008561   10.xx.xx.3 -&gt; 10.yy.yy.17  TCP ldap &gt; 36916 [PSH, ACK] Seq=1<br>
&gt; Ack=566 Win=173 Len=53 TSV=60650865 TSER=845893<br>
&gt;   ....<br>
&gt;   4.674892  10.yy.yy.17 -&gt; 10.xx.xx.3   TCP 36918 &gt; ldap [ACK] Seq=1 Ack=1<br>
&gt; Win=14656 Len=0 TSV=850561 TSER=60655531<br>
&gt;<br>
&gt; --&gt;&gt; HERE :<br>
&gt;<br>
&gt;   4.675045  10.yy.yy.17 -&gt; 10.xx.xx.3   LDAP extendedReq(1)<br>
&gt; LDAP_START_TLS_OID<br>
&gt;   4.675213   10.xx.xx.3 -&gt; 10.yy.yy.17  TCP ldap &gt; 36918 [ACK] Seq=1 Ack=32<br>
&gt; Win=14592 Len=0 TSV=60655531 TSER=850561<br>
&gt;   4.675473   10.xx.xx.3 -&gt; 10.yy.yy.17  LDAP extendedResp(1)<br>
&gt; [LDAP_START_TLS_OID responseName missing]<br>
&gt;   4.675479  10.yy.yy.17 -&gt; 10.xx.xx.3   TCP 36918 &gt; ldap [ACK] Seq=32<br>
&gt; Ack=15 Win=14656 Len=0 TSV=850561 TSER=60655532<br>
&gt;   4.675677  10.yy.yy.17 -&gt; 10.xx.xx.3   SSL Client Hello<br>
&gt;   4.676129   10.xx.xx.3 -&gt; 10.yy.yy.17  TCP [TCP segment of a reassembled<br>
&gt; PDU]<br>
&gt;   4.676136   10.xx.xx.3 -&gt; 10.yy.yy.17  TLSv1 Server Hello, Certificate,<br>
&gt; Certificate Request, Server Hello Done<br>
&gt;   4.676176  10.yy.yy.17 -&gt; 10.xx.xx.3   TCP 36918 &gt; ldap [ACK] Seq=134<br>
&gt; Ack=2005 Win=20416 Len=0 TSV=850562 TSER=60655532<br>
&gt;   4.677304  10.yy.yy.17 -&gt; 10.xx.xx.3   TLSv1 Certificate, Client Key<br>
&gt; Exchange, Change Cipher Spec, Encrypted Handshake Message<br>
&gt;   4.678041   10.xx.xx.3 -&gt; 10.yy.yy.17  TLSv1 Change Cipher Spec, Encrypted<br>
&gt; Handshake Message<br>
&gt;<br>
&gt; ....<br>
&gt;<br>
&gt; --&gt; to be honest I don&#39;t read fluently all this, but as far as I can see,<br>
&gt; it sounds to work very well<br>
&gt;     (and I log in properly)<br>
&gt;<br>
&gt; From a configuration point of view, Here is what I have done (and I plan to<br>
&gt; deploy )<br>
&gt; on my clients side :<br>
&gt;<br>
&gt; # cat /etc/nsswitch.conf<br>
&gt; passwd:     files sss<br>
&gt; shadow:     files sss<br>
&gt; group:      files sss<br>
&gt; netgroup:   files sss<br>
&gt; hosts:      files dns<br>
&gt; services:   files sss<br>
&gt;<br>
&gt; # cat /etc/sssd.conf<br>
&gt; [domain/default]<br>
&gt; ldap_id_use_start_tls = True<br>
&gt; cache_credentials = False<br>
&gt; ldap_search_base = dc=example,dc=fr<br>
&gt; krb5_realm = <a href="http://EXAMPLE.COM" target="_blank">EXAMPLE.COM</a><br>
&gt; krb5_server = <a href="http://kerberos.example.com" target="_blank">kerberos.example.com</a><br>
&gt; id_provider = ldap<br>
&gt; auth_provider = ldap<br>
&gt; chpass_provider = ldap<br>
&gt; ldap_tls_cacertdir = /etc/openldap/cacerts<br>
&gt; ldap_user_ssh_public_key = sshPublicKey<br>
&gt; dns_discovery_domain = <a href="http://example.fr" target="_blank">example.fr</a><br>
&gt;<br>
&gt; [sssd]<br>
&gt;<br>
&gt; config_file_version = 2<br>
&gt; services = nss, pam, ssh<br>
&gt; domains = default<br>
&gt;<br>
&gt; [nss]<br>
&gt;<br>
&gt; [pam]<br>
&gt;<br>
&gt; [ssh]<br>
&gt;<br>
&gt; Other than in sssd.conf, I have not declared any ldap server nor<br>
&gt; any information about the CA certificate location anywhere (no<br>
&gt; ldap uri or tls_cacertdir in /etc/pam_ldap.conf for example, nor<br>
&gt; anywhere).<br>
&gt;<br>
&gt; I however have kept the start_tls directive in files when relevant.<br>
&gt;<br>
&gt; Note : cacert needs to be added in ldap.conf for sudo-ldap to work<br>
&gt; in my case.<br>
&gt;<br>
&gt; To be honnest my config is a bit more subtile on the DNS server<br>
&gt; side since I wanted a way to tune the discovery service so that<br>
&gt; the client find different weights for ldap prefered servers depending<br>
&gt; on where it is physically located : I use a zone per location to do<br>
&gt; that and play with  the sssd &quot;dns_discovery_domain&quot; parameter.<br>
&gt;<br>
&gt; I also tested the fallback : when I shut down the first ldap server,<br>
&gt; sssd seems to ask for the next one afeter one second : is that<br>
&gt; an hard coded sssd parameter ?<br>
<br>
</div></div>It should ask for the next one when the next request comes in. The<br>
timeout itself depends on the network conditions, ie if the LDAP server<br>
machine was reachable but not operational, then I would suspect the<br>
ldap_network_timeout would affect the time it takes to fail over.<br>
<div class="im"><br>
&gt;<br>
&gt; Any comment on that plan ?<br>
<br>
</div>I think in general the setup looks good, you might just find the<br>
ldap_backup_uri parameter interesting for cases the DNS SRV records were<br>
not usable for one reason or another.<br>
<div class="HOEnZb"><div class="h5">_______________________________________________<br>
sssd-users mailing list<br>
<a href="mailto:sssd-users@lists.fedorahosted.org">sssd-users@lists.fedorahosted.org</a><br>
<a href="https://lists.fedorahosted.org/mailman/listinfo/sssd-users" target="_blank">https://lists.fedorahosted.org/mailman/listinfo/sssd-users</a><br>
</div></div></blockquote></div><br></div>