Saslauthd — unix, linux command

Auxiliary Property (auxprop) Plugins¶

Perhaps the most exciting addition in SASLv2, Auxprop plugins
allow for an easy way to perform password and secret lookups (as well
as other information needed for authentication and authorization)
from directory services, and in the same request allow the application
to receive properties that it needs to provide the service.

Auxprop plugins need to export the function
and pass back a in order to load
successfully. The sasldb plugin included with the Cyrus SASL
distribution would be a good place to start.

Interfacing with property contexts is extremely well documented in
and so that is omitted here. The only important
note is to be sure that you are using the interfaces provided
through the structure and not calling
the functions directly.

To successfully implement an auxprop plugin there is only one
required function to implement, that is the
member of the . This is called
just after canonicalization of the username, with the canonicalized
username. It can then do whatever lookups are necessary for any
of the requested auxiliary properties.

The Application¶

The application is a client of the SASL library. It can be a client or server
application (or both, in the case of a proxy). It takes care of the
on-the-wire representation of the SASL negotiation, however it performs no
analysis of the exchange itself. It relies on the judgment of the SASL
library whether authentication has occurred or not. The application is also
responsible for determining if the authenticated user may authorize as another
user id (For more details on authentication and authorization identities
and their differences, see <a href=sysadmin.html>Cyrus SASL for System Administrators</a>)

По данным портала ЗАЧЕСТНЫЙБИЗНЕСОБЩЕСТВО С ОГРАНИЧЕННОЙ ОТВЕТСТВЕННОСТЬЮ «СПЕЦАВТОСТРОЙЛОГИСТИК»По данным портала ЗАЧЕСТНЫЙБИЗНЕС7203342965

О компании:
ООО «САСЛ» ИНН 7203342965, ОГРН 1157232017700 зарегистрировано 06.05.2015 в регионе Тюменская Область по адресу: 625053, Тюменская обл, город Тюмень, улица Космонавтов, дом 33а, КВАРТИРА 57. Статус: Ликвидировано. Размер Уставного Капитала 15 000,00 руб.

Руководителем организации является: Генеральный Директор — Найдин Андрей Николаевич, ИНН . У организации 1 Учредитель. Основным направлением деятельности является «деятельность автомобильного грузового транспорта и услуги по перевозкам».

Статус: ?
Ликвидировано

Дата регистрации: По данным портала ЗАЧЕСТНЫЙБИЗНЕС

?
По данным портала ЗАЧЕСТНЫЙБИЗНЕС

06.05.2015

Дата ликвидации: 24.08.2017

ОГРН 
?
 
1157232017700   
присвоен: 06.05.2015
ИНН 
?
 
7203342965
КПП 
?
 
720301001

Юридический адрес: ?
По данным портала ЗАЧЕСТНЫЙБИЗНЕС
625053, Тюменская обл, город Тюмень, улица Космонавтов, дом 33а, КВАРТИРА 57
получен 22.05.2015
зарегистрировано по данному адресу:
По данным портала ЗАЧЕСТНЫЙБИЗНЕС

По данным портала ЗАЧЕСТНЫЙБИЗНЕС
Руководитель Юридического Лица
 ?По данным портала ЗАЧЕСТНЫЙБИЗНЕС
Генеральный Директор
По данным портала ЗАЧЕСТНЫЙБИЗНЕС

Найдин Андрей Николаевич

ИНН ?

По данным портала ЗАЧЕСТНЫЙБИЗНЕС

действует с По данным портала ЗАЧЕСТНЫЙБИЗНЕС
08.06.2015

Учредители ? ()
Уставный капитал: По данным портала ЗАЧЕСТНЫЙБИЗНЕС
15 000,00 руб.

Найдин Андрей Николаевич
По данным портала ЗАЧЕСТНЫЙБИЗНЕС

15 000,00руб., 22.05.2015 , ИНН

Основной вид деятельности: ?По данным портала ЗАЧЕСТНЫЙБИЗНЕС
49.4 деятельность автомобильного грузового транспорта и услуги по перевозкам

Дополнительные виды деятельности:

Единый Реестр Проверок (Ген. Прокуратуры РФ) ?

Реестр недобросовестных поставщиков: ?
По данным портала ЗАЧЕСТНЫЙБИЗНЕС

не числится.

Налоговый орган ?
По данным портала ЗАЧЕСТНЫЙБИЗНЕС
Инспекция Федеральной Налоговой Службы По Г. Тюмени № 3
Дата постановки на учет: По данным портала ЗАЧЕСТНЫЙБИЗНЕС
06.05.2015

Регистрация во внебюджетных фондах

Фонд Рег. номер Дата регистрации
ПФР 
?
 
082002040392
По данным портала ЗАЧЕСТНЫЙБИЗНЕС
08.05.2015
ФСС 
?
 
720105156472011
По данным портала ЗАЧЕСТНЫЙБИЗНЕС
08.05.2015

Финансовая отчетность ООО «САСЛ» ?

В качестве Поставщика:

,

на сумму

В качестве Заказчика:

,

на сумму

По данным портала ЗАЧЕСТНЫЙБИЗНЕС

Судебные дела ООО «САСЛ» ?

найдено по ИНН: По данным портала ЗАЧЕСТНЫЙБИЗНЕС

найдено по наименованию (возможны совпадения): По данным портала ЗАЧЕСТНЫЙБИЗНЕС

По данным портала ЗАЧЕСТНЫЙБИЗНЕС

Исполнительные производства ООО «САСЛ»
?

найдено по наименованию и адресу (возможны совпадения): По данным портала ЗАЧЕСТНЫЙБИЗНЕС

По данным портала ЗАЧЕСТНЫЙБИЗНЕС

Лента изменений ООО «САСЛ»
?

Не является участником проекта ЗАЧЕСТНЫЙБИЗНЕС ?

Introduction¶

Note Well: The protocol specified herein has been superseded in favor of SASL authentication as specified in RFC 3920 [] and RFC 6120 [], and is now obsolete.

Jabber technologies have long included a wire protocol that enables a client to authenticate with a server. [] The method originally used in the Jabber community makes use of the ‘jabber:iq:auth’ namespace and has been documented variously in Internet-Drafts and elsewhere. When the core Jabber protocols were formalized by the IETF, the ‘jabber:iq:auth’ protocol was replaced by the Simple Authentication and Security Layer (SASL) as specified in RFC 4422 []. SASL was incorporated into XMPP because it provides a more flexible approach to authentication by enabling XMPP entities to use a wide variety of authentication methods (e.g., PLAIN, DIGEST-MD5, EXTERNAL, and ANONYMOUS), some of which are more secure than the ‘jabber:iq:auth’ protocol.

The ‘jabber:iq:auth’ protocol specified herein is now obsolete. However, because it will take some time for existing implementations and deployments to be upgraded to SASL, client and server software implementations still need to include support for ‘jabber:iq:auth’ in order to interoperate, and this document provides canonical documentation of the ‘jabber:iq:auth’ protocol. Nevertheless, implementation and deployment of SASL authentication is strongly recommended, since the ‘jabber:iq:auth’ protocol will eventually be obsoleted entirely.

15.1. Вопросы безопасности при использовании SASL

SASL предлагает множество различных механизмов аутентификации. В этом подразделе кратко излагаются вопросы безопасности.

Некоторые механизмы, такие как PLAIN и LOGIN, предлагают уровень безопасности не выше, чем простая (simple) аутентификация LDAP. Как и простая аутентификация LDAP, такие механизмы не должны использоваться без принятия других адекватных мер защиты. Рекомендуется использовать эти механизмы только вместе с Transport Layer Security (TLS). Применение механизмов PLAIN и LOGIN далее в этом документе не обсуждается.

Механизм DIGEST-MD5 является обязательным механизмом аутентификации для реализации LDAPv3. Хотя DIGEST-MD5 не является механизмом строгой аутентификации по сравнению с доверенными системами аутентификации третьих сторон (такими как Kerberos или системы открытых ключей), он предлагает значительную защиту от некоторых атак. В отличие от механизма CRAM-MD5, он предотвращает chosen plaintext attacks (атаки по избранному простому тексту). DIGEST-MD5 предпочтительнее, чем использование простых парольных механизмов. Механизм CRAM-MD5 считается устаревшим в пользу DIGEST-MD5. Применение обсуждается ниже.

Механизм GSSAPI использует GSS-APIKerberos V для обеспечения сервисов безопасной аутентификации. Механизм KERBEROS_V4 делает то же самое, используя Kerberos IV. Kerberos рассматривается как безопасная распределенная система аутентификации, подходящая как для малых, так и для крупных предприятий. Применение и обсуждается ниже.

Механизм EXTERNAL использует сервисы аутентификации, предоставляемые низкоуровневыми сетевыми службами, такими как Transport Layer Security (TLS). При использовании совместно с основанной на X.509 технологией открытых ключей TLS, механизм EXTERNAL предлагает строгую аутентификацию. TLS обсуждается в разделе Использование TLS.

Механизм EXTERNAL также может быть использован с транспортом ldapi:///, поскольку Unix-сокеты могут сообщать UID и GID клиентского процесса.

Можно выбрать и другие механизмы строгой аутентификации, в том числе OTP (one time passwords, одноразовые пароли) и SRP (secure remote passwords, безопасные удалённые пароли). Эти механизмы не обсуждаются в данном документе.

Start sample server¶

The command-line used for
sample-server needs to specify the GSSAPI service name and the
location of the plug-ins.

  • On Unix:
  • On Windows:

In this example, I am using “host”, which already exists on my
machine, but only root can read it, so I an running this as root.
If you want to use an alternate service name, you will need to
create that service in Kerberos, place it in a keytab readable by
you, and point your Kerberos library at it.

  • On Unix: Unix: both MIT Kerberos and Heimdal, use on Unix by default, but this can be changed
    by setting the environment variable; the default
    for CyberSafe Kerberos is for UNIX systems and can be
    changed by setting the environment variable.
  • On Windows: the default service key table location for CyberSafe is
    , unless the
    CyberSafe registry setting for the KeyTab key is set to an
    alternate path. MIT Kerberos on Windows uses the keytab filename
    krb5kt.

You should get a response similar to:

Generating client mechanism list...
Sending list of 3 mechanism(s)
S R1NTQVBJIFBMQUlOIEFOT05ZTU9VUw==

Note that later on (assuming everything works) you might need to paste
in lines that are longer than canonical input processing buffer on your
system. You can get around that by messing around with stty; while
the details vary from system to system, on Solaris you can do something
like:

Stream Feature¶

RFC 6120 defines methods for advertising feature support during stream negotiation. It may be desirable for a server to advertise support for non-SASL authentication as a stream feature. The namespace for reporting support within <stream:features/> is «http://jabber.org/features/iq-auth». Upon receiving a stream header qualified by the ‘jabber:client’ namespace, a server that returns stream features SHOULD also announce support for non-SASL authentication by including the relevant stream feature. Exactly when a server advertises the iq-auth stream feature is up to the implementation or deployment (e.g., a server MAY advertise this feature only after successful TLS negotiation or if the channel is encrypted via the older SSL method). Obviously, this does not apply to servers that do not support stream features (e.g., older servers that do not comply with XMPP 1.0).

Example 9. Advertising non-SASL authentication as a stream feature

  <stream:features>
    <mechanisms xmlns='urn:ietf:params:xml:ns:xmpp-sasl'>
      <mechanism>DIGEST-MD5</mechanism>
      <mechanism>PLAIN</mechanism>
    </mechanisms>
    <auth xmlns='http://jabber.org/features/iq-auth'/>
  </stream:features>

A server SHOULD NOT advertise non-SASL authentication to another server (i.e., if the initial stream header was qualified by the ‘jabber:server’ namespace).

Testing the SASL configuration¶

If everything is correct, you should be able to run the following commands:

$ testsaslauthd -u jane -r example.org -p janepass -s imap
0: OK "Success."

$ testsaslauthd -u jane -r example.org -p janepas3 -s imap
0: NO "authentication failed"

$ testsaslauthd -u jane -r example.org -p janepass -s pop
0: NO "authentication failed"

This fails because we haven’t setup the PAM config file for the POP service, update /etc/pam.d/pop by adding the following two ‘sufficient’ lines above the appropriate ‘required’ lines.

auth       sufficient   pam_mysql.so config_file=/etcmail-pam-mysql.conf
account    sufficient   pam_mysql.so config_file=/etcmail-pam-mysql.conf

If everything is correct, you should be able to run the following and get an OK response.

Password Verification Services¶

As described above, the password verifiers take a username and plaintext
password, and say either or . It is not possible
to use them to verify hashes that might be provided by the shared secret
mechanisms.

Password verifiers are selected using the
SASL option. There are two main password verifiers provided with Cyrus SASL:

auxprop
This uses an auxprop plugin to fetch the password and then
compares it with the client-provided copy to make the determination.
saslauthd
This calls out to the daemon, which
also ships with the distribution. The daemon has a number
of modules of its own, which allow it to do verification of passwords in
a variety of ways, including PAM, LDAP, against a Kerberos database, and so on.
This is how you would want to, for example, use the data contained in
to authenticate users.

Настройка аутентификации

Cyrus SASL имеет множество опций, кторое могут быть настроены через использующее ее(библиотеку) приложение. Для настройки
через imapd.conf, к нужной опции просто добавляется префикс  sasl_ (например:
pwcheck_method будет выглядеть как  sasl_pwcheck_method).

/etc/sasldb2

Простейший метод аутентификации заключается в использовании аутентификационной
базы libsasl, аккаунты в которой создаются с помощью утилиты
«saslpasswd2«. В настройках должно стоять «sasl_pwcheck_method:
auxprop
» и
в SASL у sasldb должен быть установлен auxprop-модуль (это ставится по умолчанию). Удостоверьтесь, что Cyrus может прочитать из «/etc/sasldb2«:

   chown cyrus /etc/sasldb2*

Shadow Passwords(Теневые пароли)

Реализация аутентификации пользователей из «/etc/shadow» более сложна , т. к. cyrus-пользователь не может чиатть файл теневых
паролей. Также, это не полволит использовать механизмы shared secret. Чтобы осуществить это, необходимо настроить libsasl с поддержкой 
saslauthd, и прописать в настройках «sasl_pwcheck_method:
saslauthd
«. Библиотека SASL будет вызывать внешнююутилиту,
запущенную от имени root’а, чтобы аутентифицировать пользователей.

Cyrus IMAP сможет поддерживаеть Kerberos v4 если библиотеку
SASL собрать(откомпилировать) с поддержкой KERBEROS_V4.

Вам потребуется создать для сервера идентификатор Kerberos v4  и добавить ключ сервера
в файл «srvtab«. Cyrus-пользователь должен
иметь право на чтение
на этот файл. Сервер убдет иметь идентификатор Kerberos вида «imap.HOST@REALM«, где «HOST » — первый компонент имени
хоста сервера, а «REALM » — область Kerberos.

  1. Вот пример процедуры создания srvtabфайла для
    хоста с именем «foobar«:

       ksrvutil -f /var/imap/srvtab add
    
    

    Ниже идет информация для запроса «ksrvutil«. Необходимо вводить значения или нажимать  RETURN(Enter) .
    В этом примере имя хоста — «foobar«, а имя области
    — «ANDREW.CMU.EDU«.

       Name: imap
       Instance: foobar
       Realm: ANDREW.CMU.EDU
       Version number: 
       New principal: imap.foobar@ANDREW.CMU.EDU; version 0
       Is this correct? (y,n)  
       Password: 
       Verifying, please re-enter Password: 
       Key successfully added.
       Would you like to add another key? (y,n)  n
    
  2. Если Вы планируете внедрять Kerberized
    POP, создайте идентификатор Kerberos «pop.HOST@REALM» и добавте ключ в файл «srvtab«. Аналогично, если использовать LMTP через
    TCP, создайте Kerberos-идентификатор «lmtp.HOST@REALM» и добавте ключ в
    файл «srvtab «.

  3. Сделайте cyrus-пользователя владельцем файла «srvtab «:

       chown cyrus /var/imap/srvtab
    
    
  4. Добавте поцию srvtab в /etc/imapd.conf:
       srvtab: /var/imap/srvtab
  5. Протестируйте все это командой  imtest -m KERBEROS_V4. i mtest попытается авторизовать текущего Unix-пользователя независимо от
    текущей авторизации. Этого не бутет при использовании опции » -u" .

Запустите программу «krbck«(находится в директории  imap) как cyrus-пользователь на IMAP-сервере. Эта программа продиагностирует неготорые конфигурационные ошибки Kerberos v4.

Cyrus IMAP сможет поддерживать Kerberos v5 если
библиотека SASL собрана с поддержкой GSSAPI.

Вам нужно будет создать
идентификатор Kerberos v5 для сервера. Ключи Kerberos v5 хранятся в «/etc/krb5.keytab«.

  1. Добавте ключ «imap/hostname» используя «kadmin«.

  2. Дайте cyrus-пользователю право на чтение «/etc/krb5.keytab
    «:

       chown cyrus /etc/krb5.keytab
    
    
  3. Проверте настройки с помощью  imtest -m GSSAPI.
    i mtest
     попытается авторизовать текущего
    Unix-пользователя независимо от текущей авторизации. Этого не бутет при
    использовании опции "

    -u"
    .

Спонсоры:

Хостинг:

Maxim ChirkovДобавить, Поддержать, Вебмастеру

Step by step¶

These directions assume that you’ve untarred the library or used GIT
and the sources are in .

Start a cygwin shell and create the dynamic loading stubs:

% cd cygdrivecsaslplugins
% sh makeinit.sh

Building using NMake

Open a “Windows 2000 build environment” from the SDK’s Start Menu and
use to build.

To build a debug verison, use . For a production version, . If you don’t specify CFG parameter, production
version will be built by default.

As Windows build requires SleepyCat, there are additional options
that have to be provided to NMake on the command line.
If SleepyCat sources are located in
and built library in ,
you should add something like

and .

Also note, that the defines the name of the SleepyCat library
to link against. It defaults to libdb41s.lib.

If you don’t pass the parameters described above, NMake will pick the
defaults, which is probably not what you want.

Another option of interest is .
It specifies which version of the standard C library
to use. The default is “no”, meaning that the standard C library
from the MSVCRT.DLL will be used.

Example:

Targeting Windows 2000 and IE 5.0 RETAIL

C\Program Files\Microsoft SDK> cd \sasl

C\sasl> nmake f NTMakefile DB_INCLUDE=c\packages\db\4.1.24\build_win32
DB_LIBPATH=c\packages\db\4.1.24\build_win32\Release_static

No configuration specified. Defaulting to Release.
Using MSVCRT.dll as C library by default.
Defaulting SleepyCat library name to libdb41s.lib.
Codegeneration defaulting to MD.

SASL NTMakefile also understands “clean” target that you can use to clean all files generated by the compiler.

C\sasl> nmake f NTMakefile clean

Microsoft (R) Program Maintenance Utility Version 7.00.9466
Copyright (C) Microsoft Corporation.  All rights reserved.

        cd lib && nmake f NTMakefile                    clean

Microsoft (R) Program Maintenance Utility Version 7.00.9466
Copyright (C) Microsoft Corporation.  All rights reserved.

No configuration specified. Defaulting to Release.
Using MSVCRT.dll as C library by default.
Defaulting SleepyCat library name to libdb41s.lib.
Defaulting SleepyCat include path to c\work\isode\db\build_win32.
Defaulting SleepyCat library path to c\work\isode\db\build_win32\Release_static.

Building additional plugins

Specify “GSSAPI=<type>” parameter if you want to enable GSSAPI plugin.
Currently only <type>=CyberSafe is supported and this will build the plugin
that links against CyberSafe Kerberos.

GSSAPI depends on and parameters.
You can either specify them on the command line or edit the defaults in win32common.mak

Specify “SQL=<type>” parameter if you want to enable SQL plugin.
Currently only <type>=SQLITE is supported and this will build the plugin
that links against SQLITE (www.sqlite.org).

SQL=<SQLITE> depends on and parameters.
You can either specify them on the command line or edit the defaults in win32common.mak

Specify “NTLM=1” parameter if you want to enable NTLM plugin.
I.e.

Specify “SRP=1” parameter if you want to enable SRP plugin.
You can also specify “DO_SRP_SETPASS=1” if you want to enable SRP setpass functionality.

Specify “OTP=1” parameter if you want to enable OTP plugin.

NTLM, SRP and OTP plugins depend on OpenSSL. You can either specify
and parameters on the command
line or edit the defaults in win32common.mak
Note, that unless you are building one of those plugins, OpenSSL is not required!

If you want to build multiple additional plugins at once, you can specify
multiple parameters described above, for example

Limitations

Currently all plugins except KerberosV4 (kerberos4.c) and PASSDSS (passdss.c) can be built on Windows.
However limited testings was done for some plugins as listed below:

  • GSSAPI — tested using CyberSafe,
  • SASLDB — only SleepyCat version can be built,
  • SQL — using SQLITE, not tested

The following executables were built and tested (to some extent):

  • sample

  • utils

Connect Client to Server¶

Cut and paste the client response (The entire line that begins
with C:, including the initial ) to the server
process. You should get a response back that starts with .
Cut and paste that to the client, and continue this
exchange until you either get , or an error.

If you get an error on the server you should get a complete error
message (including the GSSAPI error string); on the client you
unfortunately will only probably get , which will
again require the use of a debugger (but the VL macro should help
with this).

One common thing that happens is that on your server you might see
the error:

sample-server Performing SASL negotiation authentication failure
    (Requested identity not authenticated identity)

This comes from not having a requested identity (the -u option) that
matches the identity that you were authenticated to via the GSSAPI.
This is of course mechanism specific, but if for example you’re using
Kerberos, the Cyrus SASL library strips out the @REALM from your
identity if you are in the same realm as the server. So if your
Kerberos identity is user@SOME.REALM and the server is in SOME.REALM,
you need to specify “user” to the -u flag of the client. If you’re
accessing a server in a foreign realm, you need to pass the full
principal name via the -u option to make this work correctly.

If you complete the negotiation successfully, you should see something
that looks like (on both the client and server):

Negotiation complete
Username kenh
sample-server realm can't request info until later in exchange
SSF 56

If you get to that, then you’ve done it, and GSSAPI works successfully!

Common Section¶

When the application starts and calls you must
specify for what data you support callbacks and/or interactions.

These are for the library getting information needed for
authentication from the application. This is needed for things like
authentication name and password. If you do not declare supporting
a callback you will not be able to use mechanisms that need that
data.

A callback is for when you have the information before you
start the authentication. The SASL library calls a function you
specify and your function fills in the requested information. For
example if you had the userid of the user already for some reason.

An interaction is usually for things you support but will need to ask the user
for (e.g. password). or
will return . This will
be a list of sasl_interact_t’s which contain a human readable string you can
prompt the user with, a possible computer readable string, and a default result.
The nice thing about interactions is you get them all at once so if you had a
GUI application you could bring up a dialog box asking for authentication name
and password together instead of one at a time.

Any memory that is given to the SASL library for the purposes of
callbacks and interactions must persist until the exchange
completes in either success or failure. That is, the data must
persist until or
returns something other than
or .

Memory management
As in the rest of the SASLv2 API,
whoever allocates the memory is responsible for freeing it. In
almost all cases this should be fairly easy to manage, however a
slight exception where the interaction sasl_interact_t structure is
allocated and freed by the library, while the results are allocated
and freed by the application. As noted above, however, the
results may not be freed until after the exchange completes, in
either success or failure.

For a detailed description of what each of the callback types
are see the sasl.h file. Here are some brief explanations:

SASL_CB_AUTHNAME
the name of the user authenticating
SASL_CB_USER
the name of the user acting for. (for example
postman delivering mail for tmartin might have an AUTHNAME of
postman and a USER of tmartin)
SASL_CB_PASS
password for AUTHNAME
SASL_CB_GETREALM
Realm of the server

An example of a way to handle callbacks:

/* callbacks we support. This is a global variable at the
    top of the program */
 static sasl_callback_t callbacks[] = {
 {
   SASL_CB_GETREALM, NULL, NULL  /* we'll just use an interaction if this comes up */
 }, {
   SASL_CB_USER, NULL, NULL      /* we'll just use an interaction if this comes up */
 }, {
   SASL_CB_AUTHNAME, &getauthname_func, NULL /* A mechanism should call getauthname_func
                                                if it needs the authentication name */
 }, {
   SASL_CB_PASS, &getsecret_func, NULL      /* Call getsecret_func if need secret */
 }, {
   SASL_CB_LIST_END, NULL, NULL
 }
 };


 static int getsecret_func(sasl_conn_t *conn,
   void *context __attribute__((unused)),
   int id,
   sasl_secret_t **psecret)
 {
    /*  */

    /*  */

   return SASL_OK;
 }

 static int getauthname_func(void *context,
                             int id,
                             const char **result,
                             unsigned *len)
 {
    if (id!=SASL_CB_AUTHNAME) return SASL_FAIL;

    /*  */

    return SASL_OK;
  }

in the main program somewhere

sasl_client_init(callbacks);

Example applications that come with the Cyrus SASL library¶

The sample client and server included with this distribution were
initially written to help debug mechanisms. They base64 encode all
the data and print it out on standard output.

Make sure that you set the IP addresses, the username, the
authenticate name, and anything else on the command line (some
mechanisms depend on these being present).

Also, sometimes you will receive a message, or similar; this is due to the fact
that some mechanisms do not support realms and therefore never set
it.

The Cyrus IMAP server now incorporates SASLv2 for all its
authentication needs. It is a good example of a fairly large server
application. Also of interest is the prot layer, included in
libcyrus. This is a stdio-like interface that automatically takes
care of layers using a simple call.

Cyrus imapd also sets a callback,
which should be of interest to many applications.

Аутентификационные механизмы

GSSAPI — это спецификация Kerberos 5. И еще, STARTTLS-сертификация на
стороне клиента не была должным образом протестирована.

Когда STARTTLS разрешен, PLAIN SASL-механизм (если установлен) также будет доступен. Это нормально, потому что
всеравно нельзя будет передать пароль открытым текстом по шифрованному соединению.

Протокол IMAP также поддерживает аутентификацию пользователей без использования SASL (спецификация). Это
можно осуществить через команду ‘LOGIN’ (не путать с механизмом LOGIN в SASL). Команда IMAP LOGIN (как с PLAIN) посылает
Ваш пароль серверу открытым текстом. В этом случае пароль все еще проверяется через библиотеку Cyrus SASL, хотя
и никакой SASL-механизм при этом не используется.

POP-сервер может
осуществлять APOP-аутентификацию. В этом случае Cyrus
SASL должна быть собрана с ключем » --with-checkapop"
,  а пароли должны храниться в auxprop-базе (например: sasldb, auxprop, plugin).

Последние изменения

17.08.2020

Новая госзакупка в роли заказчика, контракт № 60008248558904024480200

04.08.2020

Новая госзакупка в роли заказчика, контракт № 51410573358904024480200

16.07.2020

Новая госзакупка в роли заказчика, контракт № 26332503885890402448020

15.06.2020

Новая госзакупка в роли заказчика, контракт № 27108392685890402448020

25.05.2020

Новая госзакупка в роли заказчика, контракт № 36797349165890402448020

Новая госзакупка в роли заказчика, контракт № 38621934605890402448020

20.05.2020

Новая госзакупка в роли заказчика, контракт № 17692468685890402448020

13.05.2020

Новая госзакупка в роли заказчика, контракт № 33061374858904024480200

The SASL Glue Layer¶

The first component of the SASL library is affectionately called the
layer. It takes care of ensuring that the application and
the mechanisms can work together successfully. To this end, it does a
variety of basic tasks:

  • Loading of any plugins (more on these below)
  • Ascertaining necessary security properties from the application to aid
    in the choice of mechanism (or to limit the available mechanisms)
  • Listing of available plugins to the application (mostly used on the server
    side)
  • Choosing the best mechanism from a list of available mechanisms
    for a particular authentication attempt (client-side)
  • Routing the authentication (and in the case of a mechanism with a security
    layer, encrypted) data packets between the application and the
    chosen mechanism.
  • Providing information about the SASL negotiation back to the application
    (authenticated user, requested authorization identity, security strength of
    any negotiated security layer, and so on).

The Cyrus SASL implementation also provides several other services to
both its plugins and applications. Some of these are simply general utilities,
such as MIME Base-64 encoding and decoding, and random number generation.
Others are more specific to the task of authentication, such as providing
password verification services. Such services are capable of taking
a username and a plaintext password and saying or
. Details of available password verification services are
discussed below.

Finally, the glue code allows the mechanisms and applications access to
two special types of plugins, Auxiliary Property or
plugins, which provide a simple database interface and can return properties
about the user such as password, home directory, or mail
routing address, and Username Canonicalization, which might provide
site-specific ways to canonicalize a username or perform other tasks.

Добавить комментарий

Ваш адрес email не будет опубликован. Обязательные поля помечены *

Adblock
detector