<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 "dns_discovery_domain" and<br>
"ldap_backup_uri" as discussed), and then launch authconfig.<br></div><div><br>The problem is the following :<br><br></div><div>since my "fresh" sssd.conf doesn't include any "ldap_uri" (I don'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 "dns_discovery_domain" (and use ldap servers as declared<br>
</div><div>in "ldap_uri").<br><br></div><div>Do you confirm ?<br></div><div><br></div><div>Question : is there any way to avoid authconfig configuring "ldap_uri"<br></div><div>in sssd.conf if "dns_discovery_domain" 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"><<a href="mailto:jhrozek@redhat.com" target="_blank">jhrozek@redhat.com</a>></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>
> Hello Jakub and all,<br>
><br>
> may be the following could help : to be honnest, from an operational point<br>
> of view<br>
> I like the centralisation perspective offered by DNS discovery.<br>
><br>
> Any comment on these test/audit are welcomed.<br>
><br>
> for the following audit, the client side is<br>
> <a href="http://rhel6-web.prod-int.example.fr" target="_blank">rhel6-web.prod-int.example.fr</a>: 10.yy.yy.17<br>
><br>
> Let see what says the dns about ldap service :<br>
><br>
> # dig _ldap._<a href="http://tcp.example.fr" target="_blank">tcp.example.fr</a> SRV<br>
><br>
> ;; QUESTION SECTION:<br>
> ;_ldap._<a href="http://tcp.example.fr" target="_blank">tcp.example.fr</a>. IN SRV<br>
><br>
> ;; ANSWER SECTION:<br>
> _ldap._<a href="http://tcp.example.fr" target="_blank">tcp.example.fr</a>. 172800 IN SRV 10 0 389<br>
> <a href="http://ldap3.location1.example.fr" target="_blank">ldap3.location1.example.fr</a>.<br>
> _ldap._<a href="http://tcp.example.fr" target="_blank">tcp.example.fr</a>. 172800 IN SRV 20 0 389<br>
> <a href="http://ldap1.location2.example.fr" target="_blank">ldap1.location2.example.fr</a>.<br>
> _ldap._<a href="http://tcp.example.fr" target="_blank">tcp.example.fr</a>. 172800 IN SRV 30 0 389<br>
> <a href="http://ldap2.location3.example.fr" target="_blank">ldap2.location3.example.fr</a>.<br>
><br>
> ;; AUTHORITY SECTION:<br>
> ...<br>
><br>
> ;; ADDITIONAL SECTION:<br>
> <a href="http://ldap3.example.fr" target="_blank">ldap3.example.fr</a>. 172800 IN A 10.xx.xx.3<br>
> <a href="http://ldap1.example.fr" target="_blank">ldap1.example.fr</a>. 172800 IN A 10.xx.xx.1<br>
> <a href="http://ldap2.example.fr" target="_blank">ldap2.example.fr</a>. 172800 IN A 10.xx.xx.2<br>
><br>
> Now let's restart sssd:<br>
><br>
> # tshark -i eth1 not port 22<br>
><br>
> 34.525938 10.xx.xx.17 -> 10.xx.xx.3 TLSv1 Application Data<br>
> 34.525969 10.yy.yy.17 -> 10.xx.xx.3 TLSv1 Encrypted Alert<br>
> 34.525982 10.yy.yy.17 -> 10.xx.xx.3 TCP 36915 > ldap [FIN, ACK]<br>
> Seq=1691 Ack=3075 Win=23296 Len=0 TSV=746424 TSER=60539402<br>
> 34.526883 10.xx.xx.3 -> 10.yy.yy.17 TCP ldap > 36915 [FIN, ACK]<br>
> Seq=3075 Ack=1692 Win=22016 Len=0 TSV=60551396 TSER=746424<br>
> 34.526897 10.yy.yy.17 -> 10.xx.xx.3 TCP 36915 > ldap [ACK] Seq=1692<br>
> Ack=3076 Win=23296 Len=0 TSV=746425 TSER=60551396<br>
> 34.562795 10.yy.yy.17 -> 10.yy.yy.162 DNS Standard query A<br>
> <a href="http://rhel6-web.prod-int.example.fr" target="_blank">rhel6-web.prod-int.example.fr</a><br>
> 34.563250 10.yy.yy.162 -> 10.yy.yy.17 DNS Standard query response A<br>
> 10.yy.yy.17<br>
> 35.568646 10.yy.yy.17 -> 10.yy.yy.162 DNS Standard query SRV _ldap._<br>
> <a href="http://tcp.example.fr" target="_blank">tcp.example.fr</a><br>
><br>
> -->> HERE:<br>
><br>
> 35.569170 10.yy.yy.162 -> 10.yy.yy.17 DNS Standard query response SRV 20<br>
> 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>
> <a href="http://3.example.fr" target="_blank">3.example.fr</a><br>
> 35.569421 10.yy.yy.17 -> 10.yy.yy.162 DNS Standard query A<br>
> <a href="http://ldap3.example.fr" target="_blank">ldap3.example.fr</a><br>
> 35.569625 10.yy.yy.162 -> 10.yy.yy.17 DNS Standard query response A<br>
> 10.xx.xx.3<br>
> 35.569774 10.yy.yy.17 -> 10.xx.xx.3 TCP 36916 > ldap [SYN] Seq=0<br>
> Win=14600 Len=0 MSS=1460 TSV=747468 TSER=0 WS=6<br>
> 35.570242 10.xx.xx.3 -> 10.yy.yy.17 TCP ldap > 36916 [SYN, ACK] Seq=0<br>
> Ack=1 Win=14480 Len=0 MSS=1460 TSV=60552439 TSER=747468 WS=7<br>
> 35.570257 10.yy.yy.17 -> 10.xx.xx.3 TCP 36916 > ldap [ACK] Seq=1 Ack=1<br>
> Win=14656 Len=0 TSV=747468 TSER=60552439<br>
> 35.570594 10.yy.yy.17 -> 10.xx.xx.3 LDAP extendedReq(1)<br>
> LDAP_START_TLS_OID<br>
> 35.570786 10.xx.xx.3 -> 10.yy.yy.17 TCP ldap > 36916 [ACK] Seq=1 Ack=32<br>
> Win=14592 Len=0 TSV=60552440 TSER=747469<br>
> 35.570987 10.xx.xx.3 -> 10.yy.yy.17 LDAP extendedResp(1)<br>
> [LDAP_START_TLS_OID responseName missing]<br>
> 35.570994 10.yy.yy.17 -> 10.xx.xx.3 TCP 36916 > ldap [ACK] Seq=32<br>
> Ack=15 Win=14656 Len=0 TSV=747469 TSER=60552440<br>
><br>
> -->> HERE:<br>
><br>
> 35.578964 10.yy.yy.17 -> 10.xx.xx.3 SSL Client Hello<br>
> 35.579506 10.xx.xx.3 -> 10.yy.yy.17 TCP [TCP segment of a reassembled<br>
> PDU]<br>
> 35.579513 10.xx.xx.3 -> 10.yy.yy.17 TLSv1 Server Hello, Certificate,<br>
> Certificate Request, Server Hello Done<br>
> 35.579537 10.yy.yy.17 -> 10.xx.xx.3 TCP 36916 > ldap [ACK] Seq=134<br>
> Ack=2005 Win=20416 Len=0 TSV=747478 TSER=60552448<br>
> 35.581211 10.yy.yy.17 -> 10.xx.xx.3 TLSv1 Certificate, Client Key<br>
> Exchange, Change Cipher Spec, Encrypted Handshake Message<br>
> 35.581994 10.xx.xx.3 -> 10.yy.yy.17 TLSv1 Change Cipher Spec, Encrypted<br>
> Handshake Message<br>
><br>
> --> sound's OK !<br>
><br>
> now let'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>
><br>
> # tshark -i eth1 not port 22<br>
> 0.000000 10.yy.yy.17 -> 10.yy.yy.162 DNS Standard query PTR<br>
> 94.zz.zz.10.in-addr.arpa<br>
> 0.000306 10.yy.yy.162 -> 10.yy.yy.17 DNS Standard query response PTR<br>
> <a href="http://civette.example.fr" target="_blank">civette.example.fr</a><br>
> 0.000507 10.yy.yy.17 -> 10.yy.yy.162 DNS Standard query A<br>
> <a href="http://civette.example.fr" target="_blank">civette.example.fr</a><br>
> 0.000703 10.yy.yy.162 -> 10.yy.yy.17 DNS Standard query response A<br>
> 10.zz.zz.94<br>
> 0.007700 10.yy.yy.17 -> 10.xx.xx.3 TCP 36916 > ldap [PSH, ACK] Seq=1<br>
> Ack=1 Win=364 Len=565 TSV=845893 TSER=60553254<br>
> 0.008561 10.xx.xx.3 -> 10.yy.yy.17 TCP ldap > 36916 [PSH, ACK] Seq=1<br>
> Ack=566 Win=173 Len=53 TSV=60650865 TSER=845893<br>
> ....<br>
> 4.674892 10.yy.yy.17 -> 10.xx.xx.3 TCP 36918 > ldap [ACK] Seq=1 Ack=1<br>
> Win=14656 Len=0 TSV=850561 TSER=60655531<br>
><br>
> -->> HERE :<br>
><br>
> 4.675045 10.yy.yy.17 -> 10.xx.xx.3 LDAP extendedReq(1)<br>
> LDAP_START_TLS_OID<br>
> 4.675213 10.xx.xx.3 -> 10.yy.yy.17 TCP ldap > 36918 [ACK] Seq=1 Ack=32<br>
> Win=14592 Len=0 TSV=60655531 TSER=850561<br>
> 4.675473 10.xx.xx.3 -> 10.yy.yy.17 LDAP extendedResp(1)<br>
> [LDAP_START_TLS_OID responseName missing]<br>
> 4.675479 10.yy.yy.17 -> 10.xx.xx.3 TCP 36918 > ldap [ACK] Seq=32<br>
> Ack=15 Win=14656 Len=0 TSV=850561 TSER=60655532<br>
> 4.675677 10.yy.yy.17 -> 10.xx.xx.3 SSL Client Hello<br>
> 4.676129 10.xx.xx.3 -> 10.yy.yy.17 TCP [TCP segment of a reassembled<br>
> PDU]<br>
> 4.676136 10.xx.xx.3 -> 10.yy.yy.17 TLSv1 Server Hello, Certificate,<br>
> Certificate Request, Server Hello Done<br>
> 4.676176 10.yy.yy.17 -> 10.xx.xx.3 TCP 36918 > ldap [ACK] Seq=134<br>
> Ack=2005 Win=20416 Len=0 TSV=850562 TSER=60655532<br>
> 4.677304 10.yy.yy.17 -> 10.xx.xx.3 TLSv1 Certificate, Client Key<br>
> Exchange, Change Cipher Spec, Encrypted Handshake Message<br>
> 4.678041 10.xx.xx.3 -> 10.yy.yy.17 TLSv1 Change Cipher Spec, Encrypted<br>
> Handshake Message<br>
><br>
> ....<br>
><br>
> --> to be honest I don't read fluently all this, but as far as I can see,<br>
> it sounds to work very well<br>
> (and I log in properly)<br>
><br>
> From a configuration point of view, Here is what I have done (and I plan to<br>
> deploy )<br>
> on my clients side :<br>
><br>
> # cat /etc/nsswitch.conf<br>
> passwd: files sss<br>
> shadow: files sss<br>
> group: files sss<br>
> netgroup: files sss<br>
> hosts: files dns<br>
> services: files sss<br>
><br>
> # cat /etc/sssd.conf<br>
> [domain/default]<br>
> ldap_id_use_start_tls = True<br>
> cache_credentials = False<br>
> ldap_search_base = dc=example,dc=fr<br>
> krb5_realm = <a href="http://EXAMPLE.COM" target="_blank">EXAMPLE.COM</a><br>
> krb5_server = <a href="http://kerberos.example.com" target="_blank">kerberos.example.com</a><br>
> id_provider = ldap<br>
> auth_provider = ldap<br>
> chpass_provider = ldap<br>
> ldap_tls_cacertdir = /etc/openldap/cacerts<br>
> ldap_user_ssh_public_key = sshPublicKey<br>
> dns_discovery_domain = <a href="http://example.fr" target="_blank">example.fr</a><br>
><br>
> [sssd]<br>
><br>
> config_file_version = 2<br>
> services = nss, pam, ssh<br>
> domains = default<br>
><br>
> [nss]<br>
><br>
> [pam]<br>
><br>
> [ssh]<br>
><br>
> Other than in sssd.conf, I have not declared any ldap server nor<br>
> any information about the CA certificate location anywhere (no<br>
> ldap uri or tls_cacertdir in /etc/pam_ldap.conf for example, nor<br>
> anywhere).<br>
><br>
> I however have kept the start_tls directive in files when relevant.<br>
><br>
> Note : cacert needs to be added in ldap.conf for sudo-ldap to work<br>
> in my case.<br>
><br>
> To be honnest my config is a bit more subtile on the DNS server<br>
> side since I wanted a way to tune the discovery service so that<br>
> the client find different weights for ldap prefered servers depending<br>
> on where it is physically located : I use a zone per location to do<br>
> that and play with the sssd "dns_discovery_domain" parameter.<br>
><br>
> I also tested the fallback : when I shut down the first ldap server,<br>
> sssd seems to ask for the next one afeter one second : is that<br>
> 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>
><br>
> 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>