⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 kerberos-notes.txt

📁 samba最新软件
💻 TXT
📖 第 1 页 / 共 2 页
字号:
gss_krb5_context per process, and multiple GSSAPI encrypted sessionsat a time) but these may not matter in practice.In the short-term, we deal with blocking by taking over the networksend() and recv() functions, therefore making them 'semi-async'.  Thisdoens't apply to DNS yet.GSSAPI and Kerberos extensions------------------------------This is a general list of the other extensions we have made to / need fromthe kerberos libraries - DCE_STYLE - gsskrb5_get_initiator_subkey() (return the exact key that Samba3   has always asked for.  gsskrb5_get_subkey() might do what we need   anyway) - gsskrb5_acquire_creds() (takes keytab and/or ccache as input   parameters, see keytab and state machine discussion) - gss_krb5_copy_service_keyblock() (get the key used to actually   encrypt the ticket to the server, because the same key is used for   the PAC validation). - gsskrb5_extract_authtime_from_sec_context (get authtime from   kerberos ticket) - gsskrb5_extract_authz_data_from_sec_context (get authdata from   ticket, ie the PAC.  Must unwrap the data if in an AD-IFRELEVENT) - gsskrb5_wrap_size (find out how big the wrapped packet will be,   given input length).Keytab requirements-------------------Because windows machine account handling is very different to thetranditional 'MIT' keytab operation.  This starts when we look at thebasis of the secrets handling:Traditional 'MIT' behaviour is to use a keytab, continaing salted keydata, extracted from the KDC.  (In this modal, there is no 'servicepassword', instead the keys are often simply application of randombytes).  Heimdal also implements this behaviour.The windows modal is very different - instead of sharing a keytab witheach member server, a password is stored for the whole machine.  Thepassword is set with non-kerberos mechanisms (particularly SAMR, aDCE-RPC service) and when interacting on a kerberos basis, thepassword is salted by the client.  (That is, no salt infromationappears to be convayed from the KDC to the member).In dealing with this modal, we leverage both the traditional filekeytab and in-MEMORY keytabs.  When dealing with a windows KDC, the behaviour regarding casesensitivity and canonacolisation must be accomidated.  This means thatan incoming request to a member server may have a wide variety ofservice principal names.  These include:machine$@REALM (samba clients)HOST/foo.bar@realm (win2k clients)HOST/foo@realm (win2k clients, using netbios)cifs/foo.bar@realm (winxp clients)cifs/foo@realm (winxp clients, using netbios)as well as all case variations on the above.  Because that all got 'too hard' to put into a keytab in thetraditional way (with the client to specify the name), we eitherpre-compute the keys into a traditional keytab or make an in-MEMORYkeytab at run time.  In both cases we specifiy the principal name toGSSAPI, which avoids the need to store duplicate principals.We use a 'private' keytab in our private dir, referenced from thesecrets.ldb by default.Extra Heimdal functions used----------------------------(an attempt to list some of the Heimdal-specific functions I know we use)krb5_free_keyblock_contents()also a raft of prinicpal manipulation functions:Prncipal Manipulation---------------------Samba makes extensive use of the principal manipulation functions inHeimdal, including the known structure behind krb_principal andkrb5_realm (a char *).Authz data extraction---------------------We use krb5_ticket_get_authorization_data_type(), and expect it toreturn the correct authz data, even if wrapped in an AD-IFRELEVENT container.KDC/hdb Extensions--------------We have modified Heimdal's 'hdb' interface to specify the 'type' ofPrincipal being requested.  This allows us to correctly behave withthe different 'classes' of Principal name. We currently define 2 classes: - client (kinit) - server (tgt)I also now specify the kerberos principal as an explict parameter, notan in/out value on the entry itself.Inside hdb-ldb, we add krbtgt as a special class of principal, becauseof particular special-case backend requirements.Callbacks: In addition, I have added a new interface hdb_fetch_ex(), which returns a structure including callbacks, which provide the hook for the PAC, as well as a callback into the main access control routines. A new callback should be added to increment the bad password counter on failure. Another possability for a callback is to obtain the keys.  This would allow the plaintext password to only be hashed into the encryption types we need.  This idea from the eDirectory/MIT DAL work. This probably should be combined with storing the hashed passwords in the supplementalCredentials attribute. If combined with a kvno parameter, this could also allow changing of the krbtgt password (valuable for security).libkdc------Samba4 needs to be built as a single binary (design requirement), andthis should include the KDC.  Samba also (and perhaps moreimportantly) needs to control the configuration environment of theKDC.  The interface we have defined for libkdc allow for packet injectioninto the post-socket layer, with a defined krb5_context andkdb5_kdc_configuration structure.  These effectively redirect thekerberos warnings, logging and database calls as we require.Using our socket lib--------------------An important detail in the use of libkdc is that we use our own socketlib.  This allows the KDC code to be as portable as the rest of samba(this cuts both ways), but far more importantly it ensures aconsistancy in the handling of requests, binding to sockets etc.To handle TCP, we use of our socket layer in much the same way aswe deal with TCP for CIFS.  Tridge created a generic packet handlinglayer for this.For the client, we likewise must take over the socket functions, sothat our single thread smbd will not lock up talking to itself.  (Weallow processing while waiting for packets in our socket routines).Kerberos logging support------------------------Samba now (optionally in the main code, required for the KDC) uses thekrb5_log_facility from Heimdal.  This allows us to redirect thewarnings and status from the KDC (and client/server kerberos code) toSamba's DEBUG() system.Similarly important is the Heimdal-specific krb5_get_error_string()function, which does a lot to reduce the 'administrator pain' level,by providing specific, english text-string error messages instead ofjust error code translations.Short name rules----------------Samba is highly likely to be misconfigured, in many weird andinteresting ways.  As such, we have a patch for Heimdal that avoidsDNS lookups on names without a . in them.  This should avoid somedelay and root server load.PAC Correctness---------------We now put the PAC into the TGT, not just the service ticket.  Forwarded tickets-----------------We extract forwarded tickets from the GSSAPI layer, and putthem into the credentials.  We can then use them for proxy work.Kerberos TODO=============(Feel free to contribute to any of these tasks, or askabartlet@samba.org about them).Lockout Control--------------We need to get (either if PADL publishes their patch, or write ourown) access control hooks in the Heimdal KDC.  We need to lockoutaccounts, and perform other controls.Gssmonger---------Microsoft has released a testsuite called gssmonger, which testsinterop.  We should compile it against lorikeet-heimdal, MIT and seeif we can build a 'Samba4' server for it.Kpasswd server--------------I have a partial kpasswd server which needs finishing, and a we need aclient testsuite written, either via the krb5 API or directly againstGENSEC and the ASN.1 routines.Currently it only works for Heimdal, not MIT clients.  This may be dueto call ordering constraints.Correct TCP support-------------------Our current TCP support does not send back 'too large' error messagesif the high bit is set.  This is needed for a proposed extensionmechanism, but is likewise unsupported in both current Heimdal and MIT.

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -