Ldap error codes

Эта функция доступна в версиях Business Plus, Enterprise, Education Fundamentals, Education Standard, Teaching and Learning Upgrade и Education Plus

Эта функция доступна в версиях Business Plus, Enterprise, Education Fundamentals, Education Standard, Teaching and Learning Upgrade и Education PlusСравнение версий

В случае возникновения неполадок при выполнении запросов LDAP во время и после подключения LDAP-клиента сервис Secure LDAP возвращает коды ошибок. Доступность этих кодов ошибок конечным пользователям через LDAP-клиенты зависит от клиента. Описанные в этой статье коды также заносятся в журналы аудита.

PROTOCOL_ERROR (2)

  • Возвращается, если в запросе упоминается неподдерживаемая версия LDAP. Сервис Secure LDAP поддерживает LDAP версии 3.
  • Возвращается, если в запросе упоминается неподдерживаемое действие. Google поддерживает следующие действия: Abandon (Отменить), Bind (Привязать), Extended (Расширено) (для StartTLS), Search (Поиск) и Unbind (Отменить привязку). Неподдерживаемые действия: Add (Добавить), Compare (Сравнить), Del (Удалить), Modify (Изменить) и ModifyDn (Изменить уникальное имя).
  • Возвращается, если в запросе упоминается неподдерживаемый идентификатор заказа Oid. Действие Extended (Расширено) поддерживается Google только для StartTLS (Oid 1.3.6.1.4.1.1466.20037) через ранее не защищенное подключение.

​AUTH_METHOD_NOT_SUPPORTED (7)

  • Возвращается, если в запросе Bind упоминается неподдерживаемый метод аутентификации. Google поддерживает методы SIMPLE, SASL PLAIN, and SASL EXTERNAL.

ADMIN_LIMIT_EXCEEDED (11)

  • Возвращается при превышении квоты LDAP.о

CONFIDENTIALITY_REQUIRED (13)

  • Возвращается, если запрос SASL Bind отправляется через незащищенное подключение.
  • Возвращается, если действие Search запрашивает данные, не относящиеся к атрибутам сервера, и выполняется через незащищенное подключение.

NO_SUCH_OBJECT (32)

  • Возвращается при поиске несуществующего объекта (например, неизвестного пользователя, группы или организационного подразделения).
  • Возвращается при поиске идентификатора пользователя, которого нет в каталоге.

INVALID_DN_SYNTAX (34)

  • Возвращается, если уникальное имя некорректно и не поддается анализу JNDI. Подробную информацию можно найти на странице javax.naming.ldap.LdapName (только на английском языке).
  • Возвращается, если уникальное имя содержит атрибут со значением, не являющимся строковым. Поддерживаются только строковые значения. Подробную информацию можно найти на странице javax.naming.directory.Attribute (только на английском языке).

INAPPROPRIATE_AUTHENTICATION (48)

  • Возвращается, если в запросе Bind указан некорректный сертификат клиента или сертификат с истекшим сроком действия.
  • Возвращается, если в запросе SASL PLAIN Bind не указаны или указаны некорректные учетные данные.

​INSUFFICIENT_ACCESS_RIGHTS (50)

  • Возвращается, если сервис Secure LDAP отключен для LDAP-клиента.
  • Возвращается, если у клиента нет лицензии на использование сервиса Secure LDAP.
  • Возвращается, если в запросе Bind указан пользователь, у которого нет лицензии на использование сервиса Secure LDAP.
  • Возвращается, если в запросе Bind указан отключенный пользователь.
  • Возвращается, если в последующем запросе Bind (rebind) указан пользователь, не принадлежащий к организационному подразделению, для которого включена аутентификация в конфигурации Secure LDAP.
  • Возвращается, если в запросе SIMPLE Bind не указаны учетные данные (без аутентификации).

UNWILLING_TO_PERFORM (53)

  • Возвращается, если в запросе SIMPLE Bind не указаны учетные данные (без аутентификации).

​OTHER (80)

  • Эта ошибка возвращается при получении неожиданного результата по причине ошибки в коде. Если она у вас возникла, обратитесь в службу поддержки Google Workspace или службу поддержки Cloud Identity Premium.

CANCELED (118)

  • Возвращается, если запрос Abandon прервал текущую операцию LDAP.
     

Эта информация оказалась полезной?

Как можно улучшить эту статью?

Whenever an LDAP directory server completes processing for an operation, it sends a response message back to the client with information about that operation. This response can help the client understand whether the operation succeeded or failed, but it may also provide additional information with more specific details about the nature of that success or failure. That response message includes a numeric result code, which is a basic indication of whether the operation succeeded, and to help categorize the reason for the failure.

Although each result code has a name in addition to its numeric value, it’s not always clear when a given result code might be used and what the potential causes might be. This reference tries to address that. It presents information collected from a number of different specifications, especially RFC 4511 (the core LDAPv3 protocol reference) and draft-just-ldapv3-rescodes (an IETF draft that served as an earlier version of a result code reference), along with information gleaned from years of experience working with LDAP.

  • The Elements of an LDAP Operation Response Message
  • Core LDAPv3 Result Codes
  • Other Server-Side Result Codes
  • Client-Side Result Codes

Table of LDAP Result Codes

The links above provide information about LDAP responses and result codes organized into logical sections. But if you’re looking for a specific result code, the following table can take you directly to the discussion of that code.

Result Code Name Numeric Value
success 0
operationsError 1
protocolError 2
timeLimitExceeded 3
sizeLimitExceeded 4
compareFalse 5
compareTrue 6
authMethodNotSupported 7
strongerAuthRequired 8
referral 10
adminLimitExceeded 11
unavailableCriticalExtension 12
confidentialityRequired 13
saslBindInProgress 14
noSuchAttribute 16
undefinedAttributeType 17
inappropriateMatching 18
constraintViolation 19
attributeOrValueExists 20
invalidAttributeSyntax 21
noSuchObject 32
aliasProblem 33
invalidDNSyntax 34
isLeaf 35
aliasDereferencingProblem 36
inappropriateAuthentication 48
invalidCredentials 49
insufficientAccessRights 50
busy 51
unavailable 52
unwillingToPerform 53
loopDetect 54
sortControlMissing 60
offsetRangeError 61
namingViolation 64
objectClassViolation 65
notAllowedOnNonLeaf 66
notAllowedOnRDN 67
entryAlreadyExists 68
objectClassModsProhibited 69
resultsTooLarge 70
affectsMultipleDSAs 71
virtualListViewError or controlError 76
other 80
serverDown 81
localError 82
encodingError 83
decodingError 84
timeout 85
authUnknown 86
filterError 87
userCanceled 88
paramError 89
noMemory 90
connectError 91
notSupported 92
controlNotFound 93
noResultsReturned 94
moreResultsToReturn 95
clientLoop 96
referralLimitExceeded 97
invalidResponse 100
ambiguousResponse 101
tlsNotSupported 112
intermediateResponse 113
unknownType 114
canceled 118
noSuchOperation 119
tooLate 120
cannotCancel 121
assertionFailed 122
authorizationDenied 123
e-syncRefreshRequired 4096
noOperation 16654
Next: The Elements of an LDAP Operation Response Message

Название ошибки Номер Пояснения/причины LDAP_SUCCESS 0 (x’00) Успешное завершение запроса. LDAP_OPERATIONS_ERROR 1 (x’01) Произошла ошибка операции. LDAP_PROTOCOL_ERROR 2 (x’02) Обнаружено нарушение протокола. LDAP_TIMELIMIT_EXCEEDED 3 (x’03) Превышено ограничение по времени LDAP. LDAP_SIZELIMIT_EXCEEDED 4 (x’04) Превышено ограничение по размеру LDAP. LDAP_COMPARE_FALSE 5 (x’05) Операция сравнения вернула «ложь». LDAP_COMPARE_TRUE 6 (x’06) Операция сравнения вернула «истину». LDAP_STRONG_AUTH_NOT_SUPPORTED 7 (x’07) Сервер LDAP не поддерживает строгую аутентификацию. LDAP_STRONG_AUTH_REQUIRED 8 (x’08) Для данной операции требуется прохождение строгой аутентификации. LDAP_PARTIAL_RESULTS 9 (x’09) Возвращены только частичные результаты. LDAP_REFERRAL 10 (x’0A) Указывает, что в ответе присутствует отсылка LDAP. Данное сообщение будет содержать один или несколько LDAP URL, по которым клиент должен перенаправить последующие операции для получения данного DN. LDAP_ADMINLIMIT_EXCEEDED 11 (x’0B) Указывает на то, что какие-либо ограничения, установленные на стороне сервера на количество записей, возвращаемое при поиске, были превышены. LDAP_UNAVAILABLE_CRITICAL_EXTENSION 12 (x’0C) Указывает на то, что элемент управления или правило соответствия, запрашиваемые в операции, не поддерживаются данным сервером. LDAP_CONFIDENTIALITY_REQUIRED 13 (x’0D) Конфигурация данного сервера требует обеспечения какой-либо формы конфиденциальности (TLS/SSL или SASL) при выполнении подсоединения с предоставляемым DN, например, определённая на глобальном уровне или в разделе database директива security может требовать соблюдения некоторой формы SSF при выполнении simple_bind или операции обновления. LDAP_SASL_BIND_IN_PROGRESS 14 (x’0E) Данный сервер в настоящий момент выполняет SASL-подсоединение и в этом контексте запрашиваемая операция является неверной. 15 (x’0F) Не используется. LDAP_NO_SUCH_ATTRIBUTE 16 (x’10) Указанный в запросе атрибут не присутствует в записи. LDAP_UNDEFINED_TYPE 17 (x’11) Указанный в запросе тип атрибута был неверным. LDAP_INAPPROPRIATE_MATCHING 18 (x’12) Указывает на то, что правило соответствия с расширяемым фильтром соответствия не поддерживается для указываемого типа атрибута. LDAP_CONSTRAINT_VIOLATION 19 (x’13) Указываемое в операции значение атрибута нарушает некоторые ограничения.
Возможные причины:
1. Строка слишком большой длины.
2. Неверный тип — строка записывается в числовой атрибут.
3. Неправильное значение, например, атрибут может принимать только определённое значение, либо одно из набора значений. LDAP_TYPE_OR_VALUE_EXISTS 20 (x’14) Указываемый тип атрибута или значение атрибута уже присутствует в записи.
Возможные причины:
1. При добавлении записи — один или несколько атрибутов в LDIF (или операции добавления/замены) для записи в точности совпадают (дублируются). LDAP_INVALID_SYNTAX 21 (x’15) Было указано неверное значение атрибута. 22 — 31 (x’16 — x’1F). Не используются. LDAP_NO_SUCH_OBJECT 32 (x’20) Указанная запись не существует в каталоге (DIT). LDAP_ALIAS_PROBLEM 33 (x’21) Псевдоним в DIT указывает на несуществующую запись. LDAP_INVALID_DN_SYNTAX 34 (x’22) Был указан синтаксически неверный DN. Может также возникнуть, если Вы используете файл в формате LDIF (dn: cn=xxx и т.д.) с утилитой ldapdelete, которой требуется только указание простого DN. 35 (x’23) Зарезервировано и не используется в LDAPv3 (LDAPv2: LDAP_IS_LEAF — указанный объект является листовым, то есть у него нет дочерних объектов). LDAP_ALIAS_DEREF_PROBLEM 36 (x’24) Возникла проблема при разыменовании псевдонима. Смотрите также описание ошибки 33. 37 — 47 (x’25 — x’2F). Не используются. LDAP_INAPPROPRIATE_AUTH 48 (x’30) Была указана проверка подлинности, которую невозможно осуществить, например, была указана LDAP_AUTH_SIMPLE, а у записи нет атрибута userPassword. LDAP_INVALID_CREDENTIALS 49 (x’31) Были предоставлены неверные учётные данные, например, неправильный пароль.
Дополнительный текст: unable to get TLS Client DN (невозможно получить DN клиента TLS).
Возможные причины:
1. Не предоставлен сертификат клиента в случае, если директива TLSVerifyClient установлена в ‘demand’.
2. Не предоставлен сертификат клиента в случае, если директива TLSVerifyClient установлена в ‘never’. В этом случае данное сообщение об ошибке не является фатальным и обслуживание клиента продолжается. LDAP_INSUFFICIENT_ACCESS 50 (x’32) У данного пользователя недостаточно прав доступа на осуществление запрашиваемой операции. LDAP_BUSY 51 (x’33) Данный сервер (DSA) слишком занят, чтобы выполнить запрашиваемую операцию. LDAP_UNAVAILABLE 52 (x’34) DSA недоступен. Он может быть, например, остановлен, поставлен на паузу или находится в процессе инициализации. LDAP_UNWILLING_TO_PERFORM 53 (x’35) Данный сервер (DSA) не желает выполнять запрашиваемую операцию.
Дополнительный текст: no global superior knowledge (нет сведений о глобальном вышестоящем каталоге) — имя записи, которую собираются добавить или модифицировать, не находится ни в одном из контекстов именования и у сервера нет правильной отсылки на вышестоящий каталог.
Возможная причина: не задан атрибут olcSuffix (директива suffix в slapd.conf) для DIT, на которое идёт ссылка.
Дополнительный текст: Shadow context; no update referral (теневой контекст (реплика); отсылки для выполнения обновлений не указано) — DIT, в которое собираются вносить изменения, является репликой в режиме «только для чтения», и, из-за отсутствия директивы updateref, невозможно возвратить отсылку.
Возможные причины:
1. Была попытка произвести запись в реплику «только для чтения» (в конфигурации syncrepl потребитель всегда в режиме «только для чтения»).
2. В конфигурации syncrepl multi-master в файле slapd.conf возможно пропущена директива mirrormode true.
3. Если slapd при запуске использовал файл slapd.conf, а директория slapd.d (cn=config) также существует, то при последующих модификациях DIT могут возникать ошибки с выдачей этого сообщения. В частности, в FreeBSD требуется наличие явного указания в rc.conf (slapd_cn_config=»YES») для принудительного использования slapd.d. LDAP_LOOP_DETECT 54 (x’36) Выявлено зацикливание. 54 — 59 (x’37 — x’3B). Не используются. LDAP_SORT_CONTROL_MISSING 60 (x’3C) В стандартах не используется. Только для Sun LDAP Directory Server. Сервер не получил требуемый элемент управления сортировки на стороне сервера. LDAP_RANGE_INDEX_ERROR 61 (x’3D) В стандартах не используется. Только для Sun LDAP Directory Server. Результаты запроса превысили диапазон, указанный в запросе. 62 — 63 (x’3E — x’3F). Не используются. LDAP_NAMING_VIOLATION 64 (x’40) Указывает на то, что данный запрос содержит нарушение именования в отношении текущего DIT. LDAP_OBJECT_CLASS_VIOLATION 65 (x’41) Произошло нарушение объектного класса при использовании текущего набора схемы данных, например, при добавлении записи был пропущен обязательный (must) атрибут. LDAP_NOT_ALLOWED_ON_NONLEAF 66 (x’42) Операция на нелистовой записи (то есть той, у которой есть дочерние записи) не разрешается. LDAP_NOT_ALLOWED_ON_RDN 67 (x’43) Операция над RDN, например, удаление атрибута, использующегося в качестве RDN в DN, не разрешается. LDAP_ALREADY_EXISTS 68 (x’44) Данная запись уже существует в этом DIT. LDAP_NO_OBJECT_CLASS_MODS 69 (x’45) Не разрешена модификация объектного класса. LDAP_RESULTS_TOO_LARGE 70 (x’46) Только C API (черновой RFC). Результаты слишком велики и не могут содержаться в данном сообщении. LDAP_AFFECTS_MULTIPLE_DSAS 71 (x’47) Указывает на то, что операцию необходимо выполнить на нескольких серверах (DSA), а это не разрешено. 72 — 79 (x’48 — x’4F). Не используются. LDAP_OTHER 80 (x’50) Произошла неизвестная ошибка.
Возможная причина:
Попытка удаления атрибута (особенно в cn=config), удаление которого запрещено.
Дополнительный текст: olcDbDirectory: value #0: invalid path: No such file or directory
Возможная причина: перед инициализацией новой базы данных директория для её размещения должна существовать. LDAP_SERVER_DOWN 81 (x’51) Только C API (черновой RFC). Библиотека LDAP не может связаться с LDAP-сервером. LDAP_LOCAL_ERROR 82 (x’52) Только C API (черновой RFC). Произошла некоторая локальная ошибка. Обычно это неудачная попытка выделения динамической памяти. LDAP_ENCODING_ERROR 83 (x’53) Только C API (черновой RFC). Произошла ошибка при кодировании параметров, отправляемых на LDAP-сервер. LDAP_DECODING_ERROR 84 (x’54) Только C API (черновой RFC). Произошла ошибка при декодировании результатов, полученных от LDAP-сервера. LDAP_TIMEOUT 85 (x’55) Только C API (черновой RFC). При ожидании результатов было превышено ограничение по времени. LDAP_AUTH_UNKNOWN 86 (x’56) Только C API (черновой RFC). В ldap_bind() был указан неизвестный метод аутентификации. LDAP_FILTER_ERROR 87 (x’57) Только C API (черновой RFC). Операции ldap_search() был предоставлен неправильный фильтр (например, количество открывающихся и закрывающихся скобок в фильтре не совпадает). LDAP_USER_CANCELLED 88 (x’58) Только C API (черновой RFC). Указывает на то, что пользователь прервал запрошенную операцию. LDAP_PARAM_ERROR 89 (x’59) Только C API (черновой RFC). Процедура ldap была вызвана с неверными параметрами. LDAP_NO_MEMORY 90 (x’5A) Только C API (черновой RFC). Выделение памяти (например, с помощью malloc(3) или другого механизма динамического выделения памяти) вызвало сбой в процедуре из библиотеки ldap. LDAP_CONNECT_ERROR 91 (x’5B) Только C API (черновой RFC). Библиотека/клиент не может соединиться с LDAP-сервером, указанным в URL. LDAP_NOT_SUPPORTED 92 (x’5C) Только C API (черновой RFC). Указывает на то, что в запросе используется функция, не поддерживаемая данным сервером. LDAP_CONTROL_NOT_FOUND 93 (x’5D) Только C API (черновой RFC). Запрашиваемый элемент управления не найден на данном сервере. LDAP_NO_RESULTS_RETURNED 94 (x’5E) Только C API (черновой RFC). Запрашиваемая операция завершилась успешно, но никаких результатов возвращено (получено) не было. LDAP_MORE_RESULTS_TO_RETURN 95 (x’5F) Только C API (черновой RFC). Запрашиваемая операция завершилась успешно, но должны быть возвращены дополнительные результаты, которые можно уместить в текущее сообщение. LDAP_CLIENT_LOOP 96 (x’60) Только C API (черновой RFC). Клиент выявил зацикливание, например, при следовании по отсылкам. LDAP_REFERRAL_LIMIT_EXCEEDED 97 (x’61) Только C API (черновой RFC). Сервер или клиент превысил какое-либо установленное ограничение при следовании по отсылкам.

This blog post is a repository for the LDAP error codes I experienced, and the actions I took to resolve the problems.

LDAP return codes

Messages include return codes like “3”, but the LDAP programming book has terms like “LDAP_PARAM_ERROR”.

These are defined in

/usr/include/ldap*.h,

SSL initialization failures reason codes.

https://www.ibm.com/docs/en/zos/2.5.0?topic=utilities-ssltls-information-ldap-client#idg18488__failrc

GLD1342E Unwilling to open file or directory ‘/var/ldap/schema’:

File or directory UID 0, UID of program 990023, GID of file or directory 1, GIDs of program (990018).

Colin’s comments

The LDAP started task expects to be the file owner of the /var/ldap/* files. On ADCD they were OMVSKERN:OMVSGRP. I used

chown -R gldsrv:gldgrp /var/ldap/*

to change the file owner.

Object class violation: additional info: R001026 No structural object class specified for ‘cn=ibmuser, o=Your Company’.

Colin’s comments

I had an ldif file with

dn: cn=mq, o=Your Company
changetype: add
objectclass: top
#objectclass: person
#objectclass: organizationalPerson
objectclass: ibm-nativeAuthentication
cn: mq
telephoneNumber: 1234567
telephoneNumber: 12345672
sn: Administrator

And no proper object class. When I uncommented person or organizationalPerson it worked.

R001030 Entry contains attribute ‘ibm-nativeid’ which is not allowed for object class

I was trying to add ‘ibm-nativeid’ to an entry. This attributed belongs to object class ibm-nativeAuthentication. The object has to have this object class, for example, add the lines in the bold font.

dn: cn=colin, o=Your Company
objectclass: top
objectclass: person
objectclass: organizationalPerson
objectclass: ibm-nativeAuthentication
cn: LDAP Administrator
sn: Administrator
ibm-nativeId: COLIN

Credentials are not valid: R004062 Credentials are not valid

By accident I overwrote my administration userid definition.

Colin’s comments

Edit GLD.CNFOUT(DSCONFIG) ( or what every config file you are using)

Comment out the adminDN, and add in the cn=admin and its password.

From

adminDN “cn=ibmuser, o=Your Company”
# adminDN “cn=Admin”
# adminPW secret

to

# adminDN “cn=ibmuser, o=Your Company”
adminDN “cn=Admin”
adminPW secret

  • Stop and restart LDAP.
  • Fix the userid
  • Change the admin definitions back
  • restart LDAP.

R003070 Access denied because user does not have ‘write’ permission for all modified attributes

I used a command like ldapmodify -a -h 127.0.0.1 -p 389 -D “cn=adcda, o=Your Company” -w adcdapw1 -f mqacl.* to change some definitions, but the userid cn=adcda,o=Your Company did not have the correct permissions.

You can enable the LDAP acl trace using f gldsrv,debug 128, and reset it using f gldsrv,debug 0

To change/add/delete an ACL the id needs restricted:rscw

For example

dn: o=Your Company
changetype: modify
replace: aclEntry
aclEntry : access-id:cn=ibmuser, o=Your Company:
object:ad:normal:grant:rscw:sensitive:rscw:critical:rscw
aclEntry : access-id:cn=adcda, o=Your Company:
object:ad:normal:rscw:sensitive:rscw:critical:rscw:restricted:rscw

Insufficient access: R003057 Access denied because user does not have ‘add’ permission for the parent entry

Trying to add an entry.

The userid is not authorised to add an entry. It needs an acl with object:ad ( a for add, d for delete)

dn: o=Your Company
changetype: modify
replace: aclEntry
aclEntry : access-id:cn=ibmuser, o=Your Company:
object:ad:normal:rscw:sensitive:rscw:critical:rscw
aclEntry : access-id:cn=adcda, o=Your Company:
object:ad:normal:rscw

My GSK_CLIENT_TLS_KEY_SHARES GSK_SERVER_TLS_KEY_SHARES environment variables had an invalid value. They had 0021 which is not supported in TLS 1.3.

Look in the gsktrace

GLD1063E Unable to initialize the SSL environment: 416 – Permission denied.

GLD1160E Unable to initialize the LDAP client SSL support: Error 113, Reason -17.

ICH408I USER(GLDSRV ) GROUP(GLDGRP ) IRR.DIGTCERT.LISTRING CL(FACILITY) INSUFFICIENT ACCESS AUTHORITY ACCESS INTENT(READ ) ACCESS ALLOWED(NONE )

In the LDAP config file I had sslKeyRingFile START1.MQRING. The userid GLDSRV did not have read access to the list ring facitity IRR.DIGTCERT.LISTRING CL(FACILITY)

permit IRR.DIGTCERT.LISTRING CL(FACILITY) id(GLDSRV)
SETROPTS RACLIST(FACILITY) REFRESH

GLD1160E Unable to initialize the LDAP client SSL support: Error 113, Reason 705

I had GSK_OCSP_CLIENT_CACHE_SIZE=10000, when I set it to 100, it worked.

GLD1160E Unable to initialize the LDAP client SSL support: Error 113, Reason 2.
GLD1063E Unable to initialize the SSL environment: 202 – Error detected while opening the certificate database.

  • reason code 2: Keyring open error
  • SSL return code 202: Keyring open error

Actions

  • Check value specified
  • Check access
    • rdefine rdatalib START1.MQRING.LST UACC(NONE)
    • SETROPTS RACLIST(RDATALIB) REFRESH
    • permit START1.MQRING.LST class(RDATALIB) ACCESS(READ) id(GLDSRV)

Check the keyring exists ( list the contents of it)

RACDCERT LISTRING(name) ID(COLIN)

Get out a gsk trace .

  • Add GSK_TRACE=0xff to the env file.
  • By default the output goes to gskssl.*.trc
  • Format it using gsktrace gskssl.*.trc gsktrace.out
  • oedit gsktrace.out search for ERROR. I had ERROR gsk_open_keyring(): IRRSDL00 GetData failed: SAF 8, RC 8, Reason 84.
  • These are documented here. 8 8 84 means keyring not found.

GLD1160E Unable to initialize the LDAP client SSL support: Error 113, Reason -99.

Reason -99 is GSK_ERROR_UNKNOWN_ERROR!

I got this when trying to use OCSP with LDAP. I had

GSK_OCSP_RESPONSE_SIGALG_PAIRS=0601050305010804

If I remove the 0804 ( or 0806 or 0805) then startup got past this message.

GLD1116E Unable to initialize an SSL connection 8 – Certificate validation error.

Colin’s comments

I got this many times for many different reasons.

I had Certificate Revocation List processing enabled.

In the GSK trace I had

ERROR check_crl_issuer_extensions(): crlSign bit is not set in KeyUsage
ERROR check_revoked(): Unable to verify CRL issuer extensions: Error 0x03353026

03353026 Incorrect key usage.

Explanation: The key usage certificate extension does not permit the requested key operation.

My CA was not defined properly I needed

keyUsage = keyCertSign, digitalSignature,cRLSign

GLD1116E Unable to initialize an SSL connection openssl SSL alert number 42

Colin’s comments

The certificate sent from the client was missing the authorityKeyIdentifier extension, because the CA certificate is missing.

In the -config xxx.cnf and the specified -extensions … or the default extensions

subjectKeyIdentifier = hash
authorityKeyIdentifier = keyid:always, issuer:always

You need to change the CA, regenerate the end user certificate, and redistribute the CA.

533 – Remote partner indicates unsupported certificate.

GLD1116E Unable to initialize an SSL connection 402 – No SSL cipher

Colin’s comments 1

I could see from the gsktrace on zOS there was a message ERROR read_client_hello_cipher_select(): No intersection with client cipher suites.

This means the list of available cipher specs on the server did not include the one sent from the client.

Colin’s comments 2

The server’s certificate was not compatible with the list in GSK_V3_CIPHER_SPECS_EXPANDED. For example the list had only EC certificates, but the server was RSA.

Colin’s comments 3

I had a server certificate defined as

SIZE(521) NISTECC …

In the trace I had

EXIT gsk_get_ec_parameters_info(): <— Exit status 0x00000000 (0) EC curve type 34, key size 521
ERROR send_v3_alert(): Sent SSL V3 alert 40 to 10.1.0.2[38736]

INFO edit_ciphers(): Server certificate ec curve 0034 not in supported ecurve tls extension. EC cipher suites disabled

When I changed the size to 256 it worked, and used (C02C,C02B,C024,C023)

From here 0034 is TLS_DH_anon_WITH_AES_128_CBC_SHA

GLD1116E Unable to initialize an SSL connection with 10.1.0.2: 412 –
SSL protocol or certificate type is not supported.

Colin’s comments

The server had been configured for only GSK_PROTOCOL_TLSV1_3=on.

The GSKTRACE output has Client does not support TLS V1.3. No protocol version match found.

GLD1116E Unable to initialize an SSL connection with … 434 – Certificate key is not compatible with cipher suite.

Colin’s comments

The server’s certificate is not consistent with the certificate sent from the client.

For example the server is using an RSA certificate, but the client is sending and EC certificate.

For example server is an RSA certificate. From the list GSK_V3_CIPHER_SPECS_EXPANDED = C024C006C007C008c024c023c025130313011302009E

it chooses 009E. 009E is TLS_DHE_RSA_WITH_AES_128_GCM_SHA256 =

128-bit AES in Galois Counter Mode encryption with 128-bit AEAD authentication and ephemeral Diffie-Hellman key exchange signed with an RSA certificate.

When my elliptic certificate from the client comes in,

Signature Algorithm: SHA256withRSA, Key: Sun EC public key, 521 bits, parameters: secp521r1 NIST P-521

This is incompatible.

When the server certificate is an Elliptic certificate, then certificate C024 is used. C024 is

TLS_ECDHE_ECDSA_WITH_AES_256_CBC_SHA384 = 256-bit AES encryption with SHA-384 message authentication and ephemeral ECDH key exchange signed with an ECDSA certificate.

This works for both of them.

GLD1116E Unable to initialize an SSL connection 440 – Incorrect key usage.

Colin’s comments.

The server’s certificate was defined with KEYUSAGE(CERTSIGN,KEYAGREE)

When I added HANDSHAKE, recreated the certificate, and restarted the LDAP server it worked. KEYUSAGE(HANDSHAKE,CERTSIGN,KEYAGREE).

Certsign says this is a used as a CA.

GLD1116E Unable to initialize an SSL connection with 127.0.0.1: 533 – Remote partner indicates unsupported certificate.

Colin’s comments.

I got this when the GSK_TLS_SIG_ALG_PAIRS=”0403″ did match up with the server’s version.

In the gsktrace for the server I got TLS 1.3 alert 43 received from

In the client’s gsktrace it had

Certificate key algorithm 13, Signature algorithm 25
INFO read_tls13_certificate(): Using client’s signature algorithm list to check server certificate chain
ERROR read_tls13_certificate(): Signature algorithm 25 in server certificate not in client signature algorithms list
ERROR send_tls13_alert(): Sent TLS 1.3 alert 43 to …

in gskcms.h

  • x509_alg_ecPublicKey = 13,
  • x509_alg_sha256WithRsaEncryption = 25,

GLD1116E Unable to initialize an SSL connection with 127.0.0.1: 467 – Signature algorithm not in signature algorithm pairs list.

See previous for 553. The GSK_TLS_SIG_ALG_PAIRS from the client does not mach the server certitificate’s signature.

RACDCERT LIST(LABEL(‘SERVEREC’ )) id(start1)

gives

Signing Algorithm: sha256RSA

This table says 0401 SHA-256 with RSA, so this value is needed in the GSK_TLS_SIG_ALG_PAIRS.

The configuration was

  • server GSK_SERVER_TLS_KEY_SHARES=0030
  • client GSK_CLIENT_TLS_KEY_SHARES=0024

Specify values with a common value.

TLS 1.3 supports 00300029002500240023

TLS 1.2 supports 00250024002300210019

So you could specify =002300240025

LDAPSEARCH client on Linux

ldap_search_ext: Bad search filter (-7)

with -b “o=Your Company” “&(objectClass=*)”

remove the &()s

-b “o=Your Company” “objectClass=*”

worked

ldap_sasl_interactive_bind_s: Unknown authentication method (-6)
additional info: SASL(-4): no mechanism available:

No certificate was sent from the client to the host.

ldap_sasl_interactive_bind_s: Can’t contact LDAP server (-1)
additional info: A TLS fatal alert has been received.

Colin’s comments 1

The list of certificate types the client sent up ( first part of the handshake) did not match any of the list of supported certificates in GSK_V3_CIPHER_SPECS_EXPANDED=009E002FC027c02dc023c025130313011302

I used Wireshark to display network traffic, and the the list of supported certificate types sent in the client hello.

z/OS gsktrace shows

Initial SSL V3 4-character cipher specs:
009E002FC027C02DC023C025130313011302
SSL V3 cipher C02D skipped due to key algorithm
SSL V3 cipher C023 skipped due to key algorithm
SSL V3 cipher C025 skipped due to key algorithm
SSL V3 cipher 1303 skipped for TLS V1.2 sessions
SSL V3 cipher 1301 skipped for TLS V1.2 sessions
SSL V3 cipher 1302 skipped for TLS V1.2 sessions
SSL V3 cipher specs: 009E002FC027
Using TLSV1.2 protocol
Using V3 cipher specification 009E

  • 009E is TLS_DHE_RSA_WITH_AES_128_GCM_SHA256
  • 002F is TLS_RSA_WITH_AES_128_CBC_SHA
  • C027 is TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256

and the z/OS default key had

Signing Algorithm: sha256RSA
Key Usage: HANDSHAKE, DATAENCRYPT, DOCSIGN
Key Type: RSA
Key Size: 4096

Colins’s comments 2

In the gsktrace I had

ERROR check_ocsp_signer_extensions(): extended keyUsage does not allow OCSP Signing

This is because the certificate used in the ocsp server, did not have

Extended Key Usage: critical, OCSP Signing

Resign the certicate and check the attribute has been set by

openssl x509 -in ocspcert.pem -text -nooutless

ldap_sasl_interactive_bind_s: Can’t contact LDAP server (-1)
additional info: An unknown public key algorithm was encountered.

Colin’s comments

As part of the “certificate verify”, the Signature Algorithm passed to the server, was not in the GSK_TLS_SIG_ALG_PAIRS list in the z/OS LDAP environment file.

Check all relevant are specified

GSK_TLS_SIG_ALG_PAIRS=060105010401030108060805080405030403

ldap_sasl_interactive_bind_s: Can’t contact LDAP server (-1)
additional info: (unknown error code)

I got this when using OCSP for certificate validation. OCSP sent down a flow from the server, and the ldapserver code was not expecting it, so ends.

Action: set

GSK_SERVER_OCSP_STAPLING=OFF

ldap_sasl_interactive_bind_s: Invalid credentials (49)

additional info: R004062 Credentials are not valid (srv_ssl_get_client_info:928)

Colin’s comments 1.

The TLS handshake was accepted, but the mapping of the DN to a userid did not return a userid.

Turn on LDAP trace using f GLDSRV,debug LDAPBE gave

LDAPBE srv_process_bind_request()374: do_bind msgID=1, connID=4, flags=0x22, controls=0x0, DN=”, authType=3, bindType=1, version=3
LDAPBE srv_process_bind_request()939: do_return_bind msgID=1, connID=4, bindDN=”, safUserID=”, dnList=0x0, grpList=0x0, rc=49: R004062 Credentials are not valid (srv_ssl_get_client_info:928)

ERROR srv_process_bind_request()957: Request failed OP code=0 bind=CN=secp521r,O=cpwebuser,C=GB

Map the certificate to a userid – note the ‘.’ in the SDNFILTER name.

//S1 EXEC PGM=IKJEFT01,REGION=0M
//STEPLIB DD DISP=SHR,DSN=SYS1.MIGLIB
//SYSPRINT DD SYSOUT=*
//SYSTSPRT DD SYSOUT=*
//SYSTSIN DD *
*RACDCERT LISTMAP ID(ADCDE)
*RACDCERT DELMAP(LABEL('LINUXECEC' )) ID(ADCDE)
*SETROPTS RACLIST(DIGTNMAP, DIGTCRIT) REFRESH
RACDCERT MAP ID(ADCDE ) -
   SDNFILTER('CN=secp521r.O=cpwebuser.C=GB') -
   WITHLABEL('LINUXECEC)
RACDCERT LISTMAP ID(ADCDE)
SETROPTS RACLIST(DIGTNMAP, DIGTCRIT) REFRESH
/*

Once you have defined the mapping, you do not need to restart LDAP, it is picked up on the next usage.

Colin’s comments 2.

The mapping of certificate to userid exists, but the userid is revoked, or otherwise not available.

ERROR srv_ssl_get_client_info() 902: safRc=8 racfRc=8 racfRsn=40

This is from R_usermap (IRRSIM00): Map application user

  • racfrsn 28 – Certificate is not valid.
  • racfrsn 40 – The Distinguished Name length is not valid, or the Distinguished Name string is all blanks (x’20’), all nulls (x’00’), or a combination of blanks and nulls.
  • racfrsn 48 – There is no distributed identity filter mapping the supplied distributed identity to a RACF user ID, or The IDIDMAP RACF general resource class is not active or not RACLISTed.

ldap_ssl_client_init failed! rc == 113, failureReasonCode == 2

This is not listed in table 7 of the LDAP client programming

I turned on trace using ldapsearch .. -d all …

and got

ERROR ldap_ssl_client_init()710: Unable to initialize SSL environment: Error 202
TRACE ldap_ssl_client_init()744: <= Status 113, Reason 2

Error code 202 is in the table = Keyring open error.

ldap_connect()409: Unable to initialize SSL connection to 127.0.0.1[1389]: Error 116, Reason -99

Colin’s comments

This was due to a mismatch in the GSK_TLS_SIG_ALG_PAIRS statement.

ldap_connect()409: Unable to initialize SSL connection to 127.0.0.1[1389]: Error 116, Reason -13

Colin’s comments

This was due to a mismatch in the supported versions of TLS.

ldap_connect()409: Unable to initialize SSL connection to 127.0.0.1[1389]: Error 116, Reason 438

ldap_ssl_socket_initUnable to initialize SSL connection: Error 456.

Colin’s comments

On the system log I had

ICH408I USER(COLIN ) GROUP(SYS1 ) NAME(COLIN PAICE )
CSFOWH CL(CSFSERV )
INSUFFICIENT ACCESS AUTHORITY
ACCESS INTENT(READ ) ACCESS ALLOWED(NONE )

I used the following to get access, and it worked.

permit CSFOWH class(CSFSERV) ACCESS(read) id(COLIN)
SETROPTS RACLIST(CSFSERV) REFRESH

Понравилась статья? Поделить с друзьями:

Читайте также:

  • Launcher interface check failed with error 2 казаки gameranger
  • Launcher exe системная ошибка
  • Launcher exe ошибочный образ
  • Launcher exe ошибка приложения 0xc0000007b
  • Ldap error code 49 invalid credentials

  • 0 0 голоса
    Рейтинг статьи
    Подписаться
    Уведомить о
    guest

    0 комментариев
    Старые
    Новые Популярные
    Межтекстовые Отзывы
    Посмотреть все комментарии