release version 1.10.0

This commit is contained in:
2024-12-14 04:07:49 +03:00
parent a5088587f7
commit c6b3d793c4
1916 changed files with 254306 additions and 0 deletions

View File

@ -0,0 +1,175 @@
ЛИЦЕНЗИЯ ОГРАНИЧЕННОГО ПРИМЕНЕНИЯ
Настоящий документ устанавливает для Пользователя условия применения Базовой (некоммерческой)
версии лицензии для пробного использования программного обеспечения ENTAXY, принадлежащего
Правообладателю Обществу с ограниченной ответственностью "ЕМДЕВ" (ОГРН 1057810026658, ИНН
7813313860, юридический адрес: 197022, Россия, г. Санкт-Петербург, ул. Профессора Попова,
д. 23, литера В, помещение 3Н), расположенной в сети Интернет по адресу
https://www.emdev.ru/about (далее - Компания).
Используя или получая доступ к Программному обеспечению, или нажав «Я согласен с Условиями»
(или аналогичную кнопку или флажок) после загрузки или установки Программного обеспечения,
Пользователь выражает свое согласие на обязательность условий и ограничений, изложенных в
настоящем документе, в противном случае, он должен не использовать или не получать доступ
к Программному обеспечению.
1. ТЕРМИНЫ И ОПРЕДЕЛЕНИЯ
a) ПО Программное обеспечение, интеграционная шина «ЭНТАКСИ» (ENTAXY) в любой ее версии
или редакции, исключительные права на которую принадлежат Правообладателю.
b) Правообладатель (Компания) ООО «ЕМДЕВ», ОГРН 1057810026658, ИНН 7813313860, исключительные
права которого подтверждаются Свидетельством о государственной регистрации в Реестре программ
для ЭВМ № 2021610848 от 19.01.2021 года.
c) Пользователь юридическое или физическое лицо, получившее через скачивание с сайта
https://entaxy.ru или иным образом, дистрибутив ПО, пользующееся ПО.
d) ИС интеллектуальная собственность закреплённое законом исключительное право, а также
личные неимущественные права авторов произведений на результат интеллектуальной деятельности.
e) Подписка это коммерческое предложение Правообладателя, состоящее из Лицензии на использование
ПО и доступа к технической поддержке программного обеспечения на срок Подписки. Подписка
включает предоставление Пользователю неисключительного права использования ПО, в том числе
получение обновлений функционала ПО и безопасности ПО, исправление ошибок ПО и получение
патчей с обновлениями и исправлениями программного обеспечения. Подписка приобретается
Пользователем на период времени, указанный в Сертификате. Количество подписок устанавливается
для каждого Пользователя индивидуально в Сертификате.
f) Сертификат документ, выдаваемый Дистрибъютором или Авторизованным партнёром (Партнёром),
подтверждающий факт приобретения физическим или юридическим лицом Подписки на программное
обеспечение в ограниченном объёме и на определённый период времени.
g) Лицензия (простая (неисключительная) совокупность ограниченных прав использования ПО,
предоставленных Пользователю согласно условиям Подписки.
h) Библиотека совокупность подпрограмм и объектов, используемых для разработки программного
обеспечения.
i) Исходный код текст компьютерной программы на каком-либо языке программирования, состоящий
из одного или нескольких файлов, который может быть прочтён человеком.
j) Объектный код файл (часть машинного кода) с промежуточным представлением отдельного модуля
программы, полученный в результате обработки исходного кода, еще не связанный в полную программу.
Это машинный код для одной конкретной библиотеки или модуля, который будет составлять готовый
продукт.
k) Некоммерческое использование индивидуальное личное использование Пользователем программного
обеспечения с целью обучения работе с Программным обеспечением, для оценки или демонстрации
возможностей Программного обеспечения, при котором, Пользователем не извлекается коммерческая
выгода и/или не идёт в доход денежное вознаграждение при использовании Программного обеспечения.
2. ДОПУСТИМЫЕ СПОСОБЫ ИСПОЛЬЗОВАНИЯ ПРОГРАММНОГО ОБЕСПЕЧЕНИЯ
2.1. Правообладатель предоставляет Пользователю ограниченное право использования Программного
обеспечения на условиях простой (неисключительной) лицензии в объёме, ограниченном правом
воспроизведения полной рабочей версии программного обеспечения, новых версий программного обеспечения
в памяти оборудования и его запуска на оборудовании в соответствии со ст. 1280 ГК РФ.
2.2. Право на использование Программного обеспечения, предоставляемое Пользователю, носит
неисключительный характер.
2.3. Пользователю предоставляется всемирная, неисключительная, не подлежащая сублицензированию,
лицензия на ограниченное использование Программного обеспечения.
2.4. Пользователь, имеющий Базовую (некоммерческую) версию лицензии для пробного использования
имеет право приобрести Подписку на программное обеспечение. В этом случае Пользователь обязан
обратиться в службу поддержки Правообладателя по адресу: https://entaxy.ru/ для изменения
вида лицензии с Базовой бесплатной версии на Подписки.
2.5. Срок использования скачанной Пользователем базовой (некоммерческой) версии лицензии для
пробного использования программного обеспечения не ограничен.
2.6. Использование Пользователем настоящего программного обеспечения в целях разработки,
модификации, обновления другого ПО, принадлежащего третьим лицам, а не Правообладателю,
без разрешения Правообладателя не допускается.
3. АВТОРСКОЕ ПРАВО.
3.1. Все авторские права, все права интеллектуальной собственности на Программное обеспечение
и любые его копии принадлежат Правообладателю.
3.2. Все авторские права, все права интеллектуальной собственности в отношении любого контента,
к которому можно получить доступ с помощью Программного обеспечения, является собственностью
соответствующего владельца контента и защищается применимым законодательством об авторском
праве или другими законами и договорами об интеллектуальной собственности.
3.3. Условия использования Программного обеспечения.
Лицензия, предоставленная Пользователю, действительна только в том случае, если Пользователь
придерживается следующих условий:
3.3.1. Принятие уведомлений об авторских правах. Пользователю запрещается удалять или изменять
какие-либо уведомления об авторских правах или лицензиях, которые появляются при использовании
Программного обеспечения или на нем.
3.3.2. Модификация. Пользователю запрещается модифицировать, изменять, декомпилировать,
расшифровывать, дизассемблировать, переводить или реверсировать, перепроектировать
Программное обеспечение.
3.3.3. Распространение. Пользователю запрещается сублицензировать, передавать право использования
ПО или иным образом распространять или предоставлять Программное обеспечение любой третьей стороне.
3.3.4. SaaS. За исключением случаев, когда это разрешено Правообладателем, Пользователю запрещено
использовать Программное обеспечение в коммерческих целях для оказания услуг третьим лицам.
4. ОТВЕТСТВЕННОСТЬ ПРАВООБЛАДАТЕЛЯ ПРИ НАРУШЕНИИ ПОЛЬЗОВАТЕЛЕМ ПРАВ «ИС»
4.1. Правообладатель не несет никаких обязательств в отношении каких-либо претензий к Пользователю
на предмет нарушения последним прав Интеллектуальной собственности, возникших в связи с
использованием Пользователем:
4.1.1. Любых компонентов программного обеспечения с открытым исходным кодом, включенных в
Программное обеспечение;
4.1.2. Любого нарушения правил использования Программного обеспечения, установленного условиями
настоящего соглашения;
4.1.3. Любого использования Программного обеспечения в сочетании с другими ПО, оборудованием,
или данными, не предоставленными Пользователю Правообладателем;
4.1.4. Любого изменения Программного обеспечения любым третьим лицом, а не Правообладателем.
5. НАСТОЯЩИМ ПРАВООБЛАДАТЕЛЬ ЗАЯВЛЯЕТ, ЧТО ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ ПРЕДОСТАВЛЯЕТСЯ ПОЛЬЗОВАТЕЛЮ
ПО ПРИНЦИПУ «AS IS» - «КАК ЕСТЬ». НИ ПРИ КАКИХ ОБСТОЯТЕЛЬСТВАХ ПРАВООБЛАДАТЕЛЬ НЕ ГАРАНТИРУЕТ
И НЕ ОБЕЩАЕТ, ЧТО ПРЕДОСТАВЛЕННОЕ ИМ ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ БУДЕТ ПОДХОДИТЬ ИЛИ НЕ ПОДХОДИТЬ
ДЛЯ КОНКРЕТНЫХ ЦЕЛЕЙ ПОЛЬЗОВАТЕЛЯ, ЧТО ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ БУДЕТ ОТВЕЧАТЬ ВСЕМ КОММЕРЧЕСКИМ
И ЛИЧНЫМ СУБЪЕКТИВНЫМ ОЖИДАНИЯМ ПОЛЬЗОВАТЕЛЯ, ЧТО ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ БУДЕТ РАБОТАТЬ
ИСПРАВНО, БЕЗ ТЕХНИЧЕСКИХ ОШИБОК, БЫСТРО И БЕСПЕРЕБОЙНО.
6. ОГРАНИЧЕНИЕ ОТВЕТСТВЕННОСТИ.
НИ ПРИ КАКИХ ОБСТОЯТЕЛЬСТВАХ ПРАВООБЛАДАТЕЛЬ ИЛИ ЕГО АФФИЛЛИРОВАННЫЕ ЛИЦА НЕ НЕСУТ ПЕРЕД ПОЛЬЗОВАТЕЛЕМ
ОТВЕТСТВЕННОСТИ ЗА ЛЮБЫЕ ПРЯМЫЕ ИЛИ КОСВЕННЫЕ УБЫТКИ ПОЛЬЗОВАТЕЛЯ, ЕГО РАСХОДЫ ИЛИ РЕАЛЬНЫЙ УЩЕРБ,
ВКЛЮЧАЯ, ПОМИМО ПРОЧЕГО, ПРОСТОИ; УТРАТУ БИЗНЕСА; УПУЩЕННУЮ ВЫГОДУ; НЕДОПОЛУЧЕННУЮ ПРИБЫЛЬ;
ПОТЕРЮ ИЛИ ПОВРЕЖДЕНИЕ ДАННЫХ, ИМУЩЕСТВА И ИНОЕ.
ОГРАНИЧЕНИЯ ПРИМЕНЯЮТСЯ НЕЗАВИСИМО ОТ ОСНОВАНИЯ НАСТУПЛЕНИЯ ОТВЕТСТВЕННОСТИ; В ТОМ ЧИСЛЕ ВСЛЕДСТВИЕ
ДЕЙСТВИЯ ИЛИ БЕЗДЕЙСТВИЯ, НЕБРЕЖНОСТИ, УМЫСЛА, ПРЯМОГО ИЛИ КОСВЕННОГО; НЕОСТОРОЖНОСТИ; ЗАБЛУЖДЕНИЯ;
КЛЕВЕТЫ; НАРУШЕНИЯ КОНФИДЕНЦИАЛЬНОСТИ ИЛИ ПРАВА ИНТЕЛЛЕКТУАЛЬНОЙ СОБСТВЕННОСТИ; ИЛИ ЛЮБОЕ ДРУГОЕ
ОСНОВАНИЕ НАСТУПЛЕНИЯ ОТВЕТСТВЕННОСТИ.
7. ОБЯЗАННОСТЬ ПОЛЬЗОВАТЕЛЯ:
Не осуществлять самостоятельно и (или) с привлечением третьих лиц нижеследующие действия
(включая, но не ограничиваясь) по:
-дизассемблированию и (или) декомпилированию (преобразованию объектного кода в исходный код)
Программного обеспечения;
-модификации Программного обеспечения, в том числе вносить изменения в объектный код, исходный
код Программного обеспечения, за исключением тех изменений, которые вносятся средствами,
включёнными в Программное обеспечение и описанными непосредственно в документации к нему;
-созданию условий для использования Программного обеспечения лицами, не имеющими прав на
использование данного Программного обеспечения, включая (но не ограничиваясь) вмешательство
третьих лиц в функционирование Программного обеспечения, предоставление третьим лицам доступа
к исследованию и (или) замене настроек Программного обеспечения, включая его первичную установку;
-распространению Программного обеспечения в целом или в части (включая приложенную к нему документацию).
8. БИБЛИОТЕКА ПО. ИСПОЛЬЗУЕМЫЕ ПРОГРАММНЫЕ СРЕДСТВА.
8.1. Настоящим, Правообладатель заверяет, что Библиотека программного обеспечения состоит из
лицензионных продуктов, используемых на законных основаниях, а
именно https://entaxy.ru/libs/licenses/root-aggregated.deps.
8.2. Любые программные средства, применяемые Пользователем при работе с ПО, должны быть
совместимы с библиотекой ПО, указанной в п.8.1. настоящего соглашения.
8.3. Перечень внешних модулей ПО, указанный в п.8.1 настоящего соглашения, может изменяться
Правообладателем в одностороннем порядке, в зависимости от выпуска релизов программного обеспечения,
содержащих все изменения и дополнения программного обеспечения.
9. ВНЕСЕНИЕ ИЗМЕНЕНИЙ В ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ.
9.1. Программное обеспечение, интеграционная шина «ЭНТАКСИ» (ENTAXY) является свободно распространяемым
программным обеспечением.
9.2. Пользователь имеет право вносить изменения в исходный код программного обеспечения исключительно
с согласия Правообладателя в порядке предложения изменений/правок/дополнений через механизм
«Pull Requests» в открытом репозитории Правообладателя по адресу: https://git.entaxy.ru/entaxy/entaxy-public.
9.3. Любые изменения программного обеспечения, осуществляемые Пользователем без соблюдения условий
пункта 9.2. настоящего документа, являются нарушением авторских и смежных прав Правообладателя,
прав интеллектуальной собственности Правообладателя и влекут применение к Пользователю мер
ответственности в соответствии с условиями настоящей Лицензии, а также применимого законодательства
Российской Федерации.
10. ЗАКЛЮЧИТЕЛЬНЫЕ ПОЛОЖЕНИЯ.
10.1. В случае нарушения Пользователем любого из условий настоящей Лицензии, Правообладатель имеет
право взыскать с Пользователя любые причинённые таким нарушением убытки, реальный ущерб,
недополученную прибыль, упущенную выгоду, а также в случае нарушения Пользователем условий
пункта 9.2 настоящего соглашения, в том числе, взыскать с Пользователя штраф в размере
2 000 000 (Два миллиона) рублей за каждый установленный случай несанкционированного изменения
исходного или объектного кода Программного обеспечения «Энтакси» (Entaxy).
10.2. В рамках исполнения Пользователем обязательств по настоящей Лицензии, применимое
законодательство Российской Федерации.
10.3. Если какое-либо положение настоящей Лицензии будет признано судом недействительным,
остальные положения будут продолжать своё действие, а Пользователь будет обязан продолжать
исполнять свои обязанности в соответствии с этими положениями.

View File

@ -0,0 +1,175 @@
ЛИЦЕНЗИЯ ОГРАНИЧЕННОГО ПРИМЕНЕНИЯ
Настоящий документ устанавливает для Пользователя условия применения Базовой (некоммерческой)
версии лицензии для пробного использования программного обеспечения ENTAXY, принадлежащего
Правообладателю Обществу с ограниченной ответственностью "ЕМДЕВ" (ОГРН 1057810026658, ИНН
7813313860, юридический адрес: 197022, Россия, г. Санкт-Петербург, ул. Профессора Попова,
д. 23, литера В, помещение 3Н), расположенной в сети Интернет по адресу
https://www.emdev.ru/about (далее - Компания).
Используя или получая доступ к Программному обеспечению, или нажав «Я согласен с Условиями»
(или аналогичную кнопку или флажок) после загрузки или установки Программного обеспечения,
Пользователь выражает свое согласие на обязательность условий и ограничений, изложенных в
настоящем документе, в противном случае, он должен не использовать или не получать доступ
к Программному обеспечению.
1. ТЕРМИНЫ И ОПРЕДЕЛЕНИЯ
a) ПО Программное обеспечение, интеграционная шина «ЭНТАКСИ» (ENTAXY) в любой ее версии
или редакции, исключительные права на которую принадлежат Правообладателю.
b) Правообладатель (Компания) ООО «ЕМДЕВ», ОГРН 1057810026658, ИНН 7813313860, исключительные
права которого подтверждаются Свидетельством о государственной регистрации в Реестре программ
для ЭВМ № 2021610848 от 19.01.2021 года.
c) Пользователь юридическое или физическое лицо, получившее через скачивание с сайта
https://entaxy.ru или иным образом, дистрибутив ПО, пользующееся ПО.
d) ИС интеллектуальная собственность закреплённое законом исключительное право, а также
личные неимущественные права авторов произведений на результат интеллектуальной деятельности.
e) Подписка это коммерческое предложение Правообладателя, состоящее из Лицензии на использование
ПО и доступа к технической поддержке программного обеспечения на срок Подписки. Подписка
включает предоставление Пользователю неисключительного права использования ПО, в том числе
получение обновлений функционала ПО и безопасности ПО, исправление ошибок ПО и получение
патчей с обновлениями и исправлениями программного обеспечения. Подписка приобретается
Пользователем на период времени, указанный в Сертификате. Количество подписок устанавливается
для каждого Пользователя индивидуально в Сертификате.
f) Сертификат документ, выдаваемый Дистрибъютором или Авторизованным партнёром (Партнёром),
подтверждающий факт приобретения физическим или юридическим лицом Подписки на программное
обеспечение в ограниченном объёме и на определённый период времени.
g) Лицензия (простая (неисключительная) совокупность ограниченных прав использования ПО,
предоставленных Пользователю согласно условиям Подписки.
h) Библиотека совокупность подпрограмм и объектов, используемых для разработки программного
обеспечения.
i) Исходный код текст компьютерной программы на каком-либо языке программирования, состоящий
из одного или нескольких файлов, который может быть прочтён человеком.
j) Объектный код файл (часть машинного кода) с промежуточным представлением отдельного модуля
программы, полученный в результате обработки исходного кода, еще не связанный в полную программу.
Это машинный код для одной конкретной библиотеки или модуля, который будет составлять готовый
продукт.
k) Некоммерческое использование индивидуальное личное использование Пользователем программного
обеспечения с целью обучения работе с Программным обеспечением, для оценки или демонстрации
возможностей Программного обеспечения, при котором, Пользователем не извлекается коммерческая
выгода и/или не идёт в доход денежное вознаграждение при использовании Программного обеспечения.
2. ДОПУСТИМЫЕ СПОСОБЫ ИСПОЛЬЗОВАНИЯ ПРОГРАММНОГО ОБЕСПЕЧЕНИЯ
2.1. Правообладатель предоставляет Пользователю ограниченное право использования Программного
обеспечения на условиях простой (неисключительной) лицензии в объёме, ограниченном правом
воспроизведения полной рабочей версии программного обеспечения, новых версий программного обеспечения
в памяти оборудования и его запуска на оборудовании в соответствии со ст. 1280 ГК РФ.
2.2. Право на использование Программного обеспечения, предоставляемое Пользователю, носит
неисключительный характер.
2.3. Пользователю предоставляется всемирная, неисключительная, не подлежащая сублицензированию,
лицензия на ограниченное использование Программного обеспечения.
2.4. Пользователь, имеющий Базовую (некоммерческую) версию лицензии для пробного использования
имеет право приобрести Подписку на программное обеспечение. В этом случае Пользователь обязан
обратиться в службу поддержки Правообладателя по адресу: https://entaxy.ru/ для изменения
вида лицензии с Базовой бесплатной версии на Подписки.
2.5. Срок использования скачанной Пользователем базовой (некоммерческой) версии лицензии для
пробного использования программного обеспечения не ограничен.
2.6. Использование Пользователем настоящего программного обеспечения в целях разработки,
модификации, обновления другого ПО, принадлежащего третьим лицам, а не Правообладателю,
без разрешения Правообладателя не допускается.
3. АВТОРСКОЕ ПРАВО.
3.1. Все авторские права, все права интеллектуальной собственности на Программное обеспечение
и любые его копии принадлежат Правообладателю.
3.2. Все авторские права, все права интеллектуальной собственности в отношении любого контента,
к которому можно получить доступ с помощью Программного обеспечения, является собственностью
соответствующего владельца контента и защищается применимым законодательством об авторском
праве или другими законами и договорами об интеллектуальной собственности.
3.3. Условия использования Программного обеспечения.
Лицензия, предоставленная Пользователю, действительна только в том случае, если Пользователь
придерживается следующих условий:
3.3.1. Принятие уведомлений об авторских правах. Пользователю запрещается удалять или изменять
какие-либо уведомления об авторских правах или лицензиях, которые появляются при использовании
Программного обеспечения или на нем.
3.3.2. Модификация. Пользователю запрещается модифицировать, изменять, декомпилировать,
расшифровывать, дизассемблировать, переводить или реверсировать, перепроектировать
Программное обеспечение.
3.3.3. Распространение. Пользователю запрещается сублицензировать, передавать право использования
ПО или иным образом распространять или предоставлять Программное обеспечение любой третьей стороне.
3.3.4. SaaS. За исключением случаев, когда это разрешено Правообладателем, Пользователю запрещено
использовать Программное обеспечение в коммерческих целях для оказания услуг третьим лицам.
4. ОТВЕТСТВЕННОСТЬ ПРАВООБЛАДАТЕЛЯ ПРИ НАРУШЕНИИ ПОЛЬЗОВАТЕЛЕМ ПРАВ «ИС»
4.1. Правообладатель не несет никаких обязательств в отношении каких-либо претензий к Пользователю
на предмет нарушения последним прав Интеллектуальной собственности, возникших в связи с
использованием Пользователем:
4.1.1. Любых компонентов программного обеспечения с открытым исходным кодом, включенных в
Программное обеспечение;
4.1.2. Любого нарушения правил использования Программного обеспечения, установленного условиями
настоящего соглашения;
4.1.3. Любого использования Программного обеспечения в сочетании с другими ПО, оборудованием,
или данными, не предоставленными Пользователю Правообладателем;
4.1.4. Любого изменения Программного обеспечения любым третьим лицом, а не Правообладателем.
5. НАСТОЯЩИМ ПРАВООБЛАДАТЕЛЬ ЗАЯВЛЯЕТ, ЧТО ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ ПРЕДОСТАВЛЯЕТСЯ ПОЛЬЗОВАТЕЛЮ
ПО ПРИНЦИПУ «AS IS» - «КАК ЕСТЬ». НИ ПРИ КАКИХ ОБСТОЯТЕЛЬСТВАХ ПРАВООБЛАДАТЕЛЬ НЕ ГАРАНТИРУЕТ
И НЕ ОБЕЩАЕТ, ЧТО ПРЕДОСТАВЛЕННОЕ ИМ ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ БУДЕТ ПОДХОДИТЬ ИЛИ НЕ ПОДХОДИТЬ
ДЛЯ КОНКРЕТНЫХ ЦЕЛЕЙ ПОЛЬЗОВАТЕЛЯ, ЧТО ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ БУДЕТ ОТВЕЧАТЬ ВСЕМ КОММЕРЧЕСКИМ
И ЛИЧНЫМ СУБЪЕКТИВНЫМ ОЖИДАНИЯМ ПОЛЬЗОВАТЕЛЯ, ЧТО ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ БУДЕТ РАБОТАТЬ
ИСПРАВНО, БЕЗ ТЕХНИЧЕСКИХ ОШИБОК, БЫСТРО И БЕСПЕРЕБОЙНО.
6. ОГРАНИЧЕНИЕ ОТВЕТСТВЕННОСТИ.
НИ ПРИ КАКИХ ОБСТОЯТЕЛЬСТВАХ ПРАВООБЛАДАТЕЛЬ ИЛИ ЕГО АФФИЛЛИРОВАННЫЕ ЛИЦА НЕ НЕСУТ ПЕРЕД ПОЛЬЗОВАТЕЛЕМ
ОТВЕТСТВЕННОСТИ ЗА ЛЮБЫЕ ПРЯМЫЕ ИЛИ КОСВЕННЫЕ УБЫТКИ ПОЛЬЗОВАТЕЛЯ, ЕГО РАСХОДЫ ИЛИ РЕАЛЬНЫЙ УЩЕРБ,
ВКЛЮЧАЯ, ПОМИМО ПРОЧЕГО, ПРОСТОИ; УТРАТУ БИЗНЕСА; УПУЩЕННУЮ ВЫГОДУ; НЕДОПОЛУЧЕННУЮ ПРИБЫЛЬ;
ПОТЕРЮ ИЛИ ПОВРЕЖДЕНИЕ ДАННЫХ, ИМУЩЕСТВА И ИНОЕ.
ОГРАНИЧЕНИЯ ПРИМЕНЯЮТСЯ НЕЗАВИСИМО ОТ ОСНОВАНИЯ НАСТУПЛЕНИЯ ОТВЕТСТВЕННОСТИ; В ТОМ ЧИСЛЕ ВСЛЕДСТВИЕ
ДЕЙСТВИЯ ИЛИ БЕЗДЕЙСТВИЯ, НЕБРЕЖНОСТИ, УМЫСЛА, ПРЯМОГО ИЛИ КОСВЕННОГО; НЕОСТОРОЖНОСТИ; ЗАБЛУЖДЕНИЯ;
КЛЕВЕТЫ; НАРУШЕНИЯ КОНФИДЕНЦИАЛЬНОСТИ ИЛИ ПРАВА ИНТЕЛЛЕКТУАЛЬНОЙ СОБСТВЕННОСТИ; ИЛИ ЛЮБОЕ ДРУГОЕ
ОСНОВАНИЕ НАСТУПЛЕНИЯ ОТВЕТСТВЕННОСТИ.
7. ОБЯЗАННОСТЬ ПОЛЬЗОВАТЕЛЯ:
Не осуществлять самостоятельно и (или) с привлечением третьих лиц нижеследующие действия
(включая, но не ограничиваясь) по:
-дизассемблированию и (или) декомпилированию (преобразованию объектного кода в исходный код)
Программного обеспечения;
-модификации Программного обеспечения, в том числе вносить изменения в объектный код, исходный
код Программного обеспечения, за исключением тех изменений, которые вносятся средствами,
включёнными в Программное обеспечение и описанными непосредственно в документации к нему;
-созданию условий для использования Программного обеспечения лицами, не имеющими прав на
использование данного Программного обеспечения, включая (но не ограничиваясь) вмешательство
третьих лиц в функционирование Программного обеспечения, предоставление третьим лицам доступа
к исследованию и (или) замене настроек Программного обеспечения, включая его первичную установку;
-распространению Программного обеспечения в целом или в части (включая приложенную к нему документацию).
8. БИБЛИОТЕКА ПО. ИСПОЛЬЗУЕМЫЕ ПРОГРАММНЫЕ СРЕДСТВА.
8.1. Настоящим, Правообладатель заверяет, что Библиотека программного обеспечения состоит из
лицензионных продуктов, используемых на законных основаниях, а
именно https://entaxy.ru/libs/licenses/root-aggregated.deps.
8.2. Любые программные средства, применяемые Пользователем при работе с ПО, должны быть
совместимы с библиотекой ПО, указанной в п.8.1. настоящего соглашения.
8.3. Перечень внешних модулей ПО, указанный в п.8.1 настоящего соглашения, может изменяться
Правообладателем в одностороннем порядке, в зависимости от выпуска релизов программного обеспечения,
содержащих все изменения и дополнения программного обеспечения.
9. ВНЕСЕНИЕ ИЗМЕНЕНИЙ В ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ.
9.1. Программное обеспечение, интеграционная шина «ЭНТАКСИ» (ENTAXY) является свободно распространяемым
программным обеспечением.
9.2. Пользователь имеет право вносить изменения в исходный код программного обеспечения исключительно
с согласия Правообладателя в порядке предложения изменений/правок/дополнений через механизм
«Pull Requests» в открытом репозитории Правообладателя по адресу: https://git.entaxy.ru/entaxy/entaxy-public.
9.3. Любые изменения программного обеспечения, осуществляемые Пользователем без соблюдения условий
пункта 9.2. настоящего документа, являются нарушением авторских и смежных прав Правообладателя,
прав интеллектуальной собственности Правообладателя и влекут применение к Пользователю мер
ответственности в соответствии с условиями настоящей Лицензии, а также применимого законодательства
Российской Федерации.
10. ЗАКЛЮЧИТЕЛЬНЫЕ ПОЛОЖЕНИЯ.
10.1. В случае нарушения Пользователем любого из условий настоящей Лицензии, Правообладатель имеет
право взыскать с Пользователя любые причинённые таким нарушением убытки, реальный ущерб,
недополученную прибыль, упущенную выгоду, а также в случае нарушения Пользователем условий
пункта 9.2 настоящего соглашения, в том числе, взыскать с Пользователя штраф в размере
2 000 000 (Два миллиона) рублей за каждый установленный случай несанкционированного изменения
исходного или объектного кода Программного обеспечения «Энтакси» (Entaxy).
10.2. В рамках исполнения Пользователем обязательств по настоящей Лицензии, применимое
законодательство Российской Федерации.
10.3. Если какое-либо положение настоящей Лицензии будет признано судом недействительным,
остальные положения будут продолжать своё действие, а Пользователь будет обязан продолжать
исполнять свои обязанности в соответствии с этими положениями.

View File

@ -0,0 +1,96 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ru.entaxy.platform.security</groupId>
<artifactId>jaas</artifactId>
<version>1.10.0</version>
</parent>
<groupId>ru.entaxy.platform.security.jaas</groupId>
<artifactId>entaxy-legacy-auth-api</artifactId>
<packaging>bundle</packaging>
<name>ENTAXY :: SECURITY :: JAAS :: LEGACY :: API</name>
<description>ENTAXY :: SECURITY :: JAAS :: LEGACY :: API</description>
<properties>
<bundle.osgi.export.pkg>
ru.entaxy.esb.system.auth.basic.jpa.api,
ru.entaxy.esb.system.auth.basic.jpa.api.entity,
ru.entaxy.esb.system.auth.basic.jpa.api.entity.field,
ru.entaxy.esb.system.auth.basic.jpa.api.exception
</bundle.osgi.export.pkg>
<bundle.osgi.import.pkg>
javax.persistence;version="[2,3)",
org.hibernate.proxy;version="[5,6)",
javassist.util.proxy,
*
</bundle.osgi.import.pkg>
</properties>
<dependencies>
<dependency>
<groupId>ru.entaxy.esb.platform.runtime.base</groupId>
<artifactId>base-support</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.registry.systems</groupId>
<artifactId>system-api</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<!-- dependency>
<groupId>ru.entaxy.esb.system.core.permission</groupId>
<artifactId>permission-api</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.core.permission</groupId>
<artifactId>permission-common</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency -->
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>${commons-codec.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-cxf</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.karaf</groupId>
<artifactId>camel-cxf-blueprint</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>javax.persistence</artifactId>
<version>${jpa.version}</version>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>javax.transaction-api</artifactId>
<version>${javax.transaction.version}</version>
</dependency>
<dependency>
<groupId>javax.interceptor</groupId>
<artifactId>javax.interceptor-api</artifactId>
<version>${javax.interceptor.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,59 @@
/*-
* ~~~~~~licensing~~~~~~
* basic-auth-api
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.esb.system.auth.basic.jpa.api;
import ru.entaxy.esb.system.auth.basic.jpa.api.entity.BasicAuthAccount;
import ru.entaxy.esb.system.auth.basic.jpa.api.exception.BadPasswordException;
import java.security.NoSuchAlgorithmException;
import java.util.List;
import java.util.Optional;
public interface BasicAuthService {
List<BasicAuthAccount> list();
Optional<BasicAuthAccount> get(String login);
Optional<BasicAuthAccount> getBySystem(String systemUuid);
Optional<BasicAuthAccount> getByAuthorizationHeaderHash(String authorizationHeaderHash);
BasicAuthAccount save(BasicAuthAccount basicAuthAccount, boolean isExist);
public BasicAuthAccount saveFull(String login, String passwordHash, String encryptionAlgorithm, String systemUUID,
String authorizationHeaderHash, String description, String createdBy, String editedBy);
BasicAuthAccount saveCommon(String login, String passwordHash, String systemUUID, String createdBy, String editedBy)
throws NoSuchAlgorithmException, BadPasswordException;
BasicAuthAccount saveShort(String login, String passwordHash, String createdBy, String editedBy) throws NoSuchAlgorithmException, BadPasswordException;
void remove(String login);
boolean check(String login, String password);
}

View File

@ -0,0 +1,191 @@
/*-
* ~~~~~~licensing~~~~~~
* basic-auth-api
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.esb.system.auth.basic.jpa.api.entity;
import com.sun.istack.NotNull;
import ru.entaxy.esb.system.auth.basic.jpa.api.entity.field.EncryptionAlgorithm;
import ru.entaxy.esb.system.auth.basic.jpa.api.entity.field.EncryptionAlgorithmAttributeConverter;
import javax.persistence.*;
import java.util.Date;
import java.util.Objects;
@Entity
@Table(name = "basic_auth_account")
public class BasicAuthAccount {
@Id
@Column(name = "id")
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
@NotNull
@Column(name = "login")
private String login;
@NotNull
@Column(name = "password_hash")
private String passwordHash;
@Column(name = "encryption_algorithm")
@Convert(converter = EncryptionAlgorithmAttributeConverter.class)
private EncryptionAlgorithm encryptionAlgorithm;
@Column(name = "system_uuid")
private String systemUUID;
@NotNull
@Column(name = "authorization_header_hash")
private String authorizationHeaderHash;
@Column(name = "description")
private String description;
@NotNull
@Column(name = "create_date")
private Date createDate;
@Column(name = "edit_date")
private Date editDate;
@NotNull
@Column(name = "created_by")
private String createdBy;
@Column(name = "edited_by")
private String editedBy;
public Long getId() {
return id;
}
public void setId(Long id) {
this.id = id;
}
public String getLogin() {
return login;
}
public void setLogin(String login) {
this.login = login;
}
public String getPasswordHash() {
return passwordHash;
}
public void setPasswordHash(String passwordHash) {
this.passwordHash = passwordHash;
}
public EncryptionAlgorithm getEncryptionAlgorithm() {
return encryptionAlgorithm;
}
public void setEncryptionAlgorithm(EncryptionAlgorithm encryptionAlgorithm) {
this.encryptionAlgorithm = encryptionAlgorithm;
}
public String getSystemUUID() {
return systemUUID;
}
public void setSystemUUID(String systemUUID) {
this.systemUUID = systemUUID;
}
public String getAuthorizationHeaderHash() {
return authorizationHeaderHash;
}
public void setAuthorizationHeaderHash(String authorizationHeaderHash) {
this.authorizationHeaderHash = authorizationHeaderHash;
}
public String getDescription() {
return description;
}
public void setDescription(String description) {
this.description = description;
}
public Date getCreateDate() {
return createDate;
}
public void setCreateDate(Date createDate) {
this.createDate = createDate;
}
public Date getEditDate() {
return editDate;
}
public void setEditDate(Date editDate) {
this.editDate = editDate;
}
public String getCreatedBy() {
return createdBy;
}
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
public String getEditedBy() {
return editedBy;
}
public void setEditedBy(String editedBy) {
this.editedBy = editedBy;
}
@Override
public int hashCode() {
return Objects.hash(authorizationHeaderHash, createDate, createdBy, description, editDate, editedBy,
encryptionAlgorithm, login, passwordHash, systemUUID);
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
BasicAuthAccount other = (BasicAuthAccount) obj;
return Objects.equals(authorizationHeaderHash, other.authorizationHeaderHash)
&& Objects.equals(createDate, other.createDate) && Objects.equals(createdBy, other.createdBy)
&& Objects.equals(description, other.description) && Objects.equals(editDate, other.editDate)
&& Objects.equals(editedBy, other.editedBy)
&& Objects.equals(encryptionAlgorithm, other.encryptionAlgorithm) && Objects.equals(login, other.login)
&& Objects.equals(passwordHash, other.passwordHash)
&& Objects.equals(systemUUID, other.systemUUID);
}
@Override
public String toString() {
return "BasicAuthAccount [login=" + login + ", passwordHash=" + passwordHash + ", encryptionAlgorithm="
+ encryptionAlgorithm + ", systemUUID=" + systemUUID + ", authorizationHeaderHash=" + authorizationHeaderHash
+ ", description=" + description + ", createDate=" + createDate + ", editDate=" + editDate
+ ", createdBy=" + createdBy + ", editedBy=" + editedBy + "]";
}
}

View File

@ -0,0 +1,65 @@
/*-
* ~~~~~~licensing~~~~~~
* basic-auth-api
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.esb.system.auth.basic.jpa.api.entity.field;
import java.util.Arrays;
import java.util.Map;
import java.util.function.Function;
import java.util.stream.Collectors;
public enum EncryptionAlgorithm {
PLAIN("PLAIN"),
MD5("MD5"),
SHA1("SHA-1"),
SHA256("SHA-256"),
SHA384("SHA-384"),
SHA512("SHA-512");
private static Map<String, EncryptionAlgorithm> map = null;
private final String name;
EncryptionAlgorithm(String name) {
this.name = name;
}
public String getAlgorithmName() {
return name;
}
public boolean equalsName(String checkingName) {
return checkingName != null && this.name.equals(checkingName.toUpperCase());
}
public static EncryptionAlgorithm getByName(String name) {
return map.get(name.toUpperCase());
}
static {
map = Arrays.stream(EncryptionAlgorithm.values())
.collect(Collectors.toMap(EncryptionAlgorithm::getAlgorithmName, Function.identity()));
}
}

View File

@ -0,0 +1,44 @@
/*-
* ~~~~~~licensing~~~~~~
* basic-auth-api
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.esb.system.auth.basic.jpa.api.entity.field;
import javax.persistence.AttributeConverter;
import javax.persistence.Converter;
@Converter
public class EncryptionAlgorithmAttributeConverter implements AttributeConverter<EncryptionAlgorithm, String> {
@Override
public String convertToDatabaseColumn(EncryptionAlgorithm attribute) {
return attribute.getAlgorithmName();
}
@Override
public EncryptionAlgorithm convertToEntityAttribute(String dbData) {
return EncryptionAlgorithm.getByName(dbData.toUpperCase());
}
}

View File

@ -0,0 +1,52 @@
/*-
* ~~~~~~licensing~~~~~~
* basic-auth-api
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.esb.system.auth.basic.jpa.api.exception;
public class BadPasswordException extends Exception {
private static final long serialVersionUID = -1675249900871877617L;
public BadPasswordException() {
}
public BadPasswordException(String message) {
super(message);
}
public BadPasswordException(Throwable cause) {
super(cause);
}
public BadPasswordException(String message, Throwable cause) {
super(message, cause);
}
public BadPasswordException(String message, Throwable cause, boolean enableSuppression,
boolean writableStackTrace) {
super(message, cause, enableSuppression, writableStackTrace);
}
}

View File

@ -0,0 +1,175 @@
ЛИЦЕНЗИЯ ОГРАНИЧЕННОГО ПРИМЕНЕНИЯ
Настоящий документ устанавливает для Пользователя условия применения Базовой (некоммерческой)
версии лицензии для пробного использования программного обеспечения ENTAXY, принадлежащего
Правообладателю Обществу с ограниченной ответственностью "ЕМДЕВ" (ОГРН 1057810026658, ИНН
7813313860, юридический адрес: 197022, Россия, г. Санкт-Петербург, ул. Профессора Попова,
д. 23, литера В, помещение 3Н), расположенной в сети Интернет по адресу
https://www.emdev.ru/about (далее - Компания).
Используя или получая доступ к Программному обеспечению, или нажав «Я согласен с Условиями»
(или аналогичную кнопку или флажок) после загрузки или установки Программного обеспечения,
Пользователь выражает свое согласие на обязательность условий и ограничений, изложенных в
настоящем документе, в противном случае, он должен не использовать или не получать доступ
к Программному обеспечению.
1. ТЕРМИНЫ И ОПРЕДЕЛЕНИЯ
a) ПО Программное обеспечение, интеграционная шина «ЭНТАКСИ» (ENTAXY) в любой ее версии
или редакции, исключительные права на которую принадлежат Правообладателю.
b) Правообладатель (Компания) ООО «ЕМДЕВ», ОГРН 1057810026658, ИНН 7813313860, исключительные
права которого подтверждаются Свидетельством о государственной регистрации в Реестре программ
для ЭВМ № 2021610848 от 19.01.2021 года.
c) Пользователь юридическое или физическое лицо, получившее через скачивание с сайта
https://entaxy.ru или иным образом, дистрибутив ПО, пользующееся ПО.
d) ИС интеллектуальная собственность закреплённое законом исключительное право, а также
личные неимущественные права авторов произведений на результат интеллектуальной деятельности.
e) Подписка это коммерческое предложение Правообладателя, состоящее из Лицензии на использование
ПО и доступа к технической поддержке программного обеспечения на срок Подписки. Подписка
включает предоставление Пользователю неисключительного права использования ПО, в том числе
получение обновлений функционала ПО и безопасности ПО, исправление ошибок ПО и получение
патчей с обновлениями и исправлениями программного обеспечения. Подписка приобретается
Пользователем на период времени, указанный в Сертификате. Количество подписок устанавливается
для каждого Пользователя индивидуально в Сертификате.
f) Сертификат документ, выдаваемый Дистрибъютором или Авторизованным партнёром (Партнёром),
подтверждающий факт приобретения физическим или юридическим лицом Подписки на программное
обеспечение в ограниченном объёме и на определённый период времени.
g) Лицензия (простая (неисключительная) совокупность ограниченных прав использования ПО,
предоставленных Пользователю согласно условиям Подписки.
h) Библиотека совокупность подпрограмм и объектов, используемых для разработки программного
обеспечения.
i) Исходный код текст компьютерной программы на каком-либо языке программирования, состоящий
из одного или нескольких файлов, который может быть прочтён человеком.
j) Объектный код файл (часть машинного кода) с промежуточным представлением отдельного модуля
программы, полученный в результате обработки исходного кода, еще не связанный в полную программу.
Это машинный код для одной конкретной библиотеки или модуля, который будет составлять готовый
продукт.
k) Некоммерческое использование индивидуальное личное использование Пользователем программного
обеспечения с целью обучения работе с Программным обеспечением, для оценки или демонстрации
возможностей Программного обеспечения, при котором, Пользователем не извлекается коммерческая
выгода и/или не идёт в доход денежное вознаграждение при использовании Программного обеспечения.
2. ДОПУСТИМЫЕ СПОСОБЫ ИСПОЛЬЗОВАНИЯ ПРОГРАММНОГО ОБЕСПЕЧЕНИЯ
2.1. Правообладатель предоставляет Пользователю ограниченное право использования Программного
обеспечения на условиях простой (неисключительной) лицензии в объёме, ограниченном правом
воспроизведения полной рабочей версии программного обеспечения, новых версий программного обеспечения
в памяти оборудования и его запуска на оборудовании в соответствии со ст. 1280 ГК РФ.
2.2. Право на использование Программного обеспечения, предоставляемое Пользователю, носит
неисключительный характер.
2.3. Пользователю предоставляется всемирная, неисключительная, не подлежащая сублицензированию,
лицензия на ограниченное использование Программного обеспечения.
2.4. Пользователь, имеющий Базовую (некоммерческую) версию лицензии для пробного использования
имеет право приобрести Подписку на программное обеспечение. В этом случае Пользователь обязан
обратиться в службу поддержки Правообладателя по адресу: https://entaxy.ru/ для изменения
вида лицензии с Базовой бесплатной версии на Подписки.
2.5. Срок использования скачанной Пользователем базовой (некоммерческой) версии лицензии для
пробного использования программного обеспечения не ограничен.
2.6. Использование Пользователем настоящего программного обеспечения в целях разработки,
модификации, обновления другого ПО, принадлежащего третьим лицам, а не Правообладателю,
без разрешения Правообладателя не допускается.
3. АВТОРСКОЕ ПРАВО.
3.1. Все авторские права, все права интеллектуальной собственности на Программное обеспечение
и любые его копии принадлежат Правообладателю.
3.2. Все авторские права, все права интеллектуальной собственности в отношении любого контента,
к которому можно получить доступ с помощью Программного обеспечения, является собственностью
соответствующего владельца контента и защищается применимым законодательством об авторском
праве или другими законами и договорами об интеллектуальной собственности.
3.3. Условия использования Программного обеспечения.
Лицензия, предоставленная Пользователю, действительна только в том случае, если Пользователь
придерживается следующих условий:
3.3.1. Принятие уведомлений об авторских правах. Пользователю запрещается удалять или изменять
какие-либо уведомления об авторских правах или лицензиях, которые появляются при использовании
Программного обеспечения или на нем.
3.3.2. Модификация. Пользователю запрещается модифицировать, изменять, декомпилировать,
расшифровывать, дизассемблировать, переводить или реверсировать, перепроектировать
Программное обеспечение.
3.3.3. Распространение. Пользователю запрещается сублицензировать, передавать право использования
ПО или иным образом распространять или предоставлять Программное обеспечение любой третьей стороне.
3.3.4. SaaS. За исключением случаев, когда это разрешено Правообладателем, Пользователю запрещено
использовать Программное обеспечение в коммерческих целях для оказания услуг третьим лицам.
4. ОТВЕТСТВЕННОСТЬ ПРАВООБЛАДАТЕЛЯ ПРИ НАРУШЕНИИ ПОЛЬЗОВАТЕЛЕМ ПРАВ «ИС»
4.1. Правообладатель не несет никаких обязательств в отношении каких-либо претензий к Пользователю
на предмет нарушения последним прав Интеллектуальной собственности, возникших в связи с
использованием Пользователем:
4.1.1. Любых компонентов программного обеспечения с открытым исходным кодом, включенных в
Программное обеспечение;
4.1.2. Любого нарушения правил использования Программного обеспечения, установленного условиями
настоящего соглашения;
4.1.3. Любого использования Программного обеспечения в сочетании с другими ПО, оборудованием,
или данными, не предоставленными Пользователю Правообладателем;
4.1.4. Любого изменения Программного обеспечения любым третьим лицом, а не Правообладателем.
5. НАСТОЯЩИМ ПРАВООБЛАДАТЕЛЬ ЗАЯВЛЯЕТ, ЧТО ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ ПРЕДОСТАВЛЯЕТСЯ ПОЛЬЗОВАТЕЛЮ
ПО ПРИНЦИПУ «AS IS» - «КАК ЕСТЬ». НИ ПРИ КАКИХ ОБСТОЯТЕЛЬСТВАХ ПРАВООБЛАДАТЕЛЬ НЕ ГАРАНТИРУЕТ
И НЕ ОБЕЩАЕТ, ЧТО ПРЕДОСТАВЛЕННОЕ ИМ ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ БУДЕТ ПОДХОДИТЬ ИЛИ НЕ ПОДХОДИТЬ
ДЛЯ КОНКРЕТНЫХ ЦЕЛЕЙ ПОЛЬЗОВАТЕЛЯ, ЧТО ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ БУДЕТ ОТВЕЧАТЬ ВСЕМ КОММЕРЧЕСКИМ
И ЛИЧНЫМ СУБЪЕКТИВНЫМ ОЖИДАНИЯМ ПОЛЬЗОВАТЕЛЯ, ЧТО ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ БУДЕТ РАБОТАТЬ
ИСПРАВНО, БЕЗ ТЕХНИЧЕСКИХ ОШИБОК, БЫСТРО И БЕСПЕРЕБОЙНО.
6. ОГРАНИЧЕНИЕ ОТВЕТСТВЕННОСТИ.
НИ ПРИ КАКИХ ОБСТОЯТЕЛЬСТВАХ ПРАВООБЛАДАТЕЛЬ ИЛИ ЕГО АФФИЛЛИРОВАННЫЕ ЛИЦА НЕ НЕСУТ ПЕРЕД ПОЛЬЗОВАТЕЛЕМ
ОТВЕТСТВЕННОСТИ ЗА ЛЮБЫЕ ПРЯМЫЕ ИЛИ КОСВЕННЫЕ УБЫТКИ ПОЛЬЗОВАТЕЛЯ, ЕГО РАСХОДЫ ИЛИ РЕАЛЬНЫЙ УЩЕРБ,
ВКЛЮЧАЯ, ПОМИМО ПРОЧЕГО, ПРОСТОИ; УТРАТУ БИЗНЕСА; УПУЩЕННУЮ ВЫГОДУ; НЕДОПОЛУЧЕННУЮ ПРИБЫЛЬ;
ПОТЕРЮ ИЛИ ПОВРЕЖДЕНИЕ ДАННЫХ, ИМУЩЕСТВА И ИНОЕ.
ОГРАНИЧЕНИЯ ПРИМЕНЯЮТСЯ НЕЗАВИСИМО ОТ ОСНОВАНИЯ НАСТУПЛЕНИЯ ОТВЕТСТВЕННОСТИ; В ТОМ ЧИСЛЕ ВСЛЕДСТВИЕ
ДЕЙСТВИЯ ИЛИ БЕЗДЕЙСТВИЯ, НЕБРЕЖНОСТИ, УМЫСЛА, ПРЯМОГО ИЛИ КОСВЕННОГО; НЕОСТОРОЖНОСТИ; ЗАБЛУЖДЕНИЯ;
КЛЕВЕТЫ; НАРУШЕНИЯ КОНФИДЕНЦИАЛЬНОСТИ ИЛИ ПРАВА ИНТЕЛЛЕКТУАЛЬНОЙ СОБСТВЕННОСТИ; ИЛИ ЛЮБОЕ ДРУГОЕ
ОСНОВАНИЕ НАСТУПЛЕНИЯ ОТВЕТСТВЕННОСТИ.
7. ОБЯЗАННОСТЬ ПОЛЬЗОВАТЕЛЯ:
Не осуществлять самостоятельно и (или) с привлечением третьих лиц нижеследующие действия
(включая, но не ограничиваясь) по:
-дизассемблированию и (или) декомпилированию (преобразованию объектного кода в исходный код)
Программного обеспечения;
-модификации Программного обеспечения, в том числе вносить изменения в объектный код, исходный
код Программного обеспечения, за исключением тех изменений, которые вносятся средствами,
включёнными в Программное обеспечение и описанными непосредственно в документации к нему;
-созданию условий для использования Программного обеспечения лицами, не имеющими прав на
использование данного Программного обеспечения, включая (но не ограничиваясь) вмешательство
третьих лиц в функционирование Программного обеспечения, предоставление третьим лицам доступа
к исследованию и (или) замене настроек Программного обеспечения, включая его первичную установку;
-распространению Программного обеспечения в целом или в части (включая приложенную к нему документацию).
8. БИБЛИОТЕКА ПО. ИСПОЛЬЗУЕМЫЕ ПРОГРАММНЫЕ СРЕДСТВА.
8.1. Настоящим, Правообладатель заверяет, что Библиотека программного обеспечения состоит из
лицензионных продуктов, используемых на законных основаниях, а
именно https://entaxy.ru/libs/licenses/root-aggregated.deps.
8.2. Любые программные средства, применяемые Пользователем при работе с ПО, должны быть
совместимы с библиотекой ПО, указанной в п.8.1. настоящего соглашения.
8.3. Перечень внешних модулей ПО, указанный в п.8.1 настоящего соглашения, может изменяться
Правообладателем в одностороннем порядке, в зависимости от выпуска релизов программного обеспечения,
содержащих все изменения и дополнения программного обеспечения.
9. ВНЕСЕНИЕ ИЗМЕНЕНИЙ В ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ.
9.1. Программное обеспечение, интеграционная шина «ЭНТАКСИ» (ENTAXY) является свободно распространяемым
программным обеспечением.
9.2. Пользователь имеет право вносить изменения в исходный код программного обеспечения исключительно
с согласия Правообладателя в порядке предложения изменений/правок/дополнений через механизм
«Pull Requests» в открытом репозитории Правообладателя по адресу: https://git.entaxy.ru/entaxy/entaxy-public.
9.3. Любые изменения программного обеспечения, осуществляемые Пользователем без соблюдения условий
пункта 9.2. настоящего документа, являются нарушением авторских и смежных прав Правообладателя,
прав интеллектуальной собственности Правообладателя и влекут применение к Пользователю мер
ответственности в соответствии с условиями настоящей Лицензии, а также применимого законодательства
Российской Федерации.
10. ЗАКЛЮЧИТЕЛЬНЫЕ ПОЛОЖЕНИЯ.
10.1. В случае нарушения Пользователем любого из условий настоящей Лицензии, Правообладатель имеет
право взыскать с Пользователя любые причинённые таким нарушением убытки, реальный ущерб,
недополученную прибыль, упущенную выгоду, а также в случае нарушения Пользователем условий
пункта 9.2 настоящего соглашения, в том числе, взыскать с Пользователя штраф в размере
2 000 000 (Два миллиона) рублей за каждый установленный случай несанкционированного изменения
исходного или объектного кода Программного обеспечения «Энтакси» (Entaxy).
10.2. В рамках исполнения Пользователем обязательств по настоящей Лицензии, применимое
законодательство Российской Федерации.
10.3. Если какое-либо положение настоящей Лицензии будет признано судом недействительным,
остальные положения будут продолжать своё действие, а Пользователь будет обязан продолжать
исполнять свои обязанности в соответствии с этими положениями.

View File

@ -0,0 +1,157 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ru.entaxy.platform.security</groupId>
<artifactId>jaas</artifactId>
<version>1.10.0</version>
</parent>
<groupId>ru.entaxy.platform.security.jaas</groupId>
<artifactId>entaxy-legacy-auth</artifactId>
<packaging>bundle</packaging>
<name>ENTAXY :: SECURITY :: JAAS :: LEGACY AUTH</name>
<description>ENTAXY :: SECURITY :: JAAS :: LEGACY AUTH</description>
<properties>
<bundle.osgi.export.pkg>
ru.entaxy.platform.runtime.security.jaas.modules.entaxylegacy
</bundle.osgi.export.pkg>
<bundle.osgi.import.pkg>
ru.entaxy.esb.system.auth.basic.jpa.api,
ru.entaxy.esb.system.auth.basic.jpa.api.entity,
ru.entaxy.esb.system.auth.basic.jpa.api.entity.field,
ru.entaxy.esb.system.auth.basic.htpasswd,
ru.entaxy.esb.system.auth.basic.jpa.api.exception,
ru.entaxy.esb.system.core.permission.jpa.entity,
ru.entaxy.esb.system.common.util,
javax.persistence;version="[2,3)",
org.hibernate,
org.hibernate.cfg,
org.hibernate.service,
org.hibernate.jpa,
org.hibernate.proxy,
javassist.util.proxy,
org.apache.commons.codec.binary,
*
</bundle.osgi.import.pkg>
<bundle.osgi.private.pkg>ru.entaxy.esb.system.common.util,
ru.entaxy.esb.system.auth.basic.jpa.impl,
ru.entaxy.esb.system.auth.basic.jpa.listener,
ru.entaxy.esb.system.auth.basic.jpa.util,
ru.entaxy.esb.system.auth.basic.interceptor</bundle.osgi.private.pkg>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Entaxy-Factory-Provider>true</Entaxy-Factory-Provider>
<Entaxy-Template-Provider>true</Entaxy-Template-Provider>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<!-- dependency>
<groupId>ru.entaxy.esb.system.commons</groupId>
<artifactId>system-commons</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency -->
<dependency>
<groupId>ru.entaxy.platform.security.jaas</groupId>
<artifactId>entaxy-legacy-auth-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.auth.basic.htpasswd</groupId>
<artifactId>htpasswd</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.karaf.jaas</groupId>
<artifactId>org.apache.karaf.jaas.modules</artifactId>
<version>${karaf.version}</version>
</dependency>
<dependency>
<groupId>com.sun.istack</groupId>
<artifactId>istack-commons-runtime</artifactId>
<version>3.0.7</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.platform.runtime.base</groupId>
<artifactId>base-support</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.registry.systems</groupId>
<artifactId>system-api</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<!-- dependency>
<groupId>ru.entaxy.esb.system.core.permission</groupId>
<artifactId>permission-api</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.system.core.permission</groupId>
<artifactId>permission-common</artifactId>
<version>${project.version}</version>
<scope>provided</scope>
</dependency -->
<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>${commons-codec.version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-cxf</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel.karaf</groupId>
<artifactId>camel-cxf-blueprint</artifactId>
<version>${camel.version}</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>osgi.core</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.eclipse.persistence</groupId>
<artifactId>javax.persistence</artifactId>
<version>${jpa.version}</version>
</dependency>
<dependency>
<groupId>javax.transaction</groupId>
<artifactId>javax.transaction-api</artifactId>
<version>${javax.transaction.version}</version>
</dependency>
<dependency>
<groupId>javax.interceptor</groupId>
<artifactId>javax.interceptor-api</artifactId>
<version>${javax.interceptor.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>${hibernate.version}</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,144 @@
/*-
* ~~~~~~licensing~~~~~~
* basic-auth-impl
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.esb.system.auth.basic.interceptor;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.cxf.common.util.Base64Exception;
import org.apache.cxf.common.util.Base64Utility;
import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.interceptor.security.AuthenticationException;
import org.apache.cxf.message.Message;
import org.apache.cxf.phase.AbstractPhaseInterceptor;
import org.apache.cxf.phase.Phase;
import org.apache.cxf.transport.http.Headers;
import ru.entaxy.esb.system.auth.basic.jpa.api.BasicAuthService;
import ru.entaxy.esb.system.common.util.SystemHeadersConstants;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Optional;
public class AuthenticationInterceptor extends AbstractPhaseInterceptor<Message> {
private static final Log LOG = LogFactory.getLog(AuthenticationInterceptor.class);
private boolean enabled = false;
private BasicAuthService basicAuthService;
private static final String BASIC = "Basic";
private static final String AUTHORIZATION = "Authorization";
private static final String WWW_AUTHENTICATE = "WWW-Authenticate";
private static final String WWW_AUTHENTICATE_MESSAGE = "Basic realm=\"Access to Entaxy\"";
public AuthenticationInterceptor() {
super(Phase.RECEIVE);
}
@Override
public void handleMessage(Message message) throws Fault {
LOG.debug("AuthenticationInterceptor enabled=" + enabled);
if (!enabled) {
return;
}
Map<String, List<String>> headers = Headers.getSetProtocolHeaders(message);
//reset passed value
headers.put(SystemHeadersConstants.HEADER_USER_LOGIN, Collections.emptyList());
Optional<String> auth = Optional.ofNullable(headers.get(AUTHORIZATION)).
orElse(Collections.emptyList())
.stream().findFirst();
Optional<String> isDisplayServiceSchema = Optional.ofNullable(headers.get(SystemHeadersConstants.HEADER_IS_DISPLAY_SERVICE_SERVICE)).
orElse(Collections.emptyList())
.stream().findFirst();
if (isDisplayServiceSchema.isPresent() && Boolean.parseBoolean(isDisplayServiceSchema.get()))
return;
if (auth.isPresent()) {
String[] namePassword = prepareAuthData(message, auth);
if (namePassword.length == 2 && isAuthenticated(namePassword[0], namePassword[1])) {
// let request to continue
LOG.trace(namePassword[0] + " authenticated");
headers.put(SystemHeadersConstants.HEADER_USER_LOGIN, Collections.singletonList(namePassword[0]));
} else {
faultAction(message);
}
} else {
faultAction(message);
}
}
private String[] prepareAuthData(Message message, Optional<String> auth) {
String[] parts = auth.get().split(" ");
if (parts.length != 2 || !BASIC.equals(parts[0])) {
faultAction(message);
}
String decodedValue = null;
try {
decodedValue = new String(Base64Utility.decode(parts[1]));
} catch (Base64Exception ex) {
faultAction(message);
}
String[] namePassword = decodedValue.split(":");
return namePassword;
}
private void faultAction(Message message) {
Map<String, List<String>> headers = Headers.getSetProtocolHeaders(message);
headers.put(WWW_AUTHENTICATE, Collections.singletonList(WWW_AUTHENTICATE_MESSAGE));
Fault fault = new Fault(new AuthenticationException("Unauthorized Access"));
fault.setFaultCode(Fault.FAULT_CODE_CLIENT);
fault.setStatusCode(401);
throw fault;
}
private boolean isAuthenticated(String name, String password) {
return basicAuthService.check(name, password);
}
public boolean isEnabled() {
return enabled;
}
public void setEnabled(boolean enabled) {
this.enabled = enabled;
}
public BasicAuthService getBasicAuthService() {
return basicAuthService;
}
public void setBasicAuthService(BasicAuthService basicAuthService) {
this.basicAuthService = basicAuthService;
}
}

View File

@ -0,0 +1,119 @@
/*-
* ~~~~~~licensing~~~~~~
* basic-auth-impl
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.esb.system.auth.basic.interceptor;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.cxf.interceptor.Fault;
import org.apache.cxf.message.Message;
import org.apache.cxf.phase.AbstractPhaseInterceptor;
import org.apache.cxf.phase.Phase;
import org.apache.cxf.transport.http.Headers;
import ru.entaxy.esb.system.auth.basic.jpa.api.BasicAuthService;
import ru.entaxy.esb.system.auth.basic.jpa.api.entity.BasicAuthAccount;
import ru.entaxy.esb.system.common.util.SystemHeadersConstants;
import ru.entaxy.esb.system.jpa.SystemService;
import ru.entaxy.esb.system.jpa.entity.System;
import javax.ws.rs.ForbiddenException;
import java.util.*;
public class SystemInterceptor extends AbstractPhaseInterceptor<Message> {
private static final Log LOG = LogFactory.getLog(SystemInterceptor.class);
private BasicAuthService basicAuthService;
private SystemService systemService;
public SystemInterceptor() {
super(Phase.PRE_PROTOCOL);
}
@Override
public void handleMessage(Message message) throws Fault {
Map<String, List<String>> headers = Headers.getSetProtocolHeaders(message);
Optional<String> login = Optional.ofNullable(headers.get(SystemHeadersConstants.HEADER_USER_LOGIN)).
orElse(Collections.emptyList())
.stream().findFirst();
Optional<String> isDisplayServiceSchema = Optional.ofNullable(headers.get(SystemHeadersConstants.HEADER_IS_DISPLAY_SERVICE_SERVICE)).
orElse(Collections.emptyList())
.stream().findFirst();
//TEST
// login = Optional.of("user");
LOG.trace(">>>>>>>>>>>>>>>>>>>>>>>>>>>>>SystemInterceptor <<< headers.get( HEADER_USER_LOGIN ) " + login.orElse("NULL"));
if (isDisplayServiceSchema.isPresent() && Boolean.parseBoolean(isDisplayServiceSchema.get()))
return;
if (login.isPresent()) {
Optional<BasicAuthAccount> accountOpt = basicAuthService.get(login.get());
if (accountOpt.isPresent()) {
BasicAuthAccount account = accountOpt.get();
headers.put(SystemHeadersConstants.HEADER_USER_ID, Collections.singletonList(String.valueOf(account.getId())));
headers.put(SystemHeadersConstants.HEADER_SYSTEM_UUID, Collections.singletonList(account.getSystemUUID()));
System system = account.getSystemUUID() != null && !account.getSystemUUID().isEmpty()
? systemService.getByUuid(account.getSystemUUID())
: null;
if (system != null) {
headers.put(SystemHeadersConstants.HEADER_SYSTEM_NAME, Collections.singletonList(system.getName()));
headers.put(SystemHeadersConstants.HEADER_SYSTEM_ID, Collections.singletonList(String.valueOf(system.getId())));
}
} else {
throw new ForbiddenException();
}
}
// It stops the process
// else {
// message.getInterceptorChain().abort();
// }
}
public BasicAuthService getBasicAuthService() {
return basicAuthService;
}
public void setBasicAuthService(BasicAuthService basicAuthService) {
this.basicAuthService = basicAuthService;
}
public SystemService getSystemService() {
return systemService;
}
public void setSystemService(SystemService systemService) {
this.systemService = systemService;
}
}

View File

@ -0,0 +1,274 @@
/*-
* ~~~~~~licensing~~~~~~
* basic-auth-impl
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.esb.system.auth.basic.jpa.impl;
import java.security.NoSuchAlgorithmException;
import java.util.Date;
import java.util.List;
import java.util.Optional;
import javax.persistence.criteria.CriteriaBuilder;
import javax.persistence.criteria.CriteriaQuery;
import javax.persistence.criteria.Root;
import org.hibernate.Session;
import org.hibernate.SessionFactory;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.esb.system.auth.basic.jpa.api.BasicAuthService;
import ru.entaxy.esb.system.auth.basic.jpa.api.entity.BasicAuthAccount;
import ru.entaxy.esb.system.auth.basic.jpa.api.entity.field.EncryptionAlgorithm;
import ru.entaxy.esb.system.auth.basic.jpa.api.exception.BadPasswordException;
import ru.entaxy.esb.system.auth.basic.jpa.util.EncryptionHelper;
public class BasicAuthServiceImpl implements BasicAuthService {
private static final Logger LOG = LoggerFactory.getLogger(BasicAuthServiceImpl.class);
private SessionFactory sessionFactory;
private String encryptionAlgorithm;
private String encryptionSalt;
// private PermissionService permissionService;
public void setSessionFactory(SessionFactory sessionFactory) {
this.sessionFactory = sessionFactory;
}
public Session getSession() {
return sessionFactory.openSession();
}
public void setEncryptionAlgorithm(String encryptionAlgorithm) {
this.encryptionAlgorithm = encryptionAlgorithm;
}
public void setEncryptionSalt(String encryptionSalt) {
this.encryptionSalt = encryptionSalt;
}
/*
public PermissionService getPermissionService() {
return permissionService;
}
public void setPermissionService(PermissionService permissionService) {
this.permissionService = permissionService;
}
*/
@Override
public List<BasicAuthAccount> list() {
List<BasicAuthAccount> list;
try (Session s = getSession()) {
s.getTransaction().begin();
CriteriaQuery<BasicAuthAccount> cq = s.getCriteriaBuilder().createQuery(BasicAuthAccount.class);
cq.from(BasicAuthAccount.class);
list = s.createQuery(cq).getResultList();
s.getTransaction().commit();
s.close();
}
return list;
}
@Override
public Optional<BasicAuthAccount> get(String login) {
Optional<BasicAuthAccount> basicAuthAccount;
try (Session s = getSession()) {
s.getTransaction().begin();
CriteriaBuilder builder = s.getCriteriaBuilder();
CriteriaQuery<BasicAuthAccount> criteriaQuery = builder.createQuery(BasicAuthAccount.class);
Root<BasicAuthAccount> root = criteriaQuery.from(BasicAuthAccount.class);
criteriaQuery.where(builder.equal(root.get("login"), login));
basicAuthAccount = s.createQuery(criteriaQuery).uniqueResultOptional();
s.getTransaction().commit();
s.close();
}
return basicAuthAccount;
}
public Optional<BasicAuthAccount> getBySystem(String systemUuid) {
Optional<BasicAuthAccount> basicAuthAccount;
try (Session s = getSession()) {
s.getTransaction().begin();
CriteriaBuilder builder = s.getCriteriaBuilder();
CriteriaQuery<BasicAuthAccount> criteriaQuery = builder.createQuery(BasicAuthAccount.class);
Root<BasicAuthAccount> root = criteriaQuery.from(BasicAuthAccount.class);
criteriaQuery.where(builder.equal(root.get("systemUUID"), systemUuid));
basicAuthAccount = s.createQuery(criteriaQuery).uniqueResultOptional();
s.getTransaction().commit();
s.close();
}
return basicAuthAccount;
};
public Optional<BasicAuthAccount> get(Session session, String login) {
Optional<BasicAuthAccount> basicAuthAccount;
CriteriaBuilder builder = session.getCriteriaBuilder();
CriteriaQuery<BasicAuthAccount> criteriaQuery = builder.createQuery(BasicAuthAccount.class);
Root<BasicAuthAccount> root = criteriaQuery.from(BasicAuthAccount.class);
criteriaQuery.where(builder.equal(root.get("login"), login));
basicAuthAccount = session.createQuery(criteriaQuery).uniqueResultOptional();
return basicAuthAccount;
}
@Override
public Optional<BasicAuthAccount> getByAuthorizationHeaderHash(String authorizationHeaderHash) {
Optional<BasicAuthAccount> basicAuthAccount;
try (Session s = getSession()) {
s.getTransaction().begin();
CriteriaBuilder builder = s.getCriteriaBuilder();
CriteriaQuery<BasicAuthAccount> criteriaQuery = builder.createQuery(BasicAuthAccount.class);
Root<BasicAuthAccount> root = criteriaQuery.from(BasicAuthAccount.class);
criteriaQuery.where(builder.equal(root.get("authorizationHeaderHash"), authorizationHeaderHash));
basicAuthAccount = s.createQuery(criteriaQuery).uniqueResultOptional();
s.getTransaction().commit();
s.close();
}
return basicAuthAccount;
}
@Override
public BasicAuthAccount save(BasicAuthAccount basicAuthAccount, boolean isExist) {
try (Session s = getSession()) {
s.getTransaction().begin();
if (isExist) {
s.update(basicAuthAccount);
} else {
s.persist(basicAuthAccount);
}
s.getTransaction().commit();
s.close();
}
return basicAuthAccount;
}
@Override
public BasicAuthAccount saveFull(String login, String passwordHash, String encryptionAlgorithm, String systemUUID,
String authorizationHeaderHash, String description, String createdBy, String editedBy) {
LOG.debug("Parameters " + login + " " + passwordHash + " " + encryptionAlgorithm
+ " " + systemUUID + " " + authorizationHeaderHash + " " + description + " " + createdBy + " "
+ editedBy);
Optional<BasicAuthAccount> existingBasicAuthAccount = get(login);
EncryptionAlgorithm encryptionAlgorithmObj = EncryptionAlgorithm.getByName(encryptionAlgorithm.toUpperCase());
BasicAuthAccount basicAuthAccount = existingBasicAuthAccount.orElseGet(BasicAuthAccount::new);
settingBasicAuthAccount(login, passwordHash, encryptionAlgorithmObj, systemUUID, authorizationHeaderHash,
description, createdBy, editedBy, basicAuthAccount, existingBasicAuthAccount.isPresent());
return save(basicAuthAccount, existingBasicAuthAccount.isPresent());
}
private BasicAuthAccount settingBasicAuthAccount(String login, String passwordHash,
EncryptionAlgorithm encryptionAlgorithm,
String systemUUID, String authorizationHeaderHash,
String description, String createdBy, String editedBy,
BasicAuthAccount basicAuthAccount, boolean isExist) {
if (!isExist) {
basicAuthAccount.setLogin(login);
basicAuthAccount.setCreateDate(new Date());
basicAuthAccount.setCreatedBy(createdBy);
} else {
basicAuthAccount.setEditDate(new Date());
basicAuthAccount.setEditedBy(editedBy);
}
basicAuthAccount.setPasswordHash(passwordHash);
basicAuthAccount.setEncryptionAlgorithm(encryptionAlgorithm);
basicAuthAccount.setSystemUUID(systemUUID);
basicAuthAccount.setAuthorizationHeaderHash(authorizationHeaderHash);
basicAuthAccount.setDescription(description);
return basicAuthAccount;
}
@Override
public BasicAuthAccount saveCommon(String login, String passwordHash, String systemUUID, String createdBy,
String editedBy)
throws NoSuchAlgorithmException, BadPasswordException {
if (null != passwordHash && !passwordHash.isEmpty()) {
passwordHash = EncryptionHelper.encrypt(passwordHash, this.encryptionAlgorithm, this.encryptionSalt);
} else {
throw new BadPasswordException("Password not passed or empty!");
}
return saveFull(login, passwordHash, this.encryptionAlgorithm, systemUUID, "", "", createdBy, editedBy);
}
@Override
public BasicAuthAccount saveShort(String login, String passwordHash, String createdBy, String editedBy)
throws NoSuchAlgorithmException, BadPasswordException {
return saveCommon(login, passwordHash, "", createdBy, editedBy);
}
@Override
public void remove(String login) {
try (Session s = getSession()) {
s.getTransaction().begin();
Optional<BasicAuthAccount> basicAuthAccount = get(s, login);
basicAuthAccount.ifPresent((basicAuthAccount1) -> removeProc(s, basicAuthAccount1));
s.getTransaction().commit();
s.close();
}
}
private void removeProc(Session session, BasicAuthAccount account) {
// permissionService.removeAll(session, account.getId(), PermissionConstants.TYPE_ACCOUNT);
// session.flush();
session.delete(BasicAuthAccount.class.getName(), account);
}
@Override
public boolean check(String login, String password) {
if (login != null && password != null) {
Optional<BasicAuthAccount> basicAuthAccountOpt = get(login);
if (basicAuthAccountOpt.isPresent()) {
BasicAuthAccount basicAuthAccount = basicAuthAccountOpt.get();
try {
String passedPasswordHash = EncryptionHelper.encrypt(password,
basicAuthAccount.getEncryptionAlgorithm().getAlgorithmName(),
this.encryptionSalt);
if (passedPasswordHash.equals(basicAuthAccount.getPasswordHash())) {
return true;
}
} catch (NoSuchAlgorithmException e) {
LOG.error("Encryption algorithm error", e);
}
}
}
return false;
}
}

View File

@ -0,0 +1,124 @@
/*-
* ~~~~~~licensing~~~~~~
* basic-auth-impl
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.esb.system.auth.basic.jpa.listener;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.event.spi.*;
import org.hibernate.persister.entity.EntityPersister;
import ru.entaxy.esb.system.auth.basic.htpasswd.HtpasswdGenerator;
import ru.entaxy.esb.system.auth.basic.jpa.api.BasicAuthService;
import ru.entaxy.esb.system.auth.basic.jpa.api.entity.BasicAuthAccount;
import java.io.IOException;
import java.security.NoSuchAlgorithmException;
import java.util.List;
public class BasicAuthPostEventListener implements PostCommitInsertEventListener, PostCommitUpdateEventListener, PostCommitDeleteEventListener {
private static final long serialVersionUID = -6603994118756820823L;
private static final Log LOG = LogFactory.getLog(BasicAuthPostEventListener.class);
private BasicAuthService basicAuthService;
private HtpasswdGenerator htpasswdGenerator;
private String encryptionSalt;
public void setEncryptionSalt(String encryptionSalt) {
this.encryptionSalt = encryptionSalt;
}
@Override
public boolean requiresPostCommitHanding(EntityPersister persister) {
return true;
}
@Override
public void onPostDelete(PostDeleteEvent event) {
LOG.debug("Delete handler event " + event.getSession());
LOG.debug("Delete handler event " + event.getEntity());
if (event.getEntity() instanceof BasicAuthAccount) {
generateHtpasswd();
}
}
@Override
public void onPostUpdate(PostUpdateEvent event) {
LOG.debug("Update handler event " + event);
LOG.debug("Update handler event " + event.getEntity());
generateHtpasswd();
}
@Override
public void onPostInsert(PostInsertEvent event) {
LOG.debug("Insert handler event " + event);
LOG.debug("Insert handler event " + event.getEntity());
generateHtpasswd();
}
private void generateHtpasswd() {
List<BasicAuthAccount> accounts = basicAuthService.list();
try {
htpasswdGenerator.generateHtpasswd(accounts, encryptionSalt);
} catch (NoSuchAlgorithmException | IOException e) {
LOG.error(e);
}
}
@Override
public void onPostDeleteCommitFailed(PostDeleteEvent event) {
LOG.debug("Delete failed event " + event.getEntity());
}
@Override
public void onPostUpdateCommitFailed(PostUpdateEvent event) {
LOG.debug("Update failed event " + event.getEntity());
}
@Override
public void onPostInsertCommitFailed(PostInsertEvent event) {
LOG.debug("Insert failed event " + event.getEntity());
}
public BasicAuthService getBasicAuthService() {
return basicAuthService;
}
public void setBasicAuthService(BasicAuthService basicAuthService) {
this.basicAuthService = basicAuthService;
}
public HtpasswdGenerator getHtpasswdGenerator() {
return htpasswdGenerator;
}
public void setHtpasswdGenerator(HtpasswdGenerator htpasswdGenerator) {
this.htpasswdGenerator = htpasswdGenerator;
}
}

View File

@ -0,0 +1,93 @@
/*-
* ~~~~~~licensing~~~~~~
* basic-auth-impl
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.esb.system.auth.basic.jpa.listener;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.hibernate.SessionFactory;
import org.hibernate.engine.spi.SessionFactoryImplementor;
import org.hibernate.event.service.spi.EventListenerRegistry;
import org.hibernate.event.spi.EventType;
public class EntityEventListenerRegistry {
private static final Log LOG = LogFactory.getLog(EntityEventListenerRegistry.class);
private static final int SESSION_WAIT_TIMEOUT = 50000;
private SessionFactory sessionFactory;
private BasicAuthPostEventListener basicAuthPostEventListener;
private int initLimiter = 0;
public void registerListeners() {
LOG.info("Init EntityEventListenerRegistry " + sessionFactory.getClass().getName());
EventListenerRegistry registry = prepareRegistry();
registry.getEventListenerGroup(EventType.POST_COMMIT_INSERT).appendListener(basicAuthPostEventListener);
registry.getEventListenerGroup(EventType.POST_COMMIT_UPDATE).appendListener(basicAuthPostEventListener);
registry.getEventListenerGroup(EventType.POST_COMMIT_DELETE).appendListener(basicAuthPostEventListener);
}
private EventListenerRegistry prepareRegistry() {
try {
SessionFactoryImplementor sessionFactoryImpl = sessionFactory.unwrap(SessionFactoryImplementor.class);
EventListenerRegistry registry = sessionFactoryImpl.getServiceRegistry().getService(EventListenerRegistry.class);
return registry;
} catch (Exception e) {
LOG.error(e.getMessage());
if (initLimiter == 10) {
LOG.error(e);
}
try {
LOG.warn("Wait sessionFactory initialization...");
Thread.sleep(SESSION_WAIT_TIMEOUT);
} catch (InterruptedException e1) {
}
}
return initLimiter++ <= 9
? prepareRegistry()
: null;
}
public SessionFactory getSessionFactory() {
return sessionFactory;
}
public BasicAuthPostEventListener getBasicAuthPostEventListener() {
return basicAuthPostEventListener;
}
public void setBasicAuthPostEventListener(BasicAuthPostEventListener basicAuthPostEventListener) {
this.basicAuthPostEventListener = basicAuthPostEventListener;
}
public void setSessionFactory(SessionFactory sessionFactory) {
this.sessionFactory = sessionFactory;
}
}

View File

@ -0,0 +1,71 @@
/*-
* ~~~~~~licensing~~~~~~
* basic-auth-impl
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.esb.system.auth.basic.jpa.util;
import org.apache.commons.codec.binary.Base64;
import org.apache.commons.codec.digest.DigestUtils;
import org.apache.commons.codec.digest.Md5Crypt;
import org.apache.commons.codec.digest.Sha2Crypt;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.esb.system.auth.basic.jpa.api.entity.field.EncryptionAlgorithm;
import java.nio.charset.StandardCharsets;
import java.security.NoSuchAlgorithmException;
public class EncryptionHelper {
private static final Logger LOG = LoggerFactory.getLogger(EncryptionHelper.class);
static final String APR1_PREFIX = "$apr1$";
static final String SHA512_PREFIX = "$6$";
private EncryptionHelper() {
throw new IllegalStateException("Utility class");
}
public static String encrypt(String plaintext, String cipher, String salt) throws NoSuchAlgorithmException {
String passwordHash;
if (EncryptionAlgorithm.MD5.equalsName(cipher)) {
passwordHash = Md5Crypt.apr1Crypt((plaintext.getBytes(StandardCharsets.UTF_8)), salt);
passwordHash = passwordHash.substring(passwordHash.lastIndexOf("$") + 1);
} else if (EncryptionAlgorithm.SHA1.equalsName(cipher)) {
passwordHash = Base64.encodeBase64String(
DigestUtils.sha1((plaintext + salt).getBytes(StandardCharsets.UTF_8)));
} else if (EncryptionAlgorithm.SHA512.equalsName(cipher)) {
passwordHash = Sha2Crypt.sha512Crypt((plaintext.getBytes(StandardCharsets.UTF_8)), SHA512_PREFIX + salt);
passwordHash = passwordHash.substring(passwordHash.lastIndexOf("$"));
} else if (EncryptionAlgorithm.PLAIN.equalsName(cipher)) {
passwordHash = plaintext;
} else {
throw new NoSuchAlgorithmException();
}
return passwordHash;
}
}

View File

@ -0,0 +1,38 @@
/*-
* ~~~~~~licensing~~~~~~
* system-commons
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.esb.system.common.util;
public class SystemHeadersConstants {
public static final String HEADER_USER_LOGIN = "X-ForwardedUser";
public static final String HEADER_USER_ID = "X-ForwardedUserId";
public static final String HEADER_SYSTEM_NAME = "X-SystemName";
public static final String HEADER_SYSTEM_UUID = "X-SystemUuid";
public static final String HEADER_SYSTEM_ID = "X-SystemId";
public static final String HEADER_IS_DISPLAY_SERVICE_SERVICE = "NTX_IsDisplayServiceSchema";
private SystemHeadersConstants() {
}
}

View File

@ -0,0 +1,183 @@
/*-
* ~~~~~~licensing~~~~~~
* entaxy-legacy-auth
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.runtime.security.jaas.modules.entaxylegacy;
import java.security.NoSuchAlgorithmException;
import java.security.Principal;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.Optional;
import java.util.stream.Collectors;
import org.apache.karaf.jaas.boot.principal.GroupPrincipal;
import org.apache.karaf.jaas.boot.principal.RolePrincipal;
import org.apache.karaf.jaas.boot.principal.UserPrincipal;
import org.apache.karaf.jaas.modules.BackingEngine;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.esb.system.auth.basic.jpa.api.BasicAuthService;
import ru.entaxy.esb.system.auth.basic.jpa.api.entity.BasicAuthAccount;
import ru.entaxy.esb.system.auth.basic.jpa.api.exception.BadPasswordException;
import ru.entaxy.platform.base.support.CommonUtils;
public class EntaxyLegacyBackingEngine implements BackingEngine {
private static final Logger log = LoggerFactory.getLogger(EntaxyLegacyBackingEngine.class);
public static EntaxyLegacyBackingEngine INSTANCE = new EntaxyLegacyBackingEngine();
public static final String SYSTEM_ROLE_PREFIX = "PROFILE_";
@Override
public void addUser(String username, String password) {
if (ServiceHolder.getInstance() == null)
return;
try {
ServiceHolder.getInstance().getBasicAuthService().saveCommon(username, password, null, "admin", "admin");
} catch (NoSuchAlgorithmException | BadPasswordException e) {
log.error("Error adding user: [" + username + "]", e);
}
}
@Override
public void deleteUser(String username) {
if (ServiceHolder.getInstance() == null)
return;
ServiceHolder.getInstance().getBasicAuthService().remove(username);
}
@Override
public List<UserPrincipal> listUsers() {
if (ServiceHolder.getInstance() == null)
return new ArrayList<>();
return ServiceHolder.getInstance().getBasicAuthService().list().stream()
.map(acc -> new UserPrincipal(acc.getLogin())).collect(Collectors.toList());
}
@Override
public UserPrincipal lookupUser(String username) {
if (ServiceHolder.getInstance() == null)
return null;
Optional<BasicAuthAccount> opt = getBasicAuthService().get(username);
if (opt.isPresent())
return new UserPrincipal(opt.get().getLogin());
return null;
}
@Override
public List<GroupPrincipal> listGroups(UserPrincipal user) {
// NOT SUPPORTED
return Collections.emptyList();
}
@Override
public Map<GroupPrincipal, String> listGroups() {
// NOT SUPPORTED
return Collections.emptyMap();
}
@Override
public void addGroup(String username, String group) {
// NOT SUPPORTED
}
@Override
public void createGroup(String group) {
// NOT SUPPORTED
}
@Override
public void deleteGroup(String username, String group) {
// NOT SUPPORTED
}
@Override
public List<RolePrincipal> listRoles(Principal principal) {
if (ServiceHolder.getInstance() == null)
return Collections.emptyList();
if (principal instanceof UserPrincipal) {
Optional<BasicAuthAccount> opt = getBasicAuthService().get(principal.getName());
if (opt.isPresent()) {
String systemUuid = opt.get().getSystemUUID();
if (CommonUtils.isValid(systemUuid))
return Collections.singletonList(new RolePrincipal(SYSTEM_ROLE_PREFIX + systemUuid));
}
}
return Collections.emptyList();
}
@Override
public void addRole(String username, String role) {
if (ServiceHolder.getInstance() == null)
return;
if (!CommonUtils.isValid(role))
return;
if (!role.startsWith(SYSTEM_ROLE_PREFIX))
return;
String systemUuid = role.substring(SYSTEM_ROLE_PREFIX.length());
Optional<BasicAuthAccount> opt = getBasicAuthService().get(username);
if (opt.isEmpty())
return;
opt.get().setSystemUUID(systemUuid);
getBasicAuthService().save(opt.get(), true);
}
@Override
public void deleteRole(String username, String role) {
if (ServiceHolder.getInstance() == null)
return;
if (!CommonUtils.isValid(role))
return;
if (!role.startsWith(SYSTEM_ROLE_PREFIX))
return;
Optional<BasicAuthAccount> opt = getBasicAuthService().get(username);
if (opt.isEmpty())
return;
opt.get().setSystemUUID(null);
getBasicAuthService().save(opt.get(), true);
}
@Override
public void addGroupRole(String group, String role) {
// NOT SUPPORTED
}
@Override
public void deleteGroupRole(String group, String role) {
// NOT SUPPORTED
}
protected BasicAuthService getBasicAuthService() {
return ServiceHolder.getInstance().getBasicAuthService();
}
}

View File

@ -0,0 +1,45 @@
/*-
* ~~~~~~licensing~~~~~~
* entaxy-legacy-auth
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.runtime.security.jaas.modules.entaxylegacy;
import java.util.Map;
import org.apache.karaf.jaas.modules.BackingEngine;
import org.apache.karaf.jaas.modules.BackingEngineFactory;
public class EntaxyLegacyBackingEngineFactory implements BackingEngineFactory {
@Override
public String getModuleClass() {
return EntaxyLegacyLoginModule.class.getName();
}
@Override
public BackingEngine build(Map<String, ?> options) {
return EntaxyLegacyBackingEngine.INSTANCE;
}
}

View File

@ -0,0 +1,120 @@
/*-
* ~~~~~~licensing~~~~~~
* entaxy-legacy-auth
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.runtime.security.jaas.modules.entaxylegacy;
import java.io.IOException;
import java.util.HashSet;
import java.util.Map;
import java.util.Optional;
import javax.security.auth.Subject;
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.NameCallback;
import javax.security.auth.callback.PasswordCallback;
import javax.security.auth.callback.UnsupportedCallbackException;
import javax.security.auth.login.FailedLoginException;
import javax.security.auth.login.LoginException;
import org.apache.karaf.jaas.boot.principal.RolePrincipal;
import org.apache.karaf.jaas.boot.principal.UserPrincipal;
import org.apache.karaf.jaas.modules.AbstractKarafLoginModule;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.esb.system.auth.basic.jpa.api.entity.BasicAuthAccount;
import ru.entaxy.platform.base.support.CommonUtils;
public class EntaxyLegacyLoginModule extends AbstractKarafLoginModule {
private static final Logger log = LoggerFactory.getLogger(EntaxyLegacyLoginModule.class);
public static final String SYSTEM_ROLE_PREFIX = "PROFILE_";
@Override
public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState,
Map<String, ?> options) {
super.initialize(subject, callbackHandler, options);
}
@Override
public boolean login() throws LoginException {
if (ServiceHolder.getInstance() == null) {
throw new LoginException("Entaxy legacy BasicAuthService not found");
}
Callback[] callbacks = new Callback[2];
callbacks[0] = new NameCallback("Username: ");
callbacks[1] = new PasswordCallback("Password: ", false);
if (callbackHandler != null) {
try {
callbackHandler.handle(callbacks);
} catch (IOException ioe) {
throw new LoginException(ioe.getMessage());
} catch (UnsupportedCallbackException uce) {
throw new LoginException(uce.getMessage() + " not available to obtain information from user");
}
}
// user callback get value
if (((NameCallback) callbacks[0]).getName() == null) {
throw new LoginException("Username can not be null");
}
user = ((NameCallback) callbacks[0]).getName();
// password callback get value
if (((PasswordCallback) callbacks[1]).getPassword() == null) {
throw new LoginException("Password can not be null");
}
String password = new String(((PasswordCallback) callbacks[1]).getPassword());
if (!isAuthenticated(user, password))
throw new FailedLoginException("login failed");
principals = new HashSet<>();
principals.add(new UserPrincipal(user));
Optional<BasicAuthAccount> acc = ServiceHolder.getInstance().getBasicAuthService().get(user);
if (acc.isPresent()) {
String systemUuid = acc.get().getSystemUUID();
if (CommonUtils.isValid(systemUuid))
principals.add(new RolePrincipal(SYSTEM_ROLE_PREFIX + systemUuid));
}
if (debug) {
log.debug("Successfully logged in {}", user);
}
succeeded = true;
return true;
}
private boolean isAuthenticated(String name, String password) {
return ServiceHolder.getInstance().getBasicAuthService().check(name, password);
}
}

View File

@ -0,0 +1,59 @@
/*-
* ~~~~~~licensing~~~~~~
* entaxy-legacy-auth
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.runtime.security.jaas.modules.entaxylegacy;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.service.component.annotations.ReferencePolicy;
import org.osgi.service.component.annotations.ReferencePolicyOption;
import ru.entaxy.esb.system.auth.basic.jpa.api.BasicAuthService;
@Component(immediate = true)
public class ServiceHolder {
private static ServiceHolder INSTANCE;
public static ServiceHolder getInstance() {
return INSTANCE;
}
@Reference(cardinality = ReferenceCardinality.MANDATORY, policy = ReferencePolicy.DYNAMIC,
policyOption = ReferencePolicyOption.GREEDY)
volatile BasicAuthService basicAuthService;
@Activate
public void activate() {
INSTANCE = this;
}
public BasicAuthService getBasicAuthService() {
return basicAuthService;
}
}

View File

@ -0,0 +1,105 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~~~~~~licensing~~~~~~
basic-auth-impl
==========
Copyright (C) 2020 - 2024 EmDev LLC
==========
You may not use this file except in accordance with the License Terms of the Copyright
Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
rights to the Software and any copies are the property of the Copyright Holder. Unless
it is explicitly allowed the Copyright Holder, the User is prohibited from using the
Software for commercial purposes to provide services to third parties.
The Copyright Holder hereby declares that the Software is provided on an "AS IS".
Under no circumstances does the Copyright Holder guarantee or promise that the
Software provided by him will be suitable or not suitable for the specific purposes
of the User, that the Software will meet all commercial and personal subjective
expectations of the User, that the Software will work properly, without technical
errors, quickly and uninterruptedly.
Under no circumstances shall the Copyright Holder or its Affiliates is not liable
to the User for any direct or indirect losses of the User, his expenses or actual
damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
or damage to data, property, etc.
~~~~~~/licensing~~~~~~
-->
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 https://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd">
<cm:property-placeholder persistent-id="ru.entaxy.esb.system.basic_auth" update-strategy="reload">
<cm:default-properties>
<cm:property name="encryption.algorithm" value="SHA-1"/>
<cm:property name="encryption.salt" value="kDfq0qZJ"/>
<cm:property name="internal.authentication.enabled" value="false"/>
</cm:default-properties>
</cm:property-placeholder>
<reference id="sessionFactory"
interface="org.hibernate.SessionFactory"
timeout="30000"/>
<reference id="permissionService"
interface="ru.entaxy.esb.system.core.permission.jpa.PermissionService"
timeout="30000"
availability="mandatory"/>
<service ref="basicAuthService" interface="ru.entaxy.esb.system.auth.basic.jpa.api.BasicAuthService"/>
<bean id="basicAuthService" class="ru.entaxy.esb.system.auth.basic.jpa.impl.BasicAuthServiceImpl">
<property name="sessionFactory" ref="sessionFactory"/>
<property name="encryptionAlgorithm" value="${encryption.algorithm}"/>
<property name="encryptionSalt" value="${encryption.salt}"/>
<!-- property name="permissionService" ref="permissionService"/ -->
</bean>
<reference xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0"
id="htpasswdGenerator"
interface="ru.entaxy.esb.system.auth.basic.htpasswd.HtpasswdGenerator"
timeout="30000"
availability="mandatory"
ext:proxy-method="classes"/>
<!-- bean id="basicAuthPostEventListener"
class="ru.entaxy.esb.system.auth.basic.jpa.listener.BasicAuthPostEventListener">
<property name="basicAuthService" ref="basicAuthService"/>
<property name="encryptionSalt" value="${encryption.salt}"/>
<property name="htpasswdGenerator" ref="htpasswdGenerator"/>
</bean>
<bean id="baseAuthPostDeleteEventListener"
class="ru.entaxy.esb.system.auth.basic.jpa.listener.EntityEventListenerRegistry"
init-method="registerListeners">
<property name="sessionFactory" ref="sessionFactory"/>
<property name="basicAuthPostEventListener" ref="basicAuthPostEventListener"/>
</bean -->
<reference id="systemService"
interface="ru.entaxy.esb.system.jpa.SystemService"
timeout="30000"
availability="mandatory"/>
<bean id="systemInterceptor" class="ru.entaxy.esb.system.auth.basic.interceptor.SystemInterceptor">
<property name="basicAuthService" ref="basicAuthService"/>
<property name="systemService" ref="systemService"/>
</bean>
<service ref="systemInterceptor" interface="org.apache.cxf.phase.PhaseInterceptor">
<service-properties>
<entry key="type" value="system"/>
</service-properties>
</service>
<bean id="authInterceptor" class="ru.entaxy.esb.system.auth.basic.interceptor.AuthenticationInterceptor">
<property name="basicAuthService" ref="basicAuthService"/>
<property name="enabled" value="${internal.authentication.enabled}"/>
</bean>
<service ref="authInterceptor" interface="org.apache.cxf.phase.PhaseInterceptor">
<service-properties>
<entry key="type" value="authentication"/>
</service-properties>
</service>
</blueprint>

View File

@ -0,0 +1,44 @@
<?xml version='1.0' encoding='utf-8'?>
<!--
~~~~~~licensing~~~~~~
basic-auth-impl
==========
Copyright (C) 2020 - 2024 EmDev LLC
==========
You may not use this file except in accordance with the License Terms of the Copyright
Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
rights to the Software and any copies are the property of the Copyright Holder. Unless
it is explicitly allowed the Copyright Holder, the User is prohibited from using the
Software for commercial purposes to provide services to third parties.
The Copyright Holder hereby declares that the Software is provided on an "AS IS".
Under no circumstances does the Copyright Holder guarantee or promise that the
Software provided by him will be suitable or not suitable for the specific purposes
of the User, that the Software will meet all commercial and personal subjective
expectations of the User, that the Software will work properly, without technical
errors, quickly and uninterruptedly.
Under no circumstances shall the Copyright Holder or its Affiliates is not liable
to the User for any direct or indirect losses of the User, his expenses or actual
damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
or damage to data, property, etc.
~~~~~~/licensing~~~~~~
-->
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="connection.datasource">osgi:service/entaxy.esb.storage</property>
<property name="hibernate.hbm2ddl.auto">validate</property>
<property name="hibernate.enable_lazy_load_no_trans">true</property>
<mapping class="ru.entaxy.esb.system.auth.basic.jpa.api.entity.BasicAuthAccount"/>
<mapping class="ru.entaxy.esb.system.core.permission.jpa.entity.Permission"/>
</session-factory>
</hibernate-configuration>

View File

@ -0,0 +1,36 @@
###
# ~~~~~~licensing~~~~~~
# basic-auth-impl
# ==========
# Copyright (C) 2020 - 2024 EmDev LLC
# ==========
# You may not use this file except in accordance with the License Terms of the Copyright
# Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
# rights to the Software and any copies are the property of the Copyright Holder. Unless
# it is explicitly allowed the Copyright Holder, the User is prohibited from using the
# Software for commercial purposes to provide services to third parties.
#
# The Copyright Holder hereby declares that the Software is provided on an "AS IS".
# Under no circumstances does the Copyright Holder guarantee or promise that the
# Software provided by him will be suitable or not suitable for the specific purposes
# of the User, that the Software will meet all commercial and personal subjective
# expectations of the User, that the Software will work properly, without technical
# errors, quickly and uninterruptedly.
#
# Under no circumstances shall the Copyright Holder or its Affiliates is not liable
# to the User for any direct or indirect losses of the User, his expenses or actual
# damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
# or damage to data, property, etc.
# ~~~~~~/licensing~~~~~~
###
appender.file.type=File
appender.file.name=file
appender.file.fileName=target/camel-test.log
appender.file.layout.type=PatternLayout
appender.file.layout.pattern=%d %-5p %c{1} - %m %n
appender.out.type=Console
appender.out.name=out
appender.out.layout.type=PatternLayout
appender.out.layout.pattern=[%30.30t] %-30.30c{1} %-5p %m%n
rootLogger.level=DEBUG
rootLogger.appenderRef.out.ref=out

View File

@ -0,0 +1,26 @@
{
"factory": {
"id": "entaxy-legacy-jaas-login-module",
"type": "entaxy.security.jaas.loginmodule",
"description": "Factory entaxy-legacy-jaas-login-module of entaxy.security.jaas.loginmodule",
"isAbstract": false,
"parent": "abstract-real-jaas-login-module-with-backend",
"label": "",
"category": ""
},
"entaxy.security.jaas.loginmodule": {
"moduleClassName": "ru.entaxy.platform.runtime.security.jaas.modules.entaxylegacy.EntaxyLegacyLoginModule",
"backendFactoryClassName": "ru.entaxy.platform.runtime.security.jaas.modules.entaxylegacy.EntaxyLegacyBackingEngineFactory"
},
"fields": {
},
"outputs": {
"init": {
"isDefault": true,
"config": {
"configurable": false
}
}
}
}

View File

@ -0,0 +1,175 @@
ЛИЦЕНЗИЯ ОГРАНИЧЕННОГО ПРИМЕНЕНИЯ
Настоящий документ устанавливает для Пользователя условия применения Базовой (некоммерческой)
версии лицензии для пробного использования программного обеспечения ENTAXY, принадлежащего
Правообладателю Обществу с ограниченной ответственностью "ЕМДЕВ" (ОГРН 1057810026658, ИНН
7813313860, юридический адрес: 197022, Россия, г. Санкт-Петербург, ул. Профессора Попова,
д. 23, литера В, помещение 3Н), расположенной в сети Интернет по адресу
https://www.emdev.ru/about (далее - Компания).
Используя или получая доступ к Программному обеспечению, или нажав «Я согласен с Условиями»
(или аналогичную кнопку или флажок) после загрузки или установки Программного обеспечения,
Пользователь выражает свое согласие на обязательность условий и ограничений, изложенных в
настоящем документе, в противном случае, он должен не использовать или не получать доступ
к Программному обеспечению.
1. ТЕРМИНЫ И ОПРЕДЕЛЕНИЯ
a) ПО Программное обеспечение, интеграционная шина «ЭНТАКСИ» (ENTAXY) в любой ее версии
или редакции, исключительные права на которую принадлежат Правообладателю.
b) Правообладатель (Компания) ООО «ЕМДЕВ», ОГРН 1057810026658, ИНН 7813313860, исключительные
права которого подтверждаются Свидетельством о государственной регистрации в Реестре программ
для ЭВМ № 2021610848 от 19.01.2021 года.
c) Пользователь юридическое или физическое лицо, получившее через скачивание с сайта
https://entaxy.ru или иным образом, дистрибутив ПО, пользующееся ПО.
d) ИС интеллектуальная собственность закреплённое законом исключительное право, а также
личные неимущественные права авторов произведений на результат интеллектуальной деятельности.
e) Подписка это коммерческое предложение Правообладателя, состоящее из Лицензии на использование
ПО и доступа к технической поддержке программного обеспечения на срок Подписки. Подписка
включает предоставление Пользователю неисключительного права использования ПО, в том числе
получение обновлений функционала ПО и безопасности ПО, исправление ошибок ПО и получение
патчей с обновлениями и исправлениями программного обеспечения. Подписка приобретается
Пользователем на период времени, указанный в Сертификате. Количество подписок устанавливается
для каждого Пользователя индивидуально в Сертификате.
f) Сертификат документ, выдаваемый Дистрибъютором или Авторизованным партнёром (Партнёром),
подтверждающий факт приобретения физическим или юридическим лицом Подписки на программное
обеспечение в ограниченном объёме и на определённый период времени.
g) Лицензия (простая (неисключительная) совокупность ограниченных прав использования ПО,
предоставленных Пользователю согласно условиям Подписки.
h) Библиотека совокупность подпрограмм и объектов, используемых для разработки программного
обеспечения.
i) Исходный код текст компьютерной программы на каком-либо языке программирования, состоящий
из одного или нескольких файлов, который может быть прочтён человеком.
j) Объектный код файл (часть машинного кода) с промежуточным представлением отдельного модуля
программы, полученный в результате обработки исходного кода, еще не связанный в полную программу.
Это машинный код для одной конкретной библиотеки или модуля, который будет составлять готовый
продукт.
k) Некоммерческое использование индивидуальное личное использование Пользователем программного
обеспечения с целью обучения работе с Программным обеспечением, для оценки или демонстрации
возможностей Программного обеспечения, при котором, Пользователем не извлекается коммерческая
выгода и/или не идёт в доход денежное вознаграждение при использовании Программного обеспечения.
2. ДОПУСТИМЫЕ СПОСОБЫ ИСПОЛЬЗОВАНИЯ ПРОГРАММНОГО ОБЕСПЕЧЕНИЯ
2.1. Правообладатель предоставляет Пользователю ограниченное право использования Программного
обеспечения на условиях простой (неисключительной) лицензии в объёме, ограниченном правом
воспроизведения полной рабочей версии программного обеспечения, новых версий программного обеспечения
в памяти оборудования и его запуска на оборудовании в соответствии со ст. 1280 ГК РФ.
2.2. Право на использование Программного обеспечения, предоставляемое Пользователю, носит
неисключительный характер.
2.3. Пользователю предоставляется всемирная, неисключительная, не подлежащая сублицензированию,
лицензия на ограниченное использование Программного обеспечения.
2.4. Пользователь, имеющий Базовую (некоммерческую) версию лицензии для пробного использования
имеет право приобрести Подписку на программное обеспечение. В этом случае Пользователь обязан
обратиться в службу поддержки Правообладателя по адресу: https://entaxy.ru/ для изменения
вида лицензии с Базовой бесплатной версии на Подписки.
2.5. Срок использования скачанной Пользователем базовой (некоммерческой) версии лицензии для
пробного использования программного обеспечения не ограничен.
2.6. Использование Пользователем настоящего программного обеспечения в целях разработки,
модификации, обновления другого ПО, принадлежащего третьим лицам, а не Правообладателю,
без разрешения Правообладателя не допускается.
3. АВТОРСКОЕ ПРАВО.
3.1. Все авторские права, все права интеллектуальной собственности на Программное обеспечение
и любые его копии принадлежат Правообладателю.
3.2. Все авторские права, все права интеллектуальной собственности в отношении любого контента,
к которому можно получить доступ с помощью Программного обеспечения, является собственностью
соответствующего владельца контента и защищается применимым законодательством об авторском
праве или другими законами и договорами об интеллектуальной собственности.
3.3. Условия использования Программного обеспечения.
Лицензия, предоставленная Пользователю, действительна только в том случае, если Пользователь
придерживается следующих условий:
3.3.1. Принятие уведомлений об авторских правах. Пользователю запрещается удалять или изменять
какие-либо уведомления об авторских правах или лицензиях, которые появляются при использовании
Программного обеспечения или на нем.
3.3.2. Модификация. Пользователю запрещается модифицировать, изменять, декомпилировать,
расшифровывать, дизассемблировать, переводить или реверсировать, перепроектировать
Программное обеспечение.
3.3.3. Распространение. Пользователю запрещается сублицензировать, передавать право использования
ПО или иным образом распространять или предоставлять Программное обеспечение любой третьей стороне.
3.3.4. SaaS. За исключением случаев, когда это разрешено Правообладателем, Пользователю запрещено
использовать Программное обеспечение в коммерческих целях для оказания услуг третьим лицам.
4. ОТВЕТСТВЕННОСТЬ ПРАВООБЛАДАТЕЛЯ ПРИ НАРУШЕНИИ ПОЛЬЗОВАТЕЛЕМ ПРАВ «ИС»
4.1. Правообладатель не несет никаких обязательств в отношении каких-либо претензий к Пользователю
на предмет нарушения последним прав Интеллектуальной собственности, возникших в связи с
использованием Пользователем:
4.1.1. Любых компонентов программного обеспечения с открытым исходным кодом, включенных в
Программное обеспечение;
4.1.2. Любого нарушения правил использования Программного обеспечения, установленного условиями
настоящего соглашения;
4.1.3. Любого использования Программного обеспечения в сочетании с другими ПО, оборудованием,
или данными, не предоставленными Пользователю Правообладателем;
4.1.4. Любого изменения Программного обеспечения любым третьим лицом, а не Правообладателем.
5. НАСТОЯЩИМ ПРАВООБЛАДАТЕЛЬ ЗАЯВЛЯЕТ, ЧТО ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ ПРЕДОСТАВЛЯЕТСЯ ПОЛЬЗОВАТЕЛЮ
ПО ПРИНЦИПУ «AS IS» - «КАК ЕСТЬ». НИ ПРИ КАКИХ ОБСТОЯТЕЛЬСТВАХ ПРАВООБЛАДАТЕЛЬ НЕ ГАРАНТИРУЕТ
И НЕ ОБЕЩАЕТ, ЧТО ПРЕДОСТАВЛЕННОЕ ИМ ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ БУДЕТ ПОДХОДИТЬ ИЛИ НЕ ПОДХОДИТЬ
ДЛЯ КОНКРЕТНЫХ ЦЕЛЕЙ ПОЛЬЗОВАТЕЛЯ, ЧТО ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ БУДЕТ ОТВЕЧАТЬ ВСЕМ КОММЕРЧЕСКИМ
И ЛИЧНЫМ СУБЪЕКТИВНЫМ ОЖИДАНИЯМ ПОЛЬЗОВАТЕЛЯ, ЧТО ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ БУДЕТ РАБОТАТЬ
ИСПРАВНО, БЕЗ ТЕХНИЧЕСКИХ ОШИБОК, БЫСТРО И БЕСПЕРЕБОЙНО.
6. ОГРАНИЧЕНИЕ ОТВЕТСТВЕННОСТИ.
НИ ПРИ КАКИХ ОБСТОЯТЕЛЬСТВАХ ПРАВООБЛАДАТЕЛЬ ИЛИ ЕГО АФФИЛЛИРОВАННЫЕ ЛИЦА НЕ НЕСУТ ПЕРЕД ПОЛЬЗОВАТЕЛЕМ
ОТВЕТСТВЕННОСТИ ЗА ЛЮБЫЕ ПРЯМЫЕ ИЛИ КОСВЕННЫЕ УБЫТКИ ПОЛЬЗОВАТЕЛЯ, ЕГО РАСХОДЫ ИЛИ РЕАЛЬНЫЙ УЩЕРБ,
ВКЛЮЧАЯ, ПОМИМО ПРОЧЕГО, ПРОСТОИ; УТРАТУ БИЗНЕСА; УПУЩЕННУЮ ВЫГОДУ; НЕДОПОЛУЧЕННУЮ ПРИБЫЛЬ;
ПОТЕРЮ ИЛИ ПОВРЕЖДЕНИЕ ДАННЫХ, ИМУЩЕСТВА И ИНОЕ.
ОГРАНИЧЕНИЯ ПРИМЕНЯЮТСЯ НЕЗАВИСИМО ОТ ОСНОВАНИЯ НАСТУПЛЕНИЯ ОТВЕТСТВЕННОСТИ; В ТОМ ЧИСЛЕ ВСЛЕДСТВИЕ
ДЕЙСТВИЯ ИЛИ БЕЗДЕЙСТВИЯ, НЕБРЕЖНОСТИ, УМЫСЛА, ПРЯМОГО ИЛИ КОСВЕННОГО; НЕОСТОРОЖНОСТИ; ЗАБЛУЖДЕНИЯ;
КЛЕВЕТЫ; НАРУШЕНИЯ КОНФИДЕНЦИАЛЬНОСТИ ИЛИ ПРАВА ИНТЕЛЛЕКТУАЛЬНОЙ СОБСТВЕННОСТИ; ИЛИ ЛЮБОЕ ДРУГОЕ
ОСНОВАНИЕ НАСТУПЛЕНИЯ ОТВЕТСТВЕННОСТИ.
7. ОБЯЗАННОСТЬ ПОЛЬЗОВАТЕЛЯ:
Не осуществлять самостоятельно и (или) с привлечением третьих лиц нижеследующие действия
(включая, но не ограничиваясь) по:
-дизассемблированию и (или) декомпилированию (преобразованию объектного кода в исходный код)
Программного обеспечения;
-модификации Программного обеспечения, в том числе вносить изменения в объектный код, исходный
код Программного обеспечения, за исключением тех изменений, которые вносятся средствами,
включёнными в Программное обеспечение и описанными непосредственно в документации к нему;
-созданию условий для использования Программного обеспечения лицами, не имеющими прав на
использование данного Программного обеспечения, включая (но не ограничиваясь) вмешательство
третьих лиц в функционирование Программного обеспечения, предоставление третьим лицам доступа
к исследованию и (или) замене настроек Программного обеспечения, включая его первичную установку;
-распространению Программного обеспечения в целом или в части (включая приложенную к нему документацию).
8. БИБЛИОТЕКА ПО. ИСПОЛЬЗУЕМЫЕ ПРОГРАММНЫЕ СРЕДСТВА.
8.1. Настоящим, Правообладатель заверяет, что Библиотека программного обеспечения состоит из
лицензионных продуктов, используемых на законных основаниях, а
именно https://entaxy.ru/libs/licenses/root-aggregated.deps.
8.2. Любые программные средства, применяемые Пользователем при работе с ПО, должны быть
совместимы с библиотекой ПО, указанной в п.8.1. настоящего соглашения.
8.3. Перечень внешних модулей ПО, указанный в п.8.1 настоящего соглашения, может изменяться
Правообладателем в одностороннем порядке, в зависимости от выпуска релизов программного обеспечения,
содержащих все изменения и дополнения программного обеспечения.
9. ВНЕСЕНИЕ ИЗМЕНЕНИЙ В ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ.
9.1. Программное обеспечение, интеграционная шина «ЭНТАКСИ» (ENTAXY) является свободно распространяемым
программным обеспечением.
9.2. Пользователь имеет право вносить изменения в исходный код программного обеспечения исключительно
с согласия Правообладателя в порядке предложения изменений/правок/дополнений через механизм
«Pull Requests» в открытом репозитории Правообладателя по адресу: https://git.entaxy.ru/entaxy/entaxy-public.
9.3. Любые изменения программного обеспечения, осуществляемые Пользователем без соблюдения условий
пункта 9.2. настоящего документа, являются нарушением авторских и смежных прав Правообладателя,
прав интеллектуальной собственности Правообладателя и влекут применение к Пользователю мер
ответственности в соответствии с условиями настоящей Лицензии, а также применимого законодательства
Российской Федерации.
10. ЗАКЛЮЧИТЕЛЬНЫЕ ПОЛОЖЕНИЯ.
10.1. В случае нарушения Пользователем любого из условий настоящей Лицензии, Правообладатель имеет
право взыскать с Пользователя любые причинённые таким нарушением убытки, реальный ущерб,
недополученную прибыль, упущенную выгоду, а также в случае нарушения Пользователем условий
пункта 9.2 настоящего соглашения, в том числе, взыскать с Пользователя штраф в размере
2 000 000 (Два миллиона) рублей за каждый установленный случай несанкционированного изменения
исходного или объектного кода Программного обеспечения «Энтакси» (Entaxy).
10.2. В рамках исполнения Пользователем обязательств по настоящей Лицензии, применимое
законодательство Российской Федерации.
10.3. Если какое-либо положение настоящей Лицензии будет признано судом недействительным,
остальные положения будут продолжать своё действие, а Пользователь будет обязан продолжать
исполнять свои обязанности в соответствии с этими положениями.

View File

@ -0,0 +1,59 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ru.entaxy.platform.security</groupId>
<artifactId>jaas</artifactId>
<version>1.10.0</version>
</parent>
<groupId>ru.entaxy.platform.security.jaas</groupId>
<artifactId>jaas-management</artifactId>
<packaging>bundle</packaging>
<properties>
<bundle.osgi.export.pkg>ru.entaxy.platform.core.management.jaas</bundle.osgi.export.pkg>
<bundle.osgi.private.pkg>ru.entaxy.platform.core.management.jaas.impl</bundle.osgi.private.pkg>
</properties>
<dependencies>
<dependency>
<groupId>ru.entaxy.esb.platform.runtime.core.management</groupId>
<artifactId>object-management</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.platform.security.jaas</groupId>
<artifactId>jaas-runtime</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.service.component.annotations</artifactId>
<version>1.4.0</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.scr</artifactId>
<version>2.1.20</version>
</dependency>
<dependency>
<groupId>
ru.entaxy.esb.platform.runtime.base
</groupId>
<artifactId>base-support</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.platform.runtime.base</groupId>
<artifactId>management-core</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.karaf.jaas</groupId>
<artifactId>org.apache.karaf.jaas.modules</artifactId>
<version>${karaf.version}</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,39 @@
/*-
* ~~~~~~licensing~~~~~~
* jaas-management
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.jaas;
import ru.entaxy.esb.platform.base.management.core.api.Attribute;
import ru.entaxy.esb.platform.base.management.core.api.MBeanAnnotated;
import ru.entaxy.esb.platform.base.management.core.api.MBeanExportPolicy;
import ru.entaxy.platform.core.management.object.EntaxyRuntimeObjectMBean;
@MBeanAnnotated(policy = MBeanExportPolicy.ANNOTATED_ONLY)
public interface JaasLoginModuleMBean extends EntaxyRuntimeObjectMBean {
@Attribute
boolean isBackingEngineDriven();
}

View File

@ -0,0 +1,193 @@
/*-
* ~~~~~~licensing~~~~~~
* jaas-management
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.jaas;
import org.apache.karaf.jaas.boot.principal.GroupPrincipal;
import org.apache.karaf.jaas.boot.principal.UserPrincipal;
import ru.entaxy.esb.platform.base.management.core.api.*;
@MBeanAnnotated(policy = MBeanExportPolicy.ANNOTATED_ONLY)
public interface JaasLoginModuleWithBackingEngineMBean extends JaasLoginModuleMBean {
/**
* Create a new user.
*
* @param username the user name.
* @param password the user password.
*/
@Operation(desc = "Create a new user")
void addUser(
@Parameter(name = "username", desc = "Username") String username,
@Parameter(name = "password", desc = "Password") String password);
/**
* Delete user.
*
* @param username the user name.
*/
@Operation(desc = "Delete user")
void deleteUser(@Parameter(name = "username", desc = "Username") String username);
/**
* List all users.
*
* @return the list of users.
*/
@Operation(desc = "List all users")
String listUsers();
/**
* List groups that a user is member of.
*
* @param username the user name.
* @return the list of groups.
*/
@Operation(desc = "List groups that a user is member of")
String listGroupsForUser(@Parameter(name = "username", desc = "Username") String username);
/**
* List all groups.
*
* @return the groups.
*/
@Operation(desc = "List all groups")
String listGroups();
/**
* Add a user into a given group.
*
* @param username the user name.
* @param group the group.
*/
@Operation(desc = "Add a user into a given group")
void addGroup(
@Parameter(name = "username", desc = "Username") String username,
@Parameter(name = "group", desc = "Group") String group);
/**
* Create a group
*
* @param group the group.
*/
@Operation(desc = "Create a group")
void createGroup(@Parameter(name = "group", desc = "Group") String group);
/**
* Remove a group from a user.
*
* @param username the user name.
* @param group the group.
*/
@Operation(desc = "Remove a group from a user")
void deleteGroup(
@Parameter(name = "username", desc = "Username") String username,
@Parameter(name = "group", desc = "Group") String group);
/**
* Get profile associated with {@link UserPrincipal}.
*
* @param username the user name.
* @return the associated profile name.
*/
@Operation(desc = "Get profile associated with user")
String getAssociatedProfile(@Parameter(name = "username", desc = "Username") String username);
/**
* Associate profile with {@link UserPrincipal}.
*
* @param username the user name.
* @param profileName the name of the profile.
*/
@Operation(desc = "Associate profile with a user")
void associateProfile(
@Parameter(name = "username", desc = "Username") String username,
@Parameter(name = "profileName", desc = "Profile Name") String profileName);
/**
* List roles for a {@link UserPrincipal}.
*
* @param username the user name.
* @return the list of roles.
*/
@Operation(desc = "List roles for a user")
String listRolesForUser(@Parameter(name = "username", desc = "Username") String username);
/**
* List roles for a {@link GroupPrincipal}.
*
* @param groupName the name of the group.
* @return the list of roles.
*/
@Operation(desc = "List roles for a group")
String listRolesForGroup(@Parameter(name = "groupName", desc = "Group Name") String groupName);
/**
* Add a role to the user.
*
* @param username the user name.
* @param role the role.
*/
@Operation(desc = "Add a role to the user")
void addRole(
@Parameter(name = "username", desc = "Username") String username,
@Parameter(name = "role", desc = "Role") String role);
/**
* Remove a role from a user.
*
* @param username the user name.
* @param role the role.
*/
@Operation(desc = "Remove a role from a user")
void deleteRole(
@Parameter(name = "username", desc = "Username") String username,
@Parameter(name = "role", desc = "Role") String role);
/**
* Add a role in a group.
*
* @param group the group.
* @param role the role.
*/
@Operation(desc = "Add a role in a group")
void addGroupRole(
@Parameter(name = "group", desc = "Group") String group,
@Parameter(name = "role", desc = "Role") String role);
/**
* Remove a role from a group.
*
* @param group the group.
* @param role the role.
*/
@Operation(desc = "Remove a role from a group")
void deleteGroupRole(
@Parameter(name = "group", desc = "Group") String group,
@Parameter(name = "role", desc = "Role") String role);
}

View File

@ -0,0 +1,59 @@
/*-
* ~~~~~~licensing~~~~~~
* jaas-management
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.jaas;
import ru.entaxy.esb.platform.base.management.core.ManagementCore;
import ru.entaxy.esb.platform.base.management.core.Qualifier;
import ru.entaxy.esb.platform.base.management.core.api.Operation;
import ru.entaxy.esb.platform.base.management.core.api.Parameter;
import ru.entaxy.esb.platform.base.management.core.api.MBeanAnnotated;
import ru.entaxy.esb.platform.base.management.core.api.MBeanExportPolicy;
import ru.entaxy.platform.core.management.object.EntaxyRuntimeObjectContainerMBean;
@MBeanAnnotated(policy = MBeanExportPolicy.ANNOTATED_ONLY)
public interface JaasMBean extends EntaxyRuntimeObjectContainerMBean {
Qualifier QUALIFIER = ManagementCore.Q_RUNTIME.qualifier("section", "security")
.attribute("security", "jaas");
String SUBQUALIFIER = QUALIFIER.getValue().substring(ManagementCore.Q_RUNTIME.getValue().length() + 1);
String TYPE_REALM = "entaxy.security.jaas.realm";
String TYPE_LOGINMODULE = "entaxy.security.jaas.loginmodule";
@Operation(desc = "Start realm")
void startJaasRealm(
@Parameter(name = "idOrName", desc = "Id or name of the realm") String idOrName) throws Exception;
@Operation(desc = "Stop realm")
void stopJaasRealm(
@Parameter(name = "idOrName", desc = "Id or name of the realm") String idOrName) throws Exception;
@Operation(desc = "Uninstall realm")
void uninstallJaasRealm(
@Parameter(name = "idOrName", desc = "Id or name of the realm") String idOrName) throws Exception;
}

View File

@ -0,0 +1,41 @@
/*-
* ~~~~~~licensing~~~~~~
* jaas-management
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.jaas;
import ru.entaxy.esb.platform.base.management.core.api.Attribute;
import ru.entaxy.esb.platform.base.management.core.api.MBeanAnnotated;
import ru.entaxy.esb.platform.base.management.core.api.MBeanExportPolicy;
import ru.entaxy.platform.core.management.object.EntaxyRuntimeObjectMBean;
@MBeanAnnotated(policy = MBeanExportPolicy.ANNOTATED_ONLY)
public interface JaasRealmMBean extends EntaxyRuntimeObjectMBean {
@Attribute
default String getName() {
return getObjectId();
}
}

View File

@ -0,0 +1,52 @@
/*-
* ~~~~~~licensing~~~~~~
* jaas-management
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.jaas.impl;
import javax.management.NotCompliantMBeanException;
import ru.entaxy.esb.platform.base.management.core.api.EntaxyRuntimeTyped;
import ru.entaxy.platform.core.management.jaas.JaasLoginModuleMBean;
import ru.entaxy.platform.core.management.jaas.JaasMBean;
import ru.entaxy.platform.core.management.object.ObjectMBean;
import ru.entaxy.platform.core.management.object.factory.AbstractObjectMBean;
import ru.entaxy.platform.objects.runtime.EntaxyRuntimeObject;
@EntaxyRuntimeTyped(name = JaasMBean.TYPE_LOGINMODULE)
@ObjectMBean(subQualifierName = "module")
public class JaasLoginModuleMBeanImpl extends AbstractObjectMBean<JaasLoginModuleMBean>
implements JaasLoginModuleMBean {
protected JaasLoginModuleMBeanImpl(EntaxyRuntimeObject entaxyRuntimeObject)
throws NotCompliantMBeanException {
super(JaasLoginModuleMBean.class, entaxyRuntimeObject);
}
@Override
public boolean isBackingEngineDriven() {
return false;
}
}

View File

@ -0,0 +1,247 @@
/*-
* ~~~~~~licensing~~~~~~
* jaas-management
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.jaas.impl;
import java.security.Principal;
import java.util.*;
import java.util.stream.Collectors;
import javax.management.NotCompliantMBeanException;
import javax.security.auth.login.AppConfigurationEntry;
import com.google.gson.JsonObject;
import org.apache.commons.lang3.StringUtils;
import org.apache.karaf.jaas.boot.principal.GroupPrincipal;
import org.apache.karaf.jaas.boot.principal.RolePrincipal;
import org.apache.karaf.jaas.modules.BackingEngine;
import ru.entaxy.esb.platform.base.management.core.api.EntaxyRuntimeTyped;
import ru.entaxy.platform.core.management.jaas.JaasLoginModuleWithBackingEngineMBean;
import ru.entaxy.platform.core.management.jaas.JaasMBean;
import ru.entaxy.platform.core.management.object.ObjectMBean;
import ru.entaxy.platform.core.management.object.factory.AbstractObjectMBean;
import ru.entaxy.platform.objects.runtime.EntaxyRuntimeObject;
import ru.entaxy.platform.objects.runtime.EntaxyRuntimeRelation;
import ru.entaxy.platform.runtime.security.jaas.JaasHelper;
@EntaxyRuntimeTyped(name = JaasMBean.TYPE_LOGINMODULE)
@ObjectMBean(subQualifierName = "module")
public class JaasLoginModuleWithBackingEngineMBeanImpl
extends AbstractObjectMBean<JaasLoginModuleWithBackingEngineMBean>
implements JaasLoginModuleWithBackingEngineMBean {
protected AppConfigurationEntry entry = null;
protected BackingEngine engine = null;
private final String SYSTEM_ROLE_PREFIX = "PROFILE_";
protected JaasLoginModuleWithBackingEngineMBeanImpl(EntaxyRuntimeObject entaxyRuntimeObject)
throws NotCompliantMBeanException {
super(JaasLoginModuleWithBackingEngineMBean.class, entaxyRuntimeObject);
}
protected boolean init() {
if (engine == null) {
List<EntaxyRuntimeRelation> relations = entaxyRuntimeObject.getIncomiingSubordRelations();
if (relations == null)
return false;
relations = relations.stream().filter(rel -> !rel.getMain().isGhost())
.filter(rel -> JaasMBean.TYPE_REALM.equals(rel.getMain().getType())).collect(Collectors.toList());
if (relations.isEmpty())
return false;
String realmName = relations.get(0).getMain().getId();
try {
engine = JaasHelper.getInstance().getBackingEngine(realmName, entaxyRuntimeObject.getId());
} catch (Exception ignore) {
}
}
return engine != null;
}
@Override
public boolean isBackingEngineDriven() {
return true;
}
@Override
public void addUser(String username, String password) {
if (!init())
throw new UnsupportedOperationException("Backing engine not bound");
engine.addUser(username, password);
}
@Override
public void deleteUser(String username) {
if (!init())
throw new UnsupportedOperationException("Backing engine not bound");
engine.deleteUser(username);
}
@Override
public String listUsers() {
if (!init())
throw new UnsupportedOperationException("Backing engine not bound");
return engine.listUsers().stream().map(user -> {
return getJsonObjectFromPrincipal(user);
}).collect(Collectors.toList()).toString();
}
@Override
public String listGroupsForUser(String username) {
if (!init())
throw new UnsupportedOperationException("Backing engine not bound");
return engine.listGroups(engine.lookupUser(username)).stream().map(groupPrincipal -> {
return getJsonObjectFromPrincipal(groupPrincipal);
}).collect(Collectors.toList()).toString();
}
@Override
public String listGroups() {
if (!init())
throw new UnsupportedOperationException("Backing engine not bound");
List<JsonObject> groups = new ArrayList<>();
engine.listGroups().forEach((groupPrincipal, roles) -> {
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("name", groupPrincipal.getName());
jsonObject.addProperty("roles", roles);
groups.add(jsonObject);
});
return groups.toString();
}
@Override
public void addGroup(String username, String group) {
if (!init())
throw new UnsupportedOperationException("Backing engine not bound");
engine.addGroup(username, group);
}
@Override
public void createGroup(String group) {
if (!init())
throw new UnsupportedOperationException("Backing engine not bound");
engine.createGroup(group);
}
@Override
public void deleteGroup(String username, String group) {
if (!init())
throw new UnsupportedOperationException("Backing engine not bound");
engine.deleteGroup(username, group);
}
@Override
public String getAssociatedProfile(String username) {
if (!init())
throw new UnsupportedOperationException("Backing engine not bound");
RolePrincipal role = engine.listRoles(engine.lookupUser(username)).stream().filter(rolePrincipal -> {
return rolePrincipal.getName().startsWith(SYSTEM_ROLE_PREFIX);
}).findAny().orElse(null);
return role != null ? role.getName().substring(SYSTEM_ROLE_PREFIX.length(), role.getName().length()) : "";
}
@Override
public void associateProfile(String username, String profileName) {
if (!init())
throw new UnsupportedOperationException("Backing engine not bound");
RolePrincipal role = engine.listRoles(engine.lookupUser(username)).stream().filter(rolePrincipal -> {
return rolePrincipal.getName().startsWith(SYSTEM_ROLE_PREFIX);
}).findAny().orElse(null);
if (role != null) {
engine.deleteRole(username, role.getName());
}
if (StringUtils.isNotEmpty(profileName)) {
engine.addRole(username, SYSTEM_ROLE_PREFIX.concat(profileName));
}
}
@Override
public String listRolesForUser(String username) {
if (!init())
throw new UnsupportedOperationException("Backing engine not bound");
return engine.listRoles(engine.lookupUser(username)).stream().filter(role -> {
return !role.getName().startsWith(SYSTEM_ROLE_PREFIX);
}).map(role -> {
return getJsonObjectFromPrincipal(role);
}).collect(Collectors.toList()).toString();
}
@Override
public String listRolesForGroup(String groupName) {
if (!init())
throw new UnsupportedOperationException("Backing engine not bound");
return engine.listRoles(new GroupPrincipal(groupName)).stream().map(role -> {
return getJsonObjectFromPrincipal(role);
}).collect(Collectors.toList()).toString();
}
@Override
public void addRole(String username, String role) {
if (!init())
throw new UnsupportedOperationException("Backing engine not bound");
engine.addRole(username, role);
}
@Override
public void deleteRole(String username, String role) {
if (!init())
throw new UnsupportedOperationException("Backing engine not bound");
engine.deleteRole(username, role);
}
@Override
public void addGroupRole(String group, String role) {
if (!init())
throw new UnsupportedOperationException("Backing engine not bound");
engine.addGroupRole(group, role);
}
@Override
public void deleteGroupRole(String group, String role) {
if (!init())
throw new UnsupportedOperationException("Backing engine not bound");
engine.deleteGroupRole(group, role);
}
private JsonObject getJsonObjectFromPrincipal(Principal principal) {
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("name", principal.getName());
return jsonObject;
}
}

View File

@ -0,0 +1,110 @@
/*-
* ~~~~~~licensing~~~~~~
* jaas-management
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.jaas.impl;
import java.util.Collections;
import java.util.List;
import javax.management.NotCompliantMBeanException;
import org.osgi.service.component.ComponentContext;
import org.osgi.service.component.annotations.*;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.platform.core.management.jaas.JaasMBean;
import ru.entaxy.platform.core.management.object.EntaxyRuntimeItemMBean;
import ru.entaxy.platform.core.management.object.EntaxyRuntimeObjectMBean;
import ru.entaxy.platform.core.management.object.EntaxyRuntimeObjectMBeanFactory;
import ru.entaxy.platform.core.management.object.MBeanFactory;
import ru.entaxy.platform.core.management.object.factory.AbstractMBeanFactory;
import ru.entaxy.platform.objects.runtime.EntaxyRuntimeObject;
@MBeanFactory(id = "jaas-factory", supportedTypes = {"entaxy.security.jaas.*"})
@Component(service = EntaxyRuntimeObjectMBeanFactory.class, immediate = true)
public class JaasMBeanFactory extends AbstractMBeanFactory {
private static final Logger log = LoggerFactory.getLogger(JaasMBeanFactory.class);
private static final String ATTR_BACKEND_ENABLED = "backendEnabled";
@Reference(cardinality = ReferenceCardinality.MANDATORY, policy = ReferencePolicy.DYNAMIC,
policyOption = ReferencePolicyOption.GREEDY)
volatile protected JaasMbeanImpl jaasMBean;
public void activate(ComponentContext componentContext) {
// try {
// this.jaasMBean = new JaasMbeanImpl();
// } catch (NotCompliantMBeanException e) {
// log.error("Error creating JaasMbeanImpl", e);;
// }
}
@Override
public <T extends EntaxyRuntimeObjectMBean> T createMBean(EntaxyRuntimeObject entaxyRuntimeObject) {
try {
if (JaasMBean.TYPE_REALM.equals(entaxyRuntimeObject.getType())) {
JaasRealmMBeanImpl mBean = new JaasRealmMBeanImpl(entaxyRuntimeObject);
return (T) mBean;
}
if (JaasMBean.TYPE_LOGINMODULE.equals(entaxyRuntimeObject.getType())) {
boolean withBackend = false;
if (entaxyRuntimeObject.hasAttribute(ATTR_BACKEND_ENABLED)) {
Object value = entaxyRuntimeObject.getAttribute(ATTR_BACKEND_ENABLED);
if (value != null) {
try {
withBackend = Boolean.parseBoolean(value.toString());
} catch (Exception ignore) {
// ignore
}
}
}
if (withBackend) {
JaasLoginModuleWithBackingEngineMBeanImpl mBean =
new JaasLoginModuleWithBackingEngineMBeanImpl(entaxyRuntimeObject);
return (T) mBean;
} else {
JaasLoginModuleMBeanImpl mBean = new JaasLoginModuleMBeanImpl(entaxyRuntimeObject);
return (T) mBean;
}
}
} catch (Exception e) {
log.error("Error creating MBean for [" + entaxyRuntimeObject.getObjectFullId() + "]", e);
}
return null;
}
@Override
public List<? extends EntaxyRuntimeItemMBean> createMBeans() {
if (jaasMBean != null)
return Collections.singletonList(jaasMBean);
return Collections.emptyList();
}
}

View File

@ -0,0 +1,82 @@
/*-
* ~~~~~~licensing~~~~~~
* jaas-management
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.jaas.impl;
import javax.management.NotCompliantMBeanException;
import org.osgi.service.component.annotations.*;
import ru.entaxy.esb.platform.base.management.core.Qualifier;
import ru.entaxy.platform.base.objects.EntaxyObjectService;
import ru.entaxy.platform.core.management.jaas.JaasMBean;
import ru.entaxy.platform.core.management.object.ContainerMBean;
import ru.entaxy.platform.core.management.object.factory.AbstractObjectContainerMBean;
import ru.entaxy.platform.objects.runtime.EntaxyRuntimeObjectManager;
@Component(service = {JaasMbeanImpl.class}, scope = ServiceScope.SINGLETON,
immediate = true)
@ContainerMBean(id = "jaas", subQualifierValue = "jaas", subQualifierName = "security")
public class JaasMbeanImpl extends AbstractObjectContainerMBean<JaasMBean> implements JaasMBean {
@Reference(cardinality = ReferenceCardinality.MANDATORY, policy = ReferencePolicy.DYNAMIC,
policyOption = ReferencePolicyOption.GREEDY)
volatile public EntaxyObjectService entaxyObjectService;
@Reference(cardinality = ReferenceCardinality.MANDATORY, policy = ReferencePolicy.DYNAMIC,
policyOption = ReferencePolicyOption.GREEDY)
volatile private EntaxyRuntimeObjectManager entaxyRuntimeObjectManager;
public JaasMbeanImpl() throws NotCompliantMBeanException {
super(JaasMBean.class);
}
@Override
public Qualifier getJMXQualifier() {
return JaasMBean.QUALIFIER;
}
@Override
public String getJMXSubQualifier() {
return JaasMBean.SUBQUALIFIER;
}
@Override
public void startJaasRealm(String idOrName) throws Exception {
entaxyRuntimeObjectManager
.start(entaxyObjectService.findObject(idOrName, JaasMBean.TYPE_REALM).getObjectFullId());
}
@Override
public void stopJaasRealm(String idOrName) throws Exception {
entaxyRuntimeObjectManager
.stopForced(entaxyObjectService.findObject(idOrName, JaasMBean.TYPE_REALM).getObjectFullId());
}
@Override
public void uninstallJaasRealm(String idOrName) throws Exception {
entaxyRuntimeObjectManager
.uninstallForced(entaxyObjectService.findObject(idOrName, JaasMBean.TYPE_REALM).getObjectFullId());
}
}

View File

@ -0,0 +1,57 @@
/*-
* ~~~~~~licensing~~~~~~
* jaas-management
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.core.management.jaas.impl;
import javax.management.NotCompliantMBeanException;
import ru.entaxy.esb.platform.base.management.core.Qualifier;
import ru.entaxy.esb.platform.base.management.core.api.EntaxyRuntimeTyped;
import ru.entaxy.platform.core.management.jaas.JaasMBean;
import ru.entaxy.platform.core.management.jaas.JaasRealmMBean;
import ru.entaxy.platform.core.management.object.ObjectMBean;
import ru.entaxy.platform.core.management.object.factory.AbstractObjectMBean;
import ru.entaxy.platform.objects.runtime.EntaxyRuntimeObject;
@EntaxyRuntimeTyped(name = JaasMBean.TYPE_REALM)
@ObjectMBean(subQualifierName = "realm")
public class JaasRealmMBeanImpl extends AbstractObjectMBean<JaasRealmMBean> implements JaasRealmMBean {
protected JaasRealmMBeanImpl(EntaxyRuntimeObject entaxyRuntimeObject)
throws NotCompliantMBeanException {
super(JaasRealmMBean.class, entaxyRuntimeObject);
}
@Override
public Qualifier getJMXQualifier() {
return JaasMBean.QUALIFIER.qualifier("realm", getObjectId());
}
@Override
public String getJMXSubQualifier() {
return JaasMBean.SUBQUALIFIER.concat(",realm=").concat(getObjectId());
}
}

View File

@ -0,0 +1,175 @@
ЛИЦЕНЗИЯ ОГРАНИЧЕННОГО ПРИМЕНЕНИЯ
Настоящий документ устанавливает для Пользователя условия применения Базовой (некоммерческой)
версии лицензии для пробного использования программного обеспечения ENTAXY, принадлежащего
Правообладателю Обществу с ограниченной ответственностью "ЕМДЕВ" (ОГРН 1057810026658, ИНН
7813313860, юридический адрес: 197022, Россия, г. Санкт-Петербург, ул. Профессора Попова,
д. 23, литера В, помещение 3Н), расположенной в сети Интернет по адресу
https://www.emdev.ru/about (далее - Компания).
Используя или получая доступ к Программному обеспечению, или нажав «Я согласен с Условиями»
(или аналогичную кнопку или флажок) после загрузки или установки Программного обеспечения,
Пользователь выражает свое согласие на обязательность условий и ограничений, изложенных в
настоящем документе, в противном случае, он должен не использовать или не получать доступ
к Программному обеспечению.
1. ТЕРМИНЫ И ОПРЕДЕЛЕНИЯ
a) ПО Программное обеспечение, интеграционная шина «ЭНТАКСИ» (ENTAXY) в любой ее версии
или редакции, исключительные права на которую принадлежат Правообладателю.
b) Правообладатель (Компания) ООО «ЕМДЕВ», ОГРН 1057810026658, ИНН 7813313860, исключительные
права которого подтверждаются Свидетельством о государственной регистрации в Реестре программ
для ЭВМ № 2021610848 от 19.01.2021 года.
c) Пользователь юридическое или физическое лицо, получившее через скачивание с сайта
https://entaxy.ru или иным образом, дистрибутив ПО, пользующееся ПО.
d) ИС интеллектуальная собственность закреплённое законом исключительное право, а также
личные неимущественные права авторов произведений на результат интеллектуальной деятельности.
e) Подписка это коммерческое предложение Правообладателя, состоящее из Лицензии на использование
ПО и доступа к технической поддержке программного обеспечения на срок Подписки. Подписка
включает предоставление Пользователю неисключительного права использования ПО, в том числе
получение обновлений функционала ПО и безопасности ПО, исправление ошибок ПО и получение
патчей с обновлениями и исправлениями программного обеспечения. Подписка приобретается
Пользователем на период времени, указанный в Сертификате. Количество подписок устанавливается
для каждого Пользователя индивидуально в Сертификате.
f) Сертификат документ, выдаваемый Дистрибъютором или Авторизованным партнёром (Партнёром),
подтверждающий факт приобретения физическим или юридическим лицом Подписки на программное
обеспечение в ограниченном объёме и на определённый период времени.
g) Лицензия (простая (неисключительная) совокупность ограниченных прав использования ПО,
предоставленных Пользователю согласно условиям Подписки.
h) Библиотека совокупность подпрограмм и объектов, используемых для разработки программного
обеспечения.
i) Исходный код текст компьютерной программы на каком-либо языке программирования, состоящий
из одного или нескольких файлов, который может быть прочтён человеком.
j) Объектный код файл (часть машинного кода) с промежуточным представлением отдельного модуля
программы, полученный в результате обработки исходного кода, еще не связанный в полную программу.
Это машинный код для одной конкретной библиотеки или модуля, который будет составлять готовый
продукт.
k) Некоммерческое использование индивидуальное личное использование Пользователем программного
обеспечения с целью обучения работе с Программным обеспечением, для оценки или демонстрации
возможностей Программного обеспечения, при котором, Пользователем не извлекается коммерческая
выгода и/или не идёт в доход денежное вознаграждение при использовании Программного обеспечения.
2. ДОПУСТИМЫЕ СПОСОБЫ ИСПОЛЬЗОВАНИЯ ПРОГРАММНОГО ОБЕСПЕЧЕНИЯ
2.1. Правообладатель предоставляет Пользователю ограниченное право использования Программного
обеспечения на условиях простой (неисключительной) лицензии в объёме, ограниченном правом
воспроизведения полной рабочей версии программного обеспечения, новых версий программного обеспечения
в памяти оборудования и его запуска на оборудовании в соответствии со ст. 1280 ГК РФ.
2.2. Право на использование Программного обеспечения, предоставляемое Пользователю, носит
неисключительный характер.
2.3. Пользователю предоставляется всемирная, неисключительная, не подлежащая сублицензированию,
лицензия на ограниченное использование Программного обеспечения.
2.4. Пользователь, имеющий Базовую (некоммерческую) версию лицензии для пробного использования
имеет право приобрести Подписку на программное обеспечение. В этом случае Пользователь обязан
обратиться в службу поддержки Правообладателя по адресу: https://entaxy.ru/ для изменения
вида лицензии с Базовой бесплатной версии на Подписки.
2.5. Срок использования скачанной Пользователем базовой (некоммерческой) версии лицензии для
пробного использования программного обеспечения не ограничен.
2.6. Использование Пользователем настоящего программного обеспечения в целях разработки,
модификации, обновления другого ПО, принадлежащего третьим лицам, а не Правообладателю,
без разрешения Правообладателя не допускается.
3. АВТОРСКОЕ ПРАВО.
3.1. Все авторские права, все права интеллектуальной собственности на Программное обеспечение
и любые его копии принадлежат Правообладателю.
3.2. Все авторские права, все права интеллектуальной собственности в отношении любого контента,
к которому можно получить доступ с помощью Программного обеспечения, является собственностью
соответствующего владельца контента и защищается применимым законодательством об авторском
праве или другими законами и договорами об интеллектуальной собственности.
3.3. Условия использования Программного обеспечения.
Лицензия, предоставленная Пользователю, действительна только в том случае, если Пользователь
придерживается следующих условий:
3.3.1. Принятие уведомлений об авторских правах. Пользователю запрещается удалять или изменять
какие-либо уведомления об авторских правах или лицензиях, которые появляются при использовании
Программного обеспечения или на нем.
3.3.2. Модификация. Пользователю запрещается модифицировать, изменять, декомпилировать,
расшифровывать, дизассемблировать, переводить или реверсировать, перепроектировать
Программное обеспечение.
3.3.3. Распространение. Пользователю запрещается сублицензировать, передавать право использования
ПО или иным образом распространять или предоставлять Программное обеспечение любой третьей стороне.
3.3.4. SaaS. За исключением случаев, когда это разрешено Правообладателем, Пользователю запрещено
использовать Программное обеспечение в коммерческих целях для оказания услуг третьим лицам.
4. ОТВЕТСТВЕННОСТЬ ПРАВООБЛАДАТЕЛЯ ПРИ НАРУШЕНИИ ПОЛЬЗОВАТЕЛЕМ ПРАВ «ИС»
4.1. Правообладатель не несет никаких обязательств в отношении каких-либо претензий к Пользователю
на предмет нарушения последним прав Интеллектуальной собственности, возникших в связи с
использованием Пользователем:
4.1.1. Любых компонентов программного обеспечения с открытым исходным кодом, включенных в
Программное обеспечение;
4.1.2. Любого нарушения правил использования Программного обеспечения, установленного условиями
настоящего соглашения;
4.1.3. Любого использования Программного обеспечения в сочетании с другими ПО, оборудованием,
или данными, не предоставленными Пользователю Правообладателем;
4.1.4. Любого изменения Программного обеспечения любым третьим лицом, а не Правообладателем.
5. НАСТОЯЩИМ ПРАВООБЛАДАТЕЛЬ ЗАЯВЛЯЕТ, ЧТО ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ ПРЕДОСТАВЛЯЕТСЯ ПОЛЬЗОВАТЕЛЮ
ПО ПРИНЦИПУ «AS IS» - «КАК ЕСТЬ». НИ ПРИ КАКИХ ОБСТОЯТЕЛЬСТВАХ ПРАВООБЛАДАТЕЛЬ НЕ ГАРАНТИРУЕТ
И НЕ ОБЕЩАЕТ, ЧТО ПРЕДОСТАВЛЕННОЕ ИМ ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ БУДЕТ ПОДХОДИТЬ ИЛИ НЕ ПОДХОДИТЬ
ДЛЯ КОНКРЕТНЫХ ЦЕЛЕЙ ПОЛЬЗОВАТЕЛЯ, ЧТО ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ БУДЕТ ОТВЕЧАТЬ ВСЕМ КОММЕРЧЕСКИМ
И ЛИЧНЫМ СУБЪЕКТИВНЫМ ОЖИДАНИЯМ ПОЛЬЗОВАТЕЛЯ, ЧТО ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ БУДЕТ РАБОТАТЬ
ИСПРАВНО, БЕЗ ТЕХНИЧЕСКИХ ОШИБОК, БЫСТРО И БЕСПЕРЕБОЙНО.
6. ОГРАНИЧЕНИЕ ОТВЕТСТВЕННОСТИ.
НИ ПРИ КАКИХ ОБСТОЯТЕЛЬСТВАХ ПРАВООБЛАДАТЕЛЬ ИЛИ ЕГО АФФИЛЛИРОВАННЫЕ ЛИЦА НЕ НЕСУТ ПЕРЕД ПОЛЬЗОВАТЕЛЕМ
ОТВЕТСТВЕННОСТИ ЗА ЛЮБЫЕ ПРЯМЫЕ ИЛИ КОСВЕННЫЕ УБЫТКИ ПОЛЬЗОВАТЕЛЯ, ЕГО РАСХОДЫ ИЛИ РЕАЛЬНЫЙ УЩЕРБ,
ВКЛЮЧАЯ, ПОМИМО ПРОЧЕГО, ПРОСТОИ; УТРАТУ БИЗНЕСА; УПУЩЕННУЮ ВЫГОДУ; НЕДОПОЛУЧЕННУЮ ПРИБЫЛЬ;
ПОТЕРЮ ИЛИ ПОВРЕЖДЕНИЕ ДАННЫХ, ИМУЩЕСТВА И ИНОЕ.
ОГРАНИЧЕНИЯ ПРИМЕНЯЮТСЯ НЕЗАВИСИМО ОТ ОСНОВАНИЯ НАСТУПЛЕНИЯ ОТВЕТСТВЕННОСТИ; В ТОМ ЧИСЛЕ ВСЛЕДСТВИЕ
ДЕЙСТВИЯ ИЛИ БЕЗДЕЙСТВИЯ, НЕБРЕЖНОСТИ, УМЫСЛА, ПРЯМОГО ИЛИ КОСВЕННОГО; НЕОСТОРОЖНОСТИ; ЗАБЛУЖДЕНИЯ;
КЛЕВЕТЫ; НАРУШЕНИЯ КОНФИДЕНЦИАЛЬНОСТИ ИЛИ ПРАВА ИНТЕЛЛЕКТУАЛЬНОЙ СОБСТВЕННОСТИ; ИЛИ ЛЮБОЕ ДРУГОЕ
ОСНОВАНИЕ НАСТУПЛЕНИЯ ОТВЕТСТВЕННОСТИ.
7. ОБЯЗАННОСТЬ ПОЛЬЗОВАТЕЛЯ:
Не осуществлять самостоятельно и (или) с привлечением третьих лиц нижеследующие действия
(включая, но не ограничиваясь) по:
-дизассемблированию и (или) декомпилированию (преобразованию объектного кода в исходный код)
Программного обеспечения;
-модификации Программного обеспечения, в том числе вносить изменения в объектный код, исходный
код Программного обеспечения, за исключением тех изменений, которые вносятся средствами,
включёнными в Программное обеспечение и описанными непосредственно в документации к нему;
-созданию условий для использования Программного обеспечения лицами, не имеющими прав на
использование данного Программного обеспечения, включая (но не ограничиваясь) вмешательство
третьих лиц в функционирование Программного обеспечения, предоставление третьим лицам доступа
к исследованию и (или) замене настроек Программного обеспечения, включая его первичную установку;
-распространению Программного обеспечения в целом или в части (включая приложенную к нему документацию).
8. БИБЛИОТЕКА ПО. ИСПОЛЬЗУЕМЫЕ ПРОГРАММНЫЕ СРЕДСТВА.
8.1. Настоящим, Правообладатель заверяет, что Библиотека программного обеспечения состоит из
лицензионных продуктов, используемых на законных основаниях, а
именно https://entaxy.ru/libs/licenses/root-aggregated.deps.
8.2. Любые программные средства, применяемые Пользователем при работе с ПО, должны быть
совместимы с библиотекой ПО, указанной в п.8.1. настоящего соглашения.
8.3. Перечень внешних модулей ПО, указанный в п.8.1 настоящего соглашения, может изменяться
Правообладателем в одностороннем порядке, в зависимости от выпуска релизов программного обеспечения,
содержащих все изменения и дополнения программного обеспечения.
9. ВНЕСЕНИЕ ИЗМЕНЕНИЙ В ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ.
9.1. Программное обеспечение, интеграционная шина «ЭНТАКСИ» (ENTAXY) является свободно распространяемым
программным обеспечением.
9.2. Пользователь имеет право вносить изменения в исходный код программного обеспечения исключительно
с согласия Правообладателя в порядке предложения изменений/правок/дополнений через механизм
«Pull Requests» в открытом репозитории Правообладателя по адресу: https://git.entaxy.ru/entaxy/entaxy-public.
9.3. Любые изменения программного обеспечения, осуществляемые Пользователем без соблюдения условий
пункта 9.2. настоящего документа, являются нарушением авторских и смежных прав Правообладателя,
прав интеллектуальной собственности Правообладателя и влекут применение к Пользователю мер
ответственности в соответствии с условиями настоящей Лицензии, а также применимого законодательства
Российской Федерации.
10. ЗАКЛЮЧИТЕЛЬНЫЕ ПОЛОЖЕНИЯ.
10.1. В случае нарушения Пользователем любого из условий настоящей Лицензии, Правообладатель имеет
право взыскать с Пользователя любые причинённые таким нарушением убытки, реальный ущерб,
недополученную прибыль, упущенную выгоду, а также в случае нарушения Пользователем условий
пункта 9.2 настоящего соглашения, в том числе, взыскать с Пользователя штраф в размере
2 000 000 (Два миллиона) рублей за каждый установленный случай несанкционированного изменения
исходного или объектного кода Программного обеспечения «Энтакси» (Entaxy).
10.2. В рамках исполнения Пользователем обязательств по настоящей Лицензии, применимое
законодательство Российской Федерации.
10.3. Если какое-либо положение настоящей Лицензии будет признано судом недействительным,
остальные положения будут продолжать своё действие, а Пользователь будет обязан продолжать
исполнять свои обязанности в соответствии с этими положениями.

View File

@ -0,0 +1,46 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ru.entaxy.platform.security</groupId>
<artifactId>jaas</artifactId>
<version>1.10.0</version>
</parent>
<groupId>ru.entaxy.platform.security.jaas</groupId>
<artifactId>jaas-producing</artifactId>
<packaging>bundle</packaging>
<properties>
<bundle.osgi.private.pkg>ru.entaxy.platform.base.security.jaas.producing</bundle.osgi.private.pkg>
</properties>
<dependencies>
<dependency>
<groupId>ru.entaxy.esb.platform.runtime.core.object-producing</groupId>
<artifactId>object-producer-api</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.platform.runtime.core.object-producing</groupId>
<artifactId>object-producer-core</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Entaxy-Factory-Provider>true</Entaxy-Factory-Provider>
<Entaxy-Template-Provider>true</Entaxy-Template-Provider>
<Entaxy-Extensions-Provider>true</Entaxy-Extensions-Provider>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,65 @@
/*-
* ~~~~~~licensing~~~~~~
* connector-producing
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.base.security.jaas.producing;
import org.osgi.service.component.annotations.CollectionType;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.service.component.annotations.ReferencePolicy;
import org.osgi.service.component.annotations.ReferencePolicyOption;
import ru.entaxy.platform.base.objects.factory.EntaxyFactory;
import ru.entaxy.platform.core.producer.api.EntaxyProducer;
import ru.entaxy.platform.core.producer.impl.CommonObjectProducer;
import ru.entaxy.platform.core.producer.wrapper.AbstractFactoryWrapper;
import ru.entaxy.platform.core.producer.wrapper.DefaultFactoryWrapper;
// @Component(service = {EntaxyProducer.class}, immediate = true)
// @EntaxyProducerInfo(supportedTypes = {"entaxy.security.jaas.*"})
public class JaasComponentProducer extends CommonObjectProducer implements EntaxyProducer {
@Reference(bind = "addFactory", unbind = "removeFactory", cardinality = ReferenceCardinality.MULTIPLE,
collectionType = CollectionType.SERVICE, policy = ReferencePolicy.DYNAMIC,
policyOption = ReferencePolicyOption.GREEDY)
public void addFactory(EntaxyFactory factory) {
doAddFactory(factory);
}
// WE MUST DECLARE IT for @Reference annotation processor
@Override
public void removeFactory(EntaxyFactory factory) {
super.removeFactory(factory);
}
@Override
protected AbstractFactoryWrapper doAddFactory(EntaxyFactory factory) {
AbstractFactoryWrapper wrapper = super.doAddFactory(factory, DefaultFactoryWrapper.class);
if (wrapper != null)
wrapper.setGenerationProcessor(this);
return wrapper;
}
}

View File

@ -0,0 +1,8 @@
{
"module:http://karaf.apache.org/xmlns/jaas/v1.1.0": {
"targetNodeName": "config",
"targetNodeNamespace": "http://karaf.apache.org/xmlns/jaas/v1.1.0",
"position": "inside_last",
"conflict": "ignore" /*[ignore, replace]*/
}
}

View File

@ -0,0 +1,3 @@
{
"supportedTypes": ["entaxy.security.jaas.*"]
}

View File

@ -0,0 +1,14 @@
{
"factory": {
"id": "abstract-jaas-component",
"type": "entaxy.security.jaas.component",
"description": "",
"isAbstract": true,
"parent": "abstract-security-component",
"label": "security,jaas",
"category": ""
},
"entaxy.security.jaas.component": {},
"fields": {},
"outputs": {}
}

View File

@ -0,0 +1,129 @@
{
"factory": {
"id": "abstract-jaas-login-module",
"type": "entaxy.security.jaas.loginmodule",
"description": "Abstract JAAS login module",
"isAbstract": true,
"parent": "abstract-jaas-component",
"label": "security,jaas,loginmodule",
"category": ""
},
"entaxy.security.jaas.loginmodule": {
"moduleClassName": "to.be.Replaced"
},
"fields": {
"__objectId": {
"type": "String",
"required": true,
"isHidden": true,
"defaultValue": {
"@CALCULATED": {
"expression": "${properties.realm}.${factoryId}.${properties.classifier}",
"targetPath": "$.objectId",
"removeResolved": true,
"lazy": false
}
}
},
"displayName": {
"required": true,
"defaultValue": {
"@CALCULATED": {
"expression": "${properties.classifier}",
"lazy": false
}
}
},
// "__entaxyContainerId": {
// "type": "String",
// "isHidden": true,
// "required": true,
// "defaultValue": {
// "@CALCULATED": {
// "expression": "${#OWNER#.objectId}",
// "lazy": false
// }
// }
// },
"realm": {
"type": "String",
"required": true,
"isHidden": true,
"defaultValue": {
"@CALCULATED": {
"expression": "${#OWNER#.objectId}",
"lazy": false
}
}
},
"classifier": {
"displayName": "Classifier",
"description": "Unique identifier",
"type": "String",
"required": true,
"immutable": true,
"defaultValue": "main",
"@UNIQUE": {
"filterByParentFieldValues": true
}
},
"className": {
"type": "String",
"group": "general",
"required": true,
"isHidden": true,
"defaultValue": {
"@CALCULATED": {
"lazy": true,
"expression": "${#FACTORY#.#TYPEINFO#.moduleClassName}"
}
}
},
"flags": {
"displayName": "Options",
"description": "Flags for Defining a JAAS Module. <br/> required - Authentication of this login module must succeed. Always proceed to the next login module in this entry, irrespective of success or failure. <br/> requisite - Authentication of this login module must succeed. If success, proceed to the next login module; if failure, return immediately without processing the remaining login modules. <br/> sufficient - Authentication of this login module is not required to succeed. If success, return immediately without processing the remaining login modules; if failure, proceed to the next login module. <br/> optional - Authentication of this login module is not required to succeed. Always proceed to the next login module in this entry, irrespective of success or failure. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"required": true,
"type": "string",
"@TYPEINFO": {
"type": "enum",
"values": ["required", "requisite", "sufficient", "optional"],
"multiple": true
},
"defaultValue": ["optional"]
},
"##publish": {
"type": "Map",
"required": true,
"isHidden": true,
"defaultValue":{
"relation": [
{
"@CALCULATED": {
"expression": "${properties.realm}:entaxy.security.jaas.realm:module:-aggregation:modules",
"lazy": false
}
}
]
}
}
},
"outputs": {
"init": {
"fields": {
"objectId": {
"isHidden": true
},
"__objectId": {},
// "__entaxyContainerId": {},
"className": {},
"realm": {},
"classifier": {},
"flags": {}
},
"scopes": ["public", "private"],
"config": {
"configurable": false
}
}
}
}

View File

@ -0,0 +1,14 @@
{
"factory": {
"id": "abstract-security-component",
"type": "entaxy.security.component",
"description": "",
"isAbstract": true,
"parent": "base-object",
"label": "security",
"category": ""
},
"entaxy.security.component": {},
"fields": {},
"outputs": {}
}

View File

@ -0,0 +1,28 @@
{
"factory": {
"id": "abstract-audit-jaas-login-module",
"type": "entaxy.security.jaas.loginmodule",
"description": "Abstract audit JAAS login module",
"isAbstract": true,
"parent": "abstract-jaas-login-module",
"label": "security,jaas,audit",
"category": ""
},
"entaxy.security.jaas.loginmodule": {},
"fields": {
"module_enabled": {
"displayName": "Module Enabled",
"description": "A Checkbox that activates or deactivates a JAAS security module. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"type": "Boolean",
"required": true,
"defaultValue": false
}
},
"outputs": {
"init": {
"fields": {
"module_enabled": {}
}
}
}
}

View File

@ -0,0 +1,30 @@
{
"factory": {
"id": "eventadmin-audit-jaas-login-module",
"type": "entaxy.security.jaas.loginmodule",
"description": "For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"isAbstract": false,
"parent": "abstract-audit-jaas-login-module",
"label": "",
"category": ""
},
"entaxy.security.jaas.loginmodule": {
"moduleClassName": "org.apache.karaf.jaas.modules.audit.EventAdminAuditLoginModule"
},
"fields": {
"module_topic": {
"type": "String",
"required": true,
"displayName": "Topic",
"description": "A topic defines the event type and acts as a label for categorizing and filtering events. It follows a hierarchical structure (e.g., ru/entaxy/audit/login for login audit events), allowing handlers to subscribe to specific event types for efficient event distribution. For more details see <a target=\"_blank\" href=\"https://felix.apache.org/documentation/subprojects/apache-felix-event-admin.html\">Felix docs</a>",
"defaultValue": "ru/entaxy/audit/login/"
}
},
"outputs": {
"init": {
"fields": {
"module_topic": {}
}
}
}
}

View File

@ -0,0 +1,30 @@
{
"factory": {
"id": "file-audit-jaas-login-module",
"type": "entaxy.security.jaas.loginmodule",
"description": "For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"isAbstract": false,
"parent": "abstract-audit-jaas-login-module",
"label": "",
"category": ""
},
"entaxy.security.jaas.loginmodule": {
"moduleClassName": "org.apache.karaf.jaas.modules.audit.FileAuditLoginModule"
},
"fields": {
"module_file": {
"type": "String",
"required": true,
"displayName": "File",
"description": "The File Audit Login module writes directly to a specified file. By default, it's set to ./data/security/audit.log. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"defaultValue": "./data/security/audit.log"
}
},
"outputs": {
"init": {
"fields": {
"module_file": {}
}
}
}
}

View File

@ -0,0 +1,48 @@
{
"factory": {
"id": "log-audit-jaas-login-module",
"type": "entaxy.security.jaas.loginmodule",
"description": "For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"isAbstract": false,
"parent": "abstract-audit-jaas-login-module",
"label": "",
"category": ""
},
"entaxy.security.jaas.loginmodule": {
"moduleClassName": "org.apache.karaf.jaas.modules.audit.LogAuditLoginModule"
},
"fields": {
"module_logger": {
"type": "String",
"required": true,
"displayName": "Logger name",
"description": "Specifies the name of the logger used for auditing login events. By default, ru.entaxy.audit.Login. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"defaultValue": "ru.entaxy.audit.Login"
},
"module_level": {
"type": "String",
"required": true,
"displayName": "Log level",
"description": "Defines the severity level of the log messages generated during the auditing of login events. Common level include DEBUG, INFO, WARN, ERROR and TRACE. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"defaultValue": "INFO",
"@TYPEINFO": {
"type": "enum",
"values": [
"ERROR",
"WARN",
"INFO",
"DEBUG",
"TRACE"
]
}
}
},
"outputs": {
"init": {
"fields": {
"module_logger": {},
"module_level": {}
}
}
}
}

View File

@ -0,0 +1,21 @@
{
"factory": {
"id": "jaas-login-module-empty",
"type": "entaxy.security.jaas.loginmodule",
"description": "Factory jaas-login-module-empty of entaxy.security.jaas.loginmodule",
"parent": "abstract-jaas-login-module"
},
"entaxy.security.jaas.loginmodule": {},
"fields": {},
"outputs": {
"init": {
"isDefault": true,
"scopes": [
"private"
],
"config": {
"configurable": false
}
}
}
}

View File

@ -0,0 +1,57 @@
{
"factory": {
"id": "jaas-realm",
"type": "entaxy.security.jaas.realm",
"description": "Factory jaas-realm of entaxy.security.jaas.realm",
"parent": "abstract-jaas-component",
"isAbstract": false
},
"entaxy.security.jaas.realm": {},
"fields": {
"objectId": {
"displayName": "Realm name"
},
"rank": {
"displayName": "Rank",
"description": "Specifies an optional rank for resolving naming conflicts between JAAS realms . When two or more JAAS realms are registered under the same name, the OSGi container always picks the realm instance with the highest rank. If you decide to override the default realm, karaf, you should specify a rank of 100 or more, so that it overrides all of the previously installed karaf realms. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"type": "number",
"required": true,
"defaultValue": -1
},
"modules": {
"type": "list",
"group": "modules",
"@TYPEINFO": {
"excludeLabel": true,
"enablePrivateObjectCreation": true,
"privateObjectTypes": [{
"name": "entaxy.security.jaas.loginmodule",
"displayName": "Login Module"
}],
"itemTitle": {
"fields": ["factoryId", "classifier"],
"delimiter": "."
},
"validation": {
"rules": {
"checkUniqueness": {
"fields": ["classifier"]
}
}
}
}
}
},
"outputs": {
"init": {
"isDefault": true,
"fields": {
"rank": {},
"modules": {}
},
"config": {
"configurable": false
}
}
}
}

View File

@ -0,0 +1,102 @@
{
"factory": {
"id": "abstract-real-jaas-login-module-with-backend",
"type": "entaxy.security.jaas.loginmodule",
"description": "",
"isAbstract": true,
"parent": "abstract-real-jaas-login-module",
"label": "",
"category": ""
},
"entaxy.security.jaas.loginmodule": {
"backendFactoryClassName": "to.be.Replaced"
},
"fields": {
"backendEnabled": {
"type": "boolean",
"displayName": "Enable User Management",
"description": "A flag that determines whether user management functionalities are activated within the application. When checked it enables a user management panel in the UI, allowing for the creation, modification, and deletion of user accounts, as well as managing roles and permissions.",
"required": true,
"defaultValue": false
},
"backendFactoryClassName": {
"type": "String",
"required": true,
"isHidden": true,
"defaultValue": {
"@CALCULATED": {
"lazy": false,
"expression": "${#FACTORY#.#TYPEINFO#.backendFactoryClassName}"
}
}
},
"__backendFactory": {
"type": "entaxy.security.jaas.loginmodule",
"__isRef": true,
"required": true,
"isHidden": true,
"__isRefByValueOnly": true,
"@NO_LOOKUP": true,
"@INTERNAL": true,
"defaultValue": {
"type": "entaxy.security.jaas.loginmodule",
"factoryId": "#OWNER#",
"outputType": "backendFactory",
"scope": "private",
"properties": {
"backendEnabled": {
"@CALCULATED": {
"expression": "${#OWNER#.properties.backendEnabled}",
"lazy": false,
"resultType": "boolean",
"allowObjects": false
}
},
"backendFactoryClassName": {
"@CALCULATED": {
"expression": "${#OWNER#.properties.backendFactoryClassName}",
"lazy": false,
"allowObjects": false
}
}
}
}
},
"##publish": {
"defaultValue": {
"backendEnabled": {
"@CALCULATED": {
"lazy": false,
"expression": "${properties.backendEnabled}"
}
}
}
}
},
"outputs": {
"init": {
"fields": {
"backendEnabled": {},
"backendFactoryClassName": {},
"__backendFactory": {}
},
"config": {
"@_SKIP_PROVIDE": false,
"configurable": false
}
},
"backendFactory": {
"fields": {
"backendEnabled": {},
"backendFactoryClassName": {}
},
"config": {
"@SKIP_PUBLISH": true,
"configurable": false
},
"scopes": [
"private"
]
}
}
}

View File

@ -0,0 +1,39 @@
{
"factory": {
"id": "abstract-real-jaas-login-module",
"type": "entaxy.security.jaas.loginmodule",
"description": "",
"isAbstract": true,
"parent": "abstract-jaas-login-module",
"label": "",
"category": ""
},
"entaxy.security.jaas.loginmodule": {},
"fields": {
"module_detailed.login.exception": {
"description": "Enabled detailed error messages for failed login attempts. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"type": "Boolean",
"required": false,
"displayName": "Use Detailed Login Exceptions"
}
},
"outputs": {
"init": {
"fields": {
"module_detailed.login.exception": {},
"@IMPORT": [{
"sourceFactoryId": "jaas-login-module-components",
"location": "outputs.encryption.fields",
"prefix": ""
},
{
"sourceFactoryId": "jaas-login-module-components",
"location": "outputs.jasypt.fields",
"prefix": ""
}
]
}
}
}
}

View File

@ -0,0 +1,139 @@
{
"factory": {
"id": "jaas-login-module-components",
"type": "entaxy.security.jaas.loginmodule.components",
"description": "",
"isAbstract": true,
"parent": "abstract-jaas-login-module",
"label": "",
"category": ""
},
"entaxy.security.jaas.loginmodule.components": {},
"fields": {},
"outputs": {
"encryption": {
"isDefault": false,
"generator": "",
"config": {},
"fields": {
"encryption_enabled": {
"displayName": "Encryption Enabled",
"description": "Set to true, to enable password encryption. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"type": "Boolean",
"group": "encryption",
"required": true,
"defaultValue": false
},
"encryption_name": {
"displayName": "Encryption Name",
"description": "Name of the encryption service, which has been registered as an OSGi service. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"type": "String",
"group": "encryption",
"required": true,
"condition": "${encryption_enabled}",
"@TYPEINFO": {
"type": "enum",
"values": [
"basic",
"jasypt"
]
},
"defaultValue": "basic"
},
"encryption_prefix": {
"displayName": "Encryption Prefix",
"description": "Prefix for encrypted passwords. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"type": "String",
"group": "encryption",
"required": true,
"condition": "${encryption_enabled}",
"defaultValue": "{CRYPT}"
},
"encryption_suffix": {
"displayName": "Encryption Suffix",
"description": "Suffix for encrypted passwords. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"type": "String",
"group": "encryption",
"required": true,
"condition": "${encryption_enabled}",
"defaultValue": "{CRYPT}"
},
"encryption_algorithm": {
"displayName": "Encryption Algorithm",
"description": "Specifies the name of the encryption algorithm — for example, MD5 or SHA-1. You can specify one of the following encryption algorithms: MD2/MD5/SHA-1/SHA-256/SHA-384/SHA-512. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"type": "String",
"group": "encryption",
"required": true,
"condition": "${encryption_enabled}",
"@TYPEINFO": {
"type": "enum",
"values": [
"MD2",
"MD5",
"SHA-1",
"SHA-256",
"SHA-384",
"SHA-512"
]
},
"defaultValue": "MD5"
},
"encryption_encoding": {
"displayName": "Encryption Encoding",
"description": "Encrypted passwords encoding: hexadecimal or base64. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"type": "String",
"group": "encryption",
"required": true,
"condition": "${encryption_enabled}",
"@TYPEINFO": {
"type": "enum",
"values": [
"hexadecimal",
"base64"
]
},
"defaultValue": "hexadecimal"
}
}
},
"jasypt": {
"fields": {
"encryption_providerName": {
"displayName": "Encryption Provider Name",
"description": "Name of the java.security. Provider instance that is to provide the digest algorithm. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"type": "String",
"group": "jasypt",
"required": false
},
"encryption_providerClassName": {
"displayName": "Encryption Provider Class Name",
"description": "Class name of the security provider that is to provide the digest algorithm. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"type": "String",
"group": "jasypt",
"required": false
},
"encryption_iterations": {
"displayName": "Encryption Iterations",
"description": "Number of times to apply the hash function recursively. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"type": "Number",
"group": "jasypt",
"required": false
},
"encryption_saltSizeBytes": {
"displayName": "Encryption Salt Size Bytes",
"description": "Size of the salt used to compute the digest. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"type": "Number",
"group": "jasypt",
"required": false
},
"encryption_saltGeneratorClassName": {
"displayName": "Encryption Salt Generator Class Name",
"description": "Class name of the salt generator. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"type": "String",
"group": "jasypt",
"required": false
}
}
}
}
}

View File

@ -0,0 +1,14 @@
{
"factory": {
"id": "jdbc-jaas-login-module",
"type": "entaxy.security.jaas.loginmodule",
"description": "JDBC login module. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"isAbstract": false,
"parent": "abstract-real-jaas-login-module",
"label": "",
"category": ""
},
"entaxy.security.jaas.loginmodule": {},
"fields": {},
"outputs": {}
}

View File

@ -0,0 +1,21 @@
{
"factory": {
"id": "kerberos-jaas-login-module",
"type": "entaxy.security.jaas.loginmodule",
"description": "Kerberos login module. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"parent": "abstract-real-jaas-login-module",
"label": "",
"category": ""
},
"entaxy.security.jaas.loginmodule": {},
"fields": {},
"outputs": {
"init": {
"fields": {
"module_detailed.login.exception": {
"isHidden": true
}
}
}
}
}

View File

@ -0,0 +1,217 @@
{
"factory": {
"id": "ldap-jaas-login-module",
"type": "entaxy.security.jaas.loginmodule",
"description": "LDAP login module. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"isAbstract": false,
"parent": "abstract-real-jaas-login-module",
"label": "",
"category": ""
},
"entaxy.security.jaas.loginmodule": {
"moduleClassName": "org.apache.karaf.jaas.modules.ldap.LDAPLoginModule",
"#backendFactoryClassName": "org.apache.karaf.jaas.modules.properties.PropertiesBackingEngineFactory"
},
"fields": {
"connection_protocol": {
"type": "String",
"required": true,
"displayName": "Connection Protocol",
"description": "Defines the protocol (http or https) to be used. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"@TYPEINFO": {
"type": "enum",
"values": [
"ldap",
"ldaps"
]
},
"defaultValue": "ldap",
"group": "connection"
},
"connection_host": {
"type": "String",
"description": "The address of the LDAP server. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"required": true,
"displayName": "Connection Host",
"defaultValue": "localhost",
"group": "connection"
},
"connection_port": {
"type": "Number",
"description": "The port number used to connect to the LDAP server. For LDAP Active Directory or OpenLDAP port is typically 389 for LDAP connections and 636 for LDAPS connections. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"required": true,
"displayName": "Connection Port",
"defaultValue": 10389,
"group": "connection"
},
"connection_url": {
"type": "String",
"required": true,
"isHidden": true,
"@INTERNAL": true,
"defaultValue": {
"@CALCULATED": {
"lazy": false,
"expression": "${properties.connection_protocol}://${properties.connection_host}:${properties.connection_port}",
"targetPath": "properties/module_connection.url",
"removeResolved": true
}
},
"group": "connection"
},
"module_connection.username": {
"type": "String",
"description": "The distinguished name (DN) or user identifier used to authenticate when connecting to the LDAP server. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"required": true,
"displayName": "Username",
"group": "connection"
},
"module_connection.password": {
"type": "password",
"description": "The corresponding password for the provided username, used to authenticate the connection to the LDAP server. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"required": true,
"displayName": "Password",
"group": "connection"
},
"module_authentication": {
"type": "String",
"description": "Authentication protocol: simple - implies that user credentials are supplied, and you are obliged to set the connection.username and connection.password options in this case. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"required": true,
"displayName": "Module Authentication",
"@TYPEINFO": {
"type": "enum",
"values": [
"simple"
]
},
"defaultValue": "simple",
"group": "connection"
},
"module_ssl": {
"description": "Enabled SSL encryption. When checked, the connection will use LDAPS (typically on port 636). For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"type": "Boolean",
"displayName": "Use SSL",
"group": "ssl"
},
"module_ssl.provider": {
"type": "String",
"displayName": "Provider",
"description": "The provider name to use for SSL. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"group": "ssl"
},
"module_ssl.protocol": {
"type": "String",
"displayName": "Protocol",
"description": "The protocol name to use for SSL (SSL for example). For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"group": "ssl"
},
"module_ssl.algorithm": {
"type": "String",
"displayName": "Algorithm",
"description": "The algorithm to use for the KeyManagerFactory and TrustManagerFactory (PKIX for example). For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"group": "ssl"
},
"module_ssl.keystore": {
"type": "String",
"displayName": "Keystore",
"description": "The key store name to use for SSL. The key store must be deployed using a jaas:keystore configuration. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"group": "ssl"
},
"module_ssl.keyalias": {
"type": "String",
"displayName": "Alias",
"description": "The key alias to use for SSL. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"group": "ssl"
},
"module_ssl.truststore": {
"type": "String",
"displayName": "Truststore",
"description": "The trust store name to use for SSL. The trust store must be deployed using a jaas:keystore configuration. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"group": "ssl"
},
"module_user.base.dn": {
"type": "String",
"required": true,
"displayName": "User base DN",
"description": "The LDAP base DN used to looking for user, e.g. ou=user,dc=apache,dc=org. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"group": "lookup"
},
"module_user.filter": {
"type": "String",
"required": true,
"displayName": "User filter",
"description": "The LDAP filter used to looking for user, e.g. (uid=%u) where %u will be replaced by the username. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"defaultValue": "(uid=%u)",
"group": "lookup"
},
"module_user.search.subtree": {
"type": "Boolean",
"required": true,
"displayName": "Search user in subtree",
"description": "If 'true', the user lookup will be recursive (SUBTREE). If 'false', the user lookup will be performed only at the first level (ONELEVEL). For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"defaultValue": true,
"group": "lookup"
},
"module_role.base.dn": {
"type": "String",
"required": true,
"displayName": "Role base DN",
"description": "The LDAP base DN used to looking for roles, e.g. ou=role,dc=apache,dc=org. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"group": "lookup"
},
"module_role.filter": {
"type": "String",
"required": true,
"displayName": "Role filter",
"description": "The LDAP filter used to looking for users role, e.g. (member:=uid=%u). For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"defaultValue": "(member:=uid=%u)",
"group": "lookup"
},
"module_role.name.attribute": {
"type": "String",
"required": true,
"displayName": "Role name attribute",
"description": "The LDAP role attribute containing the role string used by Karaf, e.g. cn. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"defaultValue": "cn",
"group": "lookup"
},
"module_role.search.subtree": {
"type": "Boolean",
"required": true,
"displayName": "Search user in subtree",
"description": "If 'true', the role lookup will be recursive (SUBTREE). If 'false', the role lookup will be performed only at the first level (ONELEVEL). For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"defaultValue": true,
"group": "lookup"
},
"module_role.mapping": {
"type": "String",
"displayName": "Role mapping",
"description": "Define a mapping between roles defined in the LDAP directory for the user, and corresponding roles in Karaf. The format is ldapRole1=karafRole1,karafRole2;ldapRole2=karafRole3,karafRole4. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"defaultValue": "",
"group": "lookup"
},
"module_initial.context.factory": {
"type": "String",
"displayName": "Context factory",
"description": "Define the initial context factory used to connect to the LDAP server. The default is com.sun.jndi.ldap.LdapCtxFactory. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"group": "others"
},
"module_ignorePartialResultException": {
"type": "Boolean",
"displayName": "Ignore partial result exception",
"description": "Workaround for Active Directory servers not handling referrals correctly. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"group": "others"
}
},
"outputs": {
"init": {
"fields": {
"@IMPORT": [{
"sourceFactoryId": "#",
"location": "fields",
"prefix": ""
}]
}
}
}
}

View File

@ -0,0 +1,13 @@
{
"factory": {
"id": "osgi-jaas-login-module",
"type": "entaxy.security.jaas.loginmodule",
"description": "OSGi login module. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"parent": "abstract-real-jaas-login-module",
"label": "",
"category": ""
},
"entaxy.security.jaas.loginmodule": {},
"fields": {},
"outputs": {}
}

View File

@ -0,0 +1,31 @@
{
"factory": {
"id": "properties-jaas-login-module",
"type": "entaxy.security.jaas.loginmodule",
"description": "For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"isAbstract": false,
"parent": "abstract-real-jaas-login-module-with-backend",
"label": "",
"category": ""
},
"entaxy.security.jaas.loginmodule": {
"moduleClassName": "org.apache.karaf.jaas.modules.properties.PropertiesLoginModule",
"backendFactoryClassName": "org.apache.karaf.jaas.modules.properties.PropertiesBackingEngineFactory"
},
"fields": {
"module_users": {
"displayName": "File Location",
"description": "Specifies the path to the properties file (By default it is set to - ./etc/users.properties.) as storage for the users, groups, roles and passwords. By default, ru.entaxy.audit.Login. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"type": "String",
"required": true,
"defaultValue": "./etc/users.properties"
}
},
"outputs": {
"init": {
"fields": {
"module_users": {}
}
}
}
}

View File

@ -0,0 +1,31 @@
{
"factory": {
"id": "publickey-jaas-login-module",
"type": "entaxy.security.jaas.loginmodule",
"description": "For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"isAbstract": false,
"parent": "abstract-real-jaas-login-module-with-backend",
"label": "",
"category": ""
},
"entaxy.security.jaas.loginmodule": {
"moduleClassName": "org.apache.karaf.jaas.modules.publickey.PublickeyLoginModule",
"backendFactoryClassName": "org.apache.karaf.jaas.modules.publickey.PublickeyBackingEngineFactory"
},
"fields": {
"module_users": {
"displayName": "File Location",
"description": "Specifies the path to the properties file containing public key information for authentication. By default, it is set to ./etc/keys.properties. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"type": "String",
"required": true,
"defaultValue": "./etc/keys.properties"
}
},
"outputs": {
"init": {
"fields": {
"module_users": {}
}
}
}
}

View File

@ -0,0 +1,31 @@
{
"factory": {
"id": "resource-jaas-login-module",
"type": "entaxy.security.jaas.loginmodule",
"description": "For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"isAbstract": false,
"parent": "abstract-real-jaas-login-module-with-backend",
"label": "",
"category": ""
},
"entaxy.security.jaas.loginmodule": {
"moduleClassName": "ru.entaxy.platform.runtime.security.jaas.modules.resources.ResourceLoginModule",
"backendFactoryClassName": "ru.entaxy.platform.runtime.security.jaas.modules.resources.ResourceBackingEngineFactory"
},
"fields": {
"module_users": {
"displayName": "Users Resource",
"description": "Specifies the resource location of the properties file (By default it is set to - ./etc/users.properties.) as storage for the users, groups, roles and passwords. For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"type": "String",
"required": true,
"defaultValue": "entaxy-file-internal:.security/users.properties"
}
},
"outputs": {
"init": {
"fields": {
"module_users": {}
}
}
}
}

View File

@ -0,0 +1,21 @@
{
"factory": {
"id": "syncope-jaas-login-module",
"type": "entaxy.security.jaas.loginmodule",
"description": "For more details see <a target=\"_blank\" href=\"https://docs.entaxy.ru/entaxy-core/${project.version}/core/security/security-jaas.html\">Entaxy docs</a> and <a target=\"_blank\" href=\"https://karaf.apache.org/manual/latest/security\">Karaf docs</a>",
"parent": "abstract-real-jaas-login-module",
"label": "",
"category": ""
},
"entaxy.security.jaas.loginmodule": {},
"fields": {},
"outputs": {
"init": {
"fields": {
"module_detailed.login.exception": {
"isHidden": true
}
}
}
}
}

View File

@ -0,0 +1,37 @@
[#ftl attributes={"generated.type":"blueprint.fragment"}]
[#--
~~~~~~licensing~~~~~~
factory-provider-archetype
==========
Copyright (C) 2020 - 2021 EmDev LLC
==========
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
~~~~~~/licensing~~~~~~
--]
[#import "templates:object-commons/common-utils.ftl" as utils]
[#if properties.flags??]
[#assign options = "flags=\"" + properties.flags?join(" ") + "\""]
[#else]
[#assign options = ""]
[/#if]
<jaas:module name="[=objectId]" className="[=properties.className]"
[=options] xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.1.0">
<![CDATA[
entaxy.id=[=objectId]
[=utils.createPropertiesFileData(properties, "module_", true, "", [])]
[=utils.createPropertiesFileData(properties, "encryption_", true, "encryption.", [])]
]]>
</jaas:module>

View File

@ -0,0 +1,9 @@
[#ftl attributes={"generated.type":"blueprint.fragment"}]
[#if properties.backendEnabled??]
[#if properties.backendEnabled]
<service interface="org.apache.karaf.jaas.modules.BackingEngineFactory">
<bean class="[=properties.backendFactoryClassName]"/>
</service>
[/#if]
[/#if]

View File

@ -0,0 +1,42 @@
[#ftl attributes={"generated.type":"blueprint.fragment"}]
[#--
~~~~~~licensing~~~~~~
factory-provider-archetype
==========
Copyright (C) 2020 - 2021 EmDev LLC
==========
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
~~~~~~/licensing~~~~~~
--]
<!--
factoryId: jaas-login-module-empty
factoryType: entaxy.security.jaas.loginmodule
outputType: init
-->
<jaas:module className="org.apache.karaf.jaas.modules.properties.PropertiesLoginModule"
flags="required" xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.1.0">
users =./etc/entaxy-users.properties
encryption.enabled = true
encryption.name = jasypt
encryption.algorithm = SHA-256
encryption.encoding = base64
encryption.iterations = 100000
encryption.saltSizeBytes = 16
encryption.prefix = {CRYPT}
encryption.suffix = {CRYPT}
</jaas:module>

View File

@ -0,0 +1,39 @@
[#ftl attributes={"generated.type":"blueprint"}]
[#--
~~~~~~licensing~~~~~~
factory-provider-archetype
==========
Copyright (C) 2020 - 2021 EmDev LLC
==========
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
~~~~~~/licensing~~~~~~
--]
<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
xmlns:jaas="http://karaf.apache.org/xmlns/jaas/v1.1.0"
xmlns:ext="http://aries.apache.org/blueprint/xmlns/blueprint-ext/v1.0.0">
<!--
factoryId: jaas-realm
factoryType: entaxy.security.jaas.realm
outputType: init
-->
<jaas:config name="[=objectId]" rank="[=properties.rank?c]">
</jaas:config>
</blueprint>

View File

@ -0,0 +1,175 @@
ЛИЦЕНЗИЯ ОГРАНИЧЕННОГО ПРИМЕНЕНИЯ
Настоящий документ устанавливает для Пользователя условия применения Базовой (некоммерческой)
версии лицензии для пробного использования программного обеспечения ENTAXY, принадлежащего
Правообладателю Обществу с ограниченной ответственностью "ЕМДЕВ" (ОГРН 1057810026658, ИНН
7813313860, юридический адрес: 197022, Россия, г. Санкт-Петербург, ул. Профессора Попова,
д. 23, литера В, помещение 3Н), расположенной в сети Интернет по адресу
https://www.emdev.ru/about (далее - Компания).
Используя или получая доступ к Программному обеспечению, или нажав «Я согласен с Условиями»
(или аналогичную кнопку или флажок) после загрузки или установки Программного обеспечения,
Пользователь выражает свое согласие на обязательность условий и ограничений, изложенных в
настоящем документе, в противном случае, он должен не использовать или не получать доступ
к Программному обеспечению.
1. ТЕРМИНЫ И ОПРЕДЕЛЕНИЯ
a) ПО Программное обеспечение, интеграционная шина «ЭНТАКСИ» (ENTAXY) в любой ее версии
или редакции, исключительные права на которую принадлежат Правообладателю.
b) Правообладатель (Компания) ООО «ЕМДЕВ», ОГРН 1057810026658, ИНН 7813313860, исключительные
права которого подтверждаются Свидетельством о государственной регистрации в Реестре программ
для ЭВМ № 2021610848 от 19.01.2021 года.
c) Пользователь юридическое или физическое лицо, получившее через скачивание с сайта
https://entaxy.ru или иным образом, дистрибутив ПО, пользующееся ПО.
d) ИС интеллектуальная собственность закреплённое законом исключительное право, а также
личные неимущественные права авторов произведений на результат интеллектуальной деятельности.
e) Подписка это коммерческое предложение Правообладателя, состоящее из Лицензии на использование
ПО и доступа к технической поддержке программного обеспечения на срок Подписки. Подписка
включает предоставление Пользователю неисключительного права использования ПО, в том числе
получение обновлений функционала ПО и безопасности ПО, исправление ошибок ПО и получение
патчей с обновлениями и исправлениями программного обеспечения. Подписка приобретается
Пользователем на период времени, указанный в Сертификате. Количество подписок устанавливается
для каждого Пользователя индивидуально в Сертификате.
f) Сертификат документ, выдаваемый Дистрибъютором или Авторизованным партнёром (Партнёром),
подтверждающий факт приобретения физическим или юридическим лицом Подписки на программное
обеспечение в ограниченном объёме и на определённый период времени.
g) Лицензия (простая (неисключительная) совокупность ограниченных прав использования ПО,
предоставленных Пользователю согласно условиям Подписки.
h) Библиотека совокупность подпрограмм и объектов, используемых для разработки программного
обеспечения.
i) Исходный код текст компьютерной программы на каком-либо языке программирования, состоящий
из одного или нескольких файлов, который может быть прочтён человеком.
j) Объектный код файл (часть машинного кода) с промежуточным представлением отдельного модуля
программы, полученный в результате обработки исходного кода, еще не связанный в полную программу.
Это машинный код для одной конкретной библиотеки или модуля, который будет составлять готовый
продукт.
k) Некоммерческое использование индивидуальное личное использование Пользователем программного
обеспечения с целью обучения работе с Программным обеспечением, для оценки или демонстрации
возможностей Программного обеспечения, при котором, Пользователем не извлекается коммерческая
выгода и/или не идёт в доход денежное вознаграждение при использовании Программного обеспечения.
2. ДОПУСТИМЫЕ СПОСОБЫ ИСПОЛЬЗОВАНИЯ ПРОГРАММНОГО ОБЕСПЕЧЕНИЯ
2.1. Правообладатель предоставляет Пользователю ограниченное право использования Программного
обеспечения на условиях простой (неисключительной) лицензии в объёме, ограниченном правом
воспроизведения полной рабочей версии программного обеспечения, новых версий программного обеспечения
в памяти оборудования и его запуска на оборудовании в соответствии со ст. 1280 ГК РФ.
2.2. Право на использование Программного обеспечения, предоставляемое Пользователю, носит
неисключительный характер.
2.3. Пользователю предоставляется всемирная, неисключительная, не подлежащая сублицензированию,
лицензия на ограниченное использование Программного обеспечения.
2.4. Пользователь, имеющий Базовую (некоммерческую) версию лицензии для пробного использования
имеет право приобрести Подписку на программное обеспечение. В этом случае Пользователь обязан
обратиться в службу поддержки Правообладателя по адресу: https://entaxy.ru/ для изменения
вида лицензии с Базовой бесплатной версии на Подписки.
2.5. Срок использования скачанной Пользователем базовой (некоммерческой) версии лицензии для
пробного использования программного обеспечения не ограничен.
2.6. Использование Пользователем настоящего программного обеспечения в целях разработки,
модификации, обновления другого ПО, принадлежащего третьим лицам, а не Правообладателю,
без разрешения Правообладателя не допускается.
3. АВТОРСКОЕ ПРАВО.
3.1. Все авторские права, все права интеллектуальной собственности на Программное обеспечение
и любые его копии принадлежат Правообладателю.
3.2. Все авторские права, все права интеллектуальной собственности в отношении любого контента,
к которому можно получить доступ с помощью Программного обеспечения, является собственностью
соответствующего владельца контента и защищается применимым законодательством об авторском
праве или другими законами и договорами об интеллектуальной собственности.
3.3. Условия использования Программного обеспечения.
Лицензия, предоставленная Пользователю, действительна только в том случае, если Пользователь
придерживается следующих условий:
3.3.1. Принятие уведомлений об авторских правах. Пользователю запрещается удалять или изменять
какие-либо уведомления об авторских правах или лицензиях, которые появляются при использовании
Программного обеспечения или на нем.
3.3.2. Модификация. Пользователю запрещается модифицировать, изменять, декомпилировать,
расшифровывать, дизассемблировать, переводить или реверсировать, перепроектировать
Программное обеспечение.
3.3.3. Распространение. Пользователю запрещается сублицензировать, передавать право использования
ПО или иным образом распространять или предоставлять Программное обеспечение любой третьей стороне.
3.3.4. SaaS. За исключением случаев, когда это разрешено Правообладателем, Пользователю запрещено
использовать Программное обеспечение в коммерческих целях для оказания услуг третьим лицам.
4. ОТВЕТСТВЕННОСТЬ ПРАВООБЛАДАТЕЛЯ ПРИ НАРУШЕНИИ ПОЛЬЗОВАТЕЛЕМ ПРАВ «ИС»
4.1. Правообладатель не несет никаких обязательств в отношении каких-либо претензий к Пользователю
на предмет нарушения последним прав Интеллектуальной собственности, возникших в связи с
использованием Пользователем:
4.1.1. Любых компонентов программного обеспечения с открытым исходным кодом, включенных в
Программное обеспечение;
4.1.2. Любого нарушения правил использования Программного обеспечения, установленного условиями
настоящего соглашения;
4.1.3. Любого использования Программного обеспечения в сочетании с другими ПО, оборудованием,
или данными, не предоставленными Пользователю Правообладателем;
4.1.4. Любого изменения Программного обеспечения любым третьим лицом, а не Правообладателем.
5. НАСТОЯЩИМ ПРАВООБЛАДАТЕЛЬ ЗАЯВЛЯЕТ, ЧТО ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ ПРЕДОСТАВЛЯЕТСЯ ПОЛЬЗОВАТЕЛЮ
ПО ПРИНЦИПУ «AS IS» - «КАК ЕСТЬ». НИ ПРИ КАКИХ ОБСТОЯТЕЛЬСТВАХ ПРАВООБЛАДАТЕЛЬ НЕ ГАРАНТИРУЕТ
И НЕ ОБЕЩАЕТ, ЧТО ПРЕДОСТАВЛЕННОЕ ИМ ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ БУДЕТ ПОДХОДИТЬ ИЛИ НЕ ПОДХОДИТЬ
ДЛЯ КОНКРЕТНЫХ ЦЕЛЕЙ ПОЛЬЗОВАТЕЛЯ, ЧТО ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ БУДЕТ ОТВЕЧАТЬ ВСЕМ КОММЕРЧЕСКИМ
И ЛИЧНЫМ СУБЪЕКТИВНЫМ ОЖИДАНИЯМ ПОЛЬЗОВАТЕЛЯ, ЧТО ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ БУДЕТ РАБОТАТЬ
ИСПРАВНО, БЕЗ ТЕХНИЧЕСКИХ ОШИБОК, БЫСТРО И БЕСПЕРЕБОЙНО.
6. ОГРАНИЧЕНИЕ ОТВЕТСТВЕННОСТИ.
НИ ПРИ КАКИХ ОБСТОЯТЕЛЬСТВАХ ПРАВООБЛАДАТЕЛЬ ИЛИ ЕГО АФФИЛЛИРОВАННЫЕ ЛИЦА НЕ НЕСУТ ПЕРЕД ПОЛЬЗОВАТЕЛЕМ
ОТВЕТСТВЕННОСТИ ЗА ЛЮБЫЕ ПРЯМЫЕ ИЛИ КОСВЕННЫЕ УБЫТКИ ПОЛЬЗОВАТЕЛЯ, ЕГО РАСХОДЫ ИЛИ РЕАЛЬНЫЙ УЩЕРБ,
ВКЛЮЧАЯ, ПОМИМО ПРОЧЕГО, ПРОСТОИ; УТРАТУ БИЗНЕСА; УПУЩЕННУЮ ВЫГОДУ; НЕДОПОЛУЧЕННУЮ ПРИБЫЛЬ;
ПОТЕРЮ ИЛИ ПОВРЕЖДЕНИЕ ДАННЫХ, ИМУЩЕСТВА И ИНОЕ.
ОГРАНИЧЕНИЯ ПРИМЕНЯЮТСЯ НЕЗАВИСИМО ОТ ОСНОВАНИЯ НАСТУПЛЕНИЯ ОТВЕТСТВЕННОСТИ; В ТОМ ЧИСЛЕ ВСЛЕДСТВИЕ
ДЕЙСТВИЯ ИЛИ БЕЗДЕЙСТВИЯ, НЕБРЕЖНОСТИ, УМЫСЛА, ПРЯМОГО ИЛИ КОСВЕННОГО; НЕОСТОРОЖНОСТИ; ЗАБЛУЖДЕНИЯ;
КЛЕВЕТЫ; НАРУШЕНИЯ КОНФИДЕНЦИАЛЬНОСТИ ИЛИ ПРАВА ИНТЕЛЛЕКТУАЛЬНОЙ СОБСТВЕННОСТИ; ИЛИ ЛЮБОЕ ДРУГОЕ
ОСНОВАНИЕ НАСТУПЛЕНИЯ ОТВЕТСТВЕННОСТИ.
7. ОБЯЗАННОСТЬ ПОЛЬЗОВАТЕЛЯ:
Не осуществлять самостоятельно и (или) с привлечением третьих лиц нижеследующие действия
(включая, но не ограничиваясь) по:
-дизассемблированию и (или) декомпилированию (преобразованию объектного кода в исходный код)
Программного обеспечения;
-модификации Программного обеспечения, в том числе вносить изменения в объектный код, исходный
код Программного обеспечения, за исключением тех изменений, которые вносятся средствами,
включёнными в Программное обеспечение и описанными непосредственно в документации к нему;
-созданию условий для использования Программного обеспечения лицами, не имеющими прав на
использование данного Программного обеспечения, включая (но не ограничиваясь) вмешательство
третьих лиц в функционирование Программного обеспечения, предоставление третьим лицам доступа
к исследованию и (или) замене настроек Программного обеспечения, включая его первичную установку;
-распространению Программного обеспечения в целом или в части (включая приложенную к нему документацию).
8. БИБЛИОТЕКА ПО. ИСПОЛЬЗУЕМЫЕ ПРОГРАММНЫЕ СРЕДСТВА.
8.1. Настоящим, Правообладатель заверяет, что Библиотека программного обеспечения состоит из
лицензионных продуктов, используемых на законных основаниях, а
именно https://entaxy.ru/libs/licenses/root-aggregated.deps.
8.2. Любые программные средства, применяемые Пользователем при работе с ПО, должны быть
совместимы с библиотекой ПО, указанной в п.8.1. настоящего соглашения.
8.3. Перечень внешних модулей ПО, указанный в п.8.1 настоящего соглашения, может изменяться
Правообладателем в одностороннем порядке, в зависимости от выпуска релизов программного обеспечения,
содержащих все изменения и дополнения программного обеспечения.
9. ВНЕСЕНИЕ ИЗМЕНЕНИЙ В ПРОГРАММНОЕ ОБЕСПЕЧЕНИЕ.
9.1. Программное обеспечение, интеграционная шина «ЭНТАКСИ» (ENTAXY) является свободно распространяемым
программным обеспечением.
9.2. Пользователь имеет право вносить изменения в исходный код программного обеспечения исключительно
с согласия Правообладателя в порядке предложения изменений/правок/дополнений через механизм
«Pull Requests» в открытом репозитории Правообладателя по адресу: https://git.entaxy.ru/entaxy/entaxy-public.
9.3. Любые изменения программного обеспечения, осуществляемые Пользователем без соблюдения условий
пункта 9.2. настоящего документа, являются нарушением авторских и смежных прав Правообладателя,
прав интеллектуальной собственности Правообладателя и влекут применение к Пользователю мер
ответственности в соответствии с условиями настоящей Лицензии, а также применимого законодательства
Российской Федерации.
10. ЗАКЛЮЧИТЕЛЬНЫЕ ПОЛОЖЕНИЯ.
10.1. В случае нарушения Пользователем любого из условий настоящей Лицензии, Правообладатель имеет
право взыскать с Пользователя любые причинённые таким нарушением убытки, реальный ущерб,
недополученную прибыль, упущенную выгоду, а также в случае нарушения Пользователем условий
пункта 9.2 настоящего соглашения, в том числе, взыскать с Пользователя штраф в размере
2 000 000 (Два миллиона) рублей за каждый установленный случай несанкционированного изменения
исходного или объектного кода Программного обеспечения «Энтакси» (Entaxy).
10.2. В рамках исполнения Пользователем обязательств по настоящей Лицензии, применимое
законодательство Российской Федерации.
10.3. Если какое-либо положение настоящей Лицензии будет признано судом недействительным,
остальные положения будут продолжать своё действие, а Пользователь будет обязан продолжать
исполнять свои обязанности в соответствии с этими положениями.

View File

@ -0,0 +1,44 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ru.entaxy.platform.security</groupId>
<artifactId>jaas</artifactId>
<version>1.10.0</version>
</parent>
<groupId>ru.entaxy.platform.security.jaas</groupId>
<artifactId>jaas-runtime</artifactId>
<packaging>bundle</packaging>
<properties>
<bundle.osgi.export.pkg>
ru.entaxy.platform.runtime.security.jaas,
ru.entaxy.platform.runtime.security.jaas.modules.resources,
ru.entaxy.platform.runtime.security.jaas.utils
</bundle.osgi.export.pkg>
</properties>
<dependencies>
<dependency>
<groupId>ru.entaxy.esb.platform.runtime.core.initializer</groupId>
<artifactId>init-manager</artifactId>
<version>${project.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.platform.runtime.core</groupId>
<artifactId>artifact-management</artifactId>
<version>${project.version}</version>
</dependency>
<dependency>
<groupId>org.apache.karaf.jaas</groupId>
<artifactId>org.apache.karaf.jaas.modules</artifactId>
<version>${karaf.version}</version>
</dependency>
<dependency>
<groupId>ru.entaxy.esb.platform.runtime.base.resources</groupId>
<artifactId>resources-api</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>
</project>

View File

@ -0,0 +1,146 @@
/*-
* ~~~~~~licensing~~~~~~
* jaas-runtime
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.runtime.security.jaas;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import javax.security.auth.login.AppConfigurationEntry;
import org.apache.karaf.jaas.boot.ProxyLoginModule;
import org.apache.karaf.jaas.config.JaasRealm;
import org.apache.karaf.jaas.modules.BackingEngine;
import org.apache.karaf.jaas.modules.BackingEngineFactory;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.service.component.annotations.ReferencePolicy;
import org.osgi.service.component.annotations.ReferencePolicyOption;
import ru.entaxy.platform.base.support.CommonUtils;
@Component(service = JaasHelper.class, immediate = true)
public class JaasHelper {
static private JaasHelper INSTANCE;
static public JaasHelper getInstance() {
return INSTANCE;
}
@Activate
public void activate() {
INSTANCE = this;
}
@Reference(cardinality = ReferenceCardinality.MULTIPLE,
policyOption = ReferencePolicyOption.GREEDY)
List<BackingEngineFactory> engineFactories;
Map<String, List<JaasRealm>> realms = new HashMap<>();
Object realmsLock = new Object();
@Reference(cardinality = ReferenceCardinality.MULTIPLE, policyOption = ReferencePolicyOption.GREEDY,
policy = ReferencePolicy.DYNAMIC, unbind = "unbindRealm")
public void bindRealm(JaasRealm realm) {
synchronized (realmsLock) {
if (!realms.containsKey(realm.getName()))
realms.put(realm.getName(), new ArrayList<>());
List<JaasRealm> list = realms.get(realm.getName());
if (!list.contains(realm))
list.add(realm);
Collections.sort(list, new Comparator<JaasRealm>() {
@Override
public int compare(JaasRealm o1, JaasRealm o2) {
// sort in reverse order: max is the first, min is the last
if (o1.getRank() > o2.getRank())
return -1;
if (o1.getRank() < o2.getRank())
return 1;
return 0;
}
});
realms.put(realm.getName(), list);
}
}
public void unbindRealm(JaasRealm realm) {
synchronized (realmsLock) {
if (!realms.containsKey(realm.getName()))
return;
realms.get(realm.getName()).remove(realm);
}
}
public JaasRealm getRealm(String name) {
if (!realms.containsKey(name))
return null;
List<JaasRealm> list = realms.get(name);
if (list.isEmpty())
return null;
return list.get(0);
}
public AppConfigurationEntry getEntry(String realmName, String moduleName) {
JaasRealm realm = getRealm(realmName);
if (realm == null)
return null;
AppConfigurationEntry[] entries = realm.getEntries();
if (entries == null)
return null;
for (AppConfigurationEntry entry : entries) {
String entaxyId = (String) entry.getOptions().get("entaxy.id");
if (!CommonUtils.isValid(entaxyId))
continue;
if (entaxyId.trim().equals(moduleName))
return entry;
}
return null;
}
public BackingEngine getBackingEngine(String realmName, String moduleName) {
AppConfigurationEntry entry = getEntry(realmName, moduleName);
if (entry == null)
return null;
for (BackingEngineFactory factory : engineFactories) {
String loginModuleClass = (String) entry.getOptions().get(ProxyLoginModule.PROPERTY_MODULE);
if (factory.getModuleClass().equals(loginModuleClass)) {
return factory.build(entry.getOptions());
}
}
return null;
}
}

View File

@ -0,0 +1,166 @@
/*-
* ~~~~~~licensing~~~~~~
* jaas-runtime
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.runtime.security.jaas;
import java.io.File;
import java.io.IOException;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.Map.Entry;
import org.apache.felix.utils.properties.Properties;
import org.osgi.service.component.ComponentContext;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.service.component.annotations.ReferencePolicy;
import org.osgi.service.component.annotations.ReferencePolicyOption;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.esb.platform.runtime.core.initializer.api.AbstractStandaloneInitializer;
import ru.entaxy.esb.platform.runtime.core.initializer.api.Initialized;
import ru.entaxy.esb.platform.runtime.core.initializer.api.StandaloneInitializer;
import ru.entaxy.platform.core.artifact.Artifact;
import ru.entaxy.platform.core.artifact.ArtifactCoordinates;
import ru.entaxy.platform.core.artifact.Artifacts;
import ru.entaxy.platform.core.artifact.DeployedArtifact;
import ru.entaxy.platform.core.artifact.installer.builder.InstallationResult;
import ru.entaxy.platform.core.artifact.installer.builder.Installer;
import ru.entaxy.platform.core.artifact.installer.builder.typed.CommonBundleInstaller;
import ru.entaxy.platform.core.artifact.repository.impl.DeployedArtifactImpl;
import ru.entaxy.platform.core.artifact.service.ArtifactService;
@Deprecated(since = "1.10", forRemoval = true)
@StandaloneInitializer(id = "jaas")
// @Component(service = JaasInitializer.class, immediate = true)
public class JaasInitializer extends AbstractStandaloneInitializer {
private static final Logger log = LoggerFactory.getLogger(JaasInitializer.class);
private final static int REPEAT_COUNT = 5;
private final static int INTERVAL = 15000;
public static final String PATH_SUFFIX = "init/install/jaas.properties";
@Reference(cardinality = ReferenceCardinality.MANDATORY, policy = ReferencePolicy.DYNAMIC,
policyOption = ReferencePolicyOption.GREEDY, target = "(id=artifacts)")
volatile Initialized artifactsInitializerReady;
@Reference(cardinality = ReferenceCardinality.MANDATORY)
ArtifactService artifactService;
@Activate
public void activate(ComponentContext componentContext) {
setBundleContext(componentContext.getBundleContext());
Path configPath = Paths.get(System.getProperty("karaf.etc"), PATH_SUFFIX);
File configFile = configPath.toFile();
if (!configFile.exists())
return;
try {
Properties properties = new Properties(configFile);
for (Entry<String, String> entry : properties.entrySet()) {
String url = entry.getKey();
String paramsData = entry.getValue();
InstallationParams params = InstallationParams.parse(paramsData);
Artifact artifact = Artifacts.create(params.artifactCategory);
artifact.getCoordinates().set(ArtifactCoordinates.fromUrl(url));
DeployedArtifact depoyedArtifact = new DeployedArtifactImpl(artifact, "mvn:" + url);
Installer<?> installer = params.installShared ? artifactService.installers().cluster()
: artifactService.installers().local();
installer.artifact(depoyedArtifact);
CommonBundleInstaller bundleInstaller = installer.typed(CommonBundleInstaller.class);
InstallationResult result = null;
for (int i = 0; i < REPEAT_COUNT; i++) {
result = bundleInstaller.installOnlyIfMissing().start().startLevel(params.startLevel).install();
if (result != null && result.isSuccessful())
break;
try {
Thread.sleep(INTERVAL);
} catch (InterruptedException e) {
log.trace(e.getMessage());
}
}
if (result != null && result.isSuccessful())
log.info("Installed successfully: [{}]", url);
else {
log.error("Installation failed: [{}] :: {}", url,
result == null ? "Result is null" : result.getMessage());
if (result != null && result.getError() != null) {
log.error("DETAILS:", result.getError());
}
}
}
} catch (IOException e) {
log.error("Error processing properties", e);
}
}
protected static class InstallationParams {
protected static final String SHARED_TARGET = "shared";
public static InstallationParams parse(String data) {
InstallationParams result = new InstallationParams();
String[] values = data.split(";");
result.installShared = values[0].equals(SHARED_TARGET);
if (values.length > 1)
result.artifactCategory = values[1].trim();
if (values.length > 2)
try {
result.startLevel = Integer.parseInt(values[2].trim());
} catch (Exception ignore) {
}
return result;
}
boolean installShared = true;
String artifactCategory = "jar";
int startLevel = 100;
}
}

View File

@ -0,0 +1,315 @@
/*-
* ~~~~~~licensing~~~~~~
* jaas-runtime
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package ru.entaxy.platform.runtime.security.jaas.modules.resources;
import java.security.Principal;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import org.apache.felix.utils.properties.Properties;
import org.apache.karaf.jaas.boot.principal.GroupPrincipal;
import org.apache.karaf.jaas.boot.principal.RolePrincipal;
import org.apache.karaf.jaas.boot.principal.UserPrincipal;
import org.apache.karaf.jaas.modules.BackingEngine;
import org.apache.karaf.jaas.modules.encryption.EncryptionSupport;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class ResourceBackingEngine implements BackingEngine {
private static final transient Logger log = LoggerFactory.getLogger(ResourceBackingEngine.class);
private Properties users;
private EncryptionSupport encryptionSupport;
public ResourceBackingEngine(Properties users) {
this.users = users;
this.encryptionSupport = EncryptionSupport.noEncryptionSupport();
}
public ResourceBackingEngine(Properties users, EncryptionSupport encryptionSupport) {
this.users = users;
this.encryptionSupport = encryptionSupport;
}
@Override
public void addUser(String username, String password) {
if (username.startsWith(GROUP_PREFIX))
throw new IllegalArgumentException("Prefix not permitted: " + GROUP_PREFIX);
addUserInternal(username, password);
}
private void addUserInternal(String username, String password) {
String[] infos = null;
StringBuilder userInfoBuffer = new StringBuilder();
String encPassword = encryptionSupport.encrypt(password);
String userInfos = users.get(username);
// If user already exists, update password
if (userInfos != null && userInfos.length() > 0) {
infos = userInfos.split(",");
userInfoBuffer.append(encPassword);
for (int i = 1; i < infos.length; i++) {
userInfoBuffer.append(",");
userInfoBuffer.append(infos[i]);
}
String newUserInfo = userInfoBuffer.toString();
users.put(username, newUserInfo);
} else {
users.put(username, encPassword);
}
try {
users.save();
} catch (Exception ex) {
log.error("Cannot update users file,", ex);
}
}
@Override
public void deleteUser(String username) {
// delete all its groups first, for garbage collection of the groups
for (GroupPrincipal gp : listGroups(username)) {
deleteGroup(username, gp.getName());
}
users.remove(username);
try {
users.save();
} catch (Exception ex) {
log.error("Cannot remove users file,", ex);
}
}
@Override
public List<UserPrincipal> listUsers() {
List<UserPrincipal> result = new ArrayList<>();
for (Object user : users.keySet()) {
String userName = (String) user;
if (userName.startsWith(GROUP_PREFIX))
continue;
UserPrincipal userPrincipal = new UserPrincipal(userName);
result.add(userPrincipal);
}
return result;
}
@Override
public UserPrincipal lookupUser(String username) {
for (UserPrincipal userPrincipal : listUsers()) {
if (userPrincipal.getName().equals(username)) {
return userPrincipal;
}
}
return null;
}
@Override
public List<RolePrincipal> listRoles(Principal principal) {
String userName = principal.getName();
if (principal instanceof GroupPrincipal) {
userName = GROUP_PREFIX + userName;
}
return listRoles(userName);
}
private List<RolePrincipal> listRoles(String name) {
List<RolePrincipal> result = new ArrayList<>();
String userInfo = users.get(name);
String[] infos = userInfo.split(",");
for (int i = 1; i < infos.length; i++) {
String roleName = infos[i];
if (roleName.startsWith(GROUP_PREFIX)) {
for (RolePrincipal rp : listRoles(roleName)) {
if (!result.contains(rp)) {
result.add(rp);
}
}
} else {
RolePrincipal rp = new RolePrincipal(roleName);
if (!result.contains(rp)) {
result.add(rp);
}
}
}
return result;
}
@Override
public void addRole(String username, String role) {
String userInfos = users.get(username);
if (userInfos != null) {
for (RolePrincipal rp : listRoles(username)) {
if (role.equals(rp.getName())) {
return;
}
}
for (GroupPrincipal gp : listGroups(username)) {
if (role.equals(GROUP_PREFIX + gp.getName())) {
return;
}
}
String newUserInfos = userInfos + "," + role;
users.put(username, newUserInfos);
}
try {
users.save();
} catch (Exception ex) {
log.error("Cannot update users file,", ex);
}
}
@Override
public void deleteRole(String username, String role) {
String[] infos = null;
StringBuilder userInfoBuffer = new StringBuilder();
String userInfos = users.get(username);
// If user already exists, remove the role
if (userInfos != null && userInfos.length() > 0) {
infos = userInfos.split(",");
String password = infos[0];
userInfoBuffer.append(password);
for (int i = 1; i < infos.length; i++) {
if (infos[i] != null && !infos[i].equals(role)) {
userInfoBuffer.append(",");
userInfoBuffer.append(infos[i]);
}
}
String newUserInfo = userInfoBuffer.toString();
users.put(username, newUserInfo);
}
try {
users.save();
} catch (Exception ex) {
log.error("Cannot update users file,", ex);
}
}
@Override
public List<GroupPrincipal> listGroups(UserPrincipal user) {
String userName = user.getName();
return listGroups(userName);
}
private List<GroupPrincipal> listGroups(String userName) {
List<GroupPrincipal> result = new ArrayList<>();
String userInfo = users.get(userName);
if (userInfo != null) {
String[] infos = userInfo.split(",");
for (int i = 1; i < infos.length; i++) {
String name = infos[i];
if (name.startsWith(GROUP_PREFIX)) {
result.add(new GroupPrincipal(name.substring(GROUP_PREFIX.length())));
}
}
}
return result;
}
@Override
public void addGroup(String username, String group) {
String groupName = GROUP_PREFIX + group;
if (users.get(groupName) == null) {
addUserInternal(groupName, "group");
}
addRole(username, groupName);
}
@Override
public void deleteGroup(String username, String group) {
deleteRole(username, GROUP_PREFIX + group);
// garbage collection, clean up the groups if needed
// for (UserPrincipal user : listUsers()) {
// for (GroupPrincipal g : listGroups(user)) {
// if (group.equals(g.getName())) {
// // there is another user of this group, nothing to clean up
// return;
// }
// }
// }
// nobody is using this group any more, remove it
// deleteUser(GROUP_PREFIX + group);
}
@Override
public void addGroupRole(String group, String role) {
addRole(GROUP_PREFIX + group, role);
}
@Override
public void deleteGroupRole(String group, String role) {
deleteRole(GROUP_PREFIX + group, role);
}
public Map<GroupPrincipal, String> listGroups() {
Map<GroupPrincipal, String> result = new HashMap<>();
for (String name : users.keySet()) {
if (name.startsWith(GROUP_PREFIX)) {
result.put(new GroupPrincipal(name.substring(GROUP_PREFIX.length())), users.get(name));
}
}
return result;
}
public void createGroup(String group) {
String groupName = GROUP_PREFIX + group;
if (users.get(groupName) == null) {
addUserInternal(groupName, "group");
} else {
throw new IllegalArgumentException("Group: " + group + " already exist");
}
}
}

View File

@ -0,0 +1,86 @@
/*-
* ~~~~~~licensing~~~~~~
* jaas-runtime
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
/*
* Licensed to the Apache Software Foundation (ASF) under one or more contributor license
* agreements. See the NOTICE file distributed with this work for additional information regarding
* copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance with the License. You may obtain a
* copy of the License at http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software distributed under the License
* is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
* or implied. See the License for the specific language governing permissions and limitations under
* the License.
*/
package ru.entaxy.platform.runtime.security.jaas.modules.resources;
import java.util.Map;
import org.apache.karaf.jaas.modules.BackingEngine;
import org.apache.karaf.jaas.modules.BackingEngineFactory;
import org.apache.karaf.jaas.modules.JAASUtils;
import org.apache.karaf.jaas.modules.encryption.EncryptionSupport;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.platform.runtime.security.jaas.utils.PropertiesWithCallback;
import ru.entaxy.platform.runtime.security.jaas.utils.ResourceCallback;
public class ResourceBackingEngineFactory implements BackingEngineFactory {
private static final transient Logger log = LoggerFactory.getLogger(ResourceBackingEngineFactory.class);
private static final String USER_FILE = "users";
/**
* Builds the Backing Engine
*/
public BackingEngine build(Map<String, ?> options) {
ResourceBackingEngine engine = null;
String usersResource = JAASUtils.getString(options, USER_FILE);
ResourceCallback resourceCallback = new ResourceCallback(usersResource, "# Auto created users resource");
PropertiesWithCallback users = new PropertiesWithCallback(resourceCallback);
try {
users.load();
EncryptionSupport encryptionSupport = new EncryptionSupport(options);
engine = new ResourceBackingEngine(users, encryptionSupport);
} catch (Exception ioe) {
log.warn("Cannot open users file: {}", usersResource);
}
return engine;
}
/**
* Returns the login module class, that this factory can build.
*/
public String getModuleClass() {
return ResourceLoginModule.class.getName();
}
}

View File

@ -0,0 +1,176 @@
/*-
* ~~~~~~licensing~~~~~~
* jaas-runtime
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.runtime.security.jaas.modules.resources;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.HashSet;
import java.util.Map;
import javax.security.auth.Subject;
import javax.security.auth.callback.Callback;
import javax.security.auth.callback.CallbackHandler;
import javax.security.auth.callback.NameCallback;
import javax.security.auth.callback.PasswordCallback;
import javax.security.auth.callback.UnsupportedCallbackException;
import javax.security.auth.login.FailedLoginException;
import javax.security.auth.login.LoginException;
import org.apache.karaf.jaas.boot.principal.GroupPrincipal;
import org.apache.karaf.jaas.boot.principal.RolePrincipal;
import org.apache.karaf.jaas.boot.principal.UserPrincipal;
import org.apache.karaf.jaas.modules.JAASUtils;
import org.apache.karaf.jaas.modules.properties.PropertiesBackingEngine;
import org.apache.karaf.jaas.modules.properties.PropertiesLoginModule;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import ru.entaxy.platform.runtime.security.jaas.utils.PropertiesWithCallback;
import ru.entaxy.platform.runtime.security.jaas.utils.ResourceCallback;
public class ResourceLoginModule extends PropertiesLoginModule {
private static final transient Logger log = LoggerFactory.getLogger(ResourceLoginModule.class);
static final String USER_FILE = "users";
private String usersResource;
public void initialize(Subject sub, CallbackHandler handler, Map<String, ?> sharedState, Map<String, ?> options) {
super.initialize(sub, handler, options);
usersResource = JAASUtils.getString(options, USER_FILE);
if (debug) {
log.debug("Initialized debug={} usersResource={}", debug, usersResource);
}
}
public boolean login() throws LoginException {
if (usersResource == null) {
throw new LoginException("The property users may not be null");
}
ResourceCallback resourceCallback = new ResourceCallback(usersResource, "# Auto created users resource");
PropertiesWithCallback users = new PropertiesWithCallback(resourceCallback);
try {
users.load();
} catch (FileNotFoundException fnf) {
throw new LoginException("Users resource not found at " + usersResource);
} catch (Exception other) {
throw new LoginException("Unable to load user properties resource " + usersResource);
}
Callback[] callbacks = new Callback[2];
callbacks[0] = new NameCallback("Username: ");
callbacks[1] = new PasswordCallback("Password: ", false);
if (callbackHandler != null) {
try {
callbackHandler.handle(callbacks);
} catch (IOException ioe) {
throw new LoginException(ioe.getMessage());
} catch (UnsupportedCallbackException uce) {
throw new LoginException(uce.getMessage() + " not available to obtain information from user");
}
}
// user callback get value
if (((NameCallback) callbacks[0]).getName() == null) {
throw new LoginException("Username can not be null");
}
user = ((NameCallback) callbacks[0]).getName();
if (user.startsWith(PropertiesBackingEngine.GROUP_PREFIX)) {
// you can't log in under a group name
throw new FailedLoginException("login failed");
}
// password callback get value
if (((PasswordCallback) callbacks[1]).getPassword() == null) {
throw new LoginException("Password can not be null");
}
String password = new String(((PasswordCallback) callbacks[1]).getPassword());
// user infos container read from the users properties file
String userInfos = null;
try {
userInfos = users.get(user);
} catch (NullPointerException e) {
// error handled in the next statement
}
if (userInfos == null) {
if (!this.detailedLoginExcepion) {
throw new FailedLoginException("login failed");
} else {
throw new FailedLoginException("User " + user + " does not exist");
}
}
// the password is in the first position
String[] infos = userInfos.split(",");
String storedPassword = infos[0];
// check the provided password
if (!checkPassword(password, storedPassword)) {
if (!this.detailedLoginExcepion) {
throw new FailedLoginException("login failed");
} else {
throw new FailedLoginException("Password for " + user + " does not match");
}
}
principals = new HashSet<>();
principals.add(new UserPrincipal(user));
for (int i = 1; i < infos.length; i++) {
if (infos[i].trim().startsWith(PropertiesBackingEngine.GROUP_PREFIX)) {
// it's a group reference
principals.add(
new GroupPrincipal(infos[i].trim().substring(PropertiesBackingEngine.GROUP_PREFIX.length())));
String groupInfo = users.get(infos[i].trim());
if (groupInfo != null) {
String[] roles = groupInfo.split(",");
for (int j = 1; j < roles.length; j++) {
principals.add(new RolePrincipal(roles[j].trim()));
}
}
} else {
// it's an user reference
principals.add(new RolePrincipal(infos[i].trim()));
}
}
users.clear();
if (debug) {
log.debug("Successfully logged in {}", user);
}
succeeded = true;
return true;
}
}

View File

@ -0,0 +1,84 @@
/*-
* ~~~~~~licensing~~~~~~
* jaas-runtime
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.runtime.security.jaas.modules.resources;
import java.io.ByteArrayInputStream;
import java.io.FileNotFoundException;
import org.apache.felix.utils.properties.Properties;
import org.osgi.service.component.annotations.Activate;
import org.osgi.service.component.annotations.Component;
import org.osgi.service.component.annotations.Reference;
import org.osgi.service.component.annotations.ReferenceCardinality;
import org.osgi.service.component.annotations.ReferencePolicy;
import org.osgi.service.component.annotations.ReferencePolicyOption;
import ru.entaxy.esb.resources.EntaxyResource;
import ru.entaxy.esb.resources.EntaxyResourceService;
@Component(service = ServiceHelper.class, immediate = true)
public class ServiceHelper {
private static ServiceHelper INSTANCE;
public static ServiceHelper getInstance() {
return INSTANCE;
}
@Reference(cardinality = ReferenceCardinality.MANDATORY, policy = ReferencePolicy.DYNAMIC,
policyOption = ReferencePolicyOption.GREEDY)
volatile EntaxyResourceService entaxyResourceService;
@Activate
public void activate() {
INSTANCE = this;
}
public EntaxyResourceService getEntaxyResourceService() {
return entaxyResourceService;
}
public Properties loadProperties(String resourceUrl) throws Exception {
return loadProperties(resourceUrl, "#");
}
public Properties loadProperties(String resourceUrl, String defaultContent) throws Exception {
EntaxyResource resource = getEntaxyResourceService().getResource(resourceUrl);
if (resource == null)
throw new FileNotFoundException(resourceUrl);
if (!resource.exists()) {
resource.save(
new ByteArrayInputStream(new String(defaultContent == null ? "" : defaultContent).getBytes()));
}
Properties result = new Properties();
result.load(resource.getInputStream());
return result;
}
}

View File

@ -0,0 +1,64 @@
/*-
* ~~~~~~licensing~~~~~~
* jaas-runtime
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.runtime.security.jaas.utils;
import java.io.IOException;
import org.apache.felix.utils.properties.Properties;
public class PropertiesWithCallback extends Properties {
public static interface Callback {
void load(PropertiesWithCallback properties) throws Exception;
void save(PropertiesWithCallback properties) throws Exception;
}
protected Callback callback;
public PropertiesWithCallback(Callback callback) {
super();
this.callback = callback;
}
public void load() throws Exception {
if (this.callback != null)
this.callback.load(this);
}
@Override
public void save() throws IOException {
if (this.callback != null)
try {
this.callback.save(this);
} catch (Exception e) {
throw new IOException("Error saving properties", e);
}
else
super.save();
}
}

View File

@ -0,0 +1,80 @@
/*-
* ~~~~~~licensing~~~~~~
* jaas-runtime
* ==========
* Copyright (C) 2020 - 2024 EmDev LLC
* ==========
* You may not use this file except in accordance with the License Terms of the Copyright
* Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
* rights to the Software and any copies are the property of the Copyright Holder. Unless
* it is explicitly allowed the Copyright Holder, the User is prohibited from using the
* Software for commercial purposes to provide services to third parties.
*
* The Copyright Holder hereby declares that the Software is provided on an "AS IS".
* Under no circumstances does the Copyright Holder guarantee or promise that the
* Software provided by him will be suitable or not suitable for the specific purposes
* of the User, that the Software will meet all commercial and personal subjective
* expectations of the User, that the Software will work properly, without technical
* errors, quickly and uninterruptedly.
*
* Under no circumstances shall the Copyright Holder or its Affiliates is not liable
* to the User for any direct or indirect losses of the User, his expenses or actual
* damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
* or damage to data, property, etc.
* ~~~~~~/licensing~~~~~~
*/
package ru.entaxy.platform.runtime.security.jaas.utils;
import java.io.ByteArrayInputStream;
import java.io.ByteArrayOutputStream;
import java.io.FileNotFoundException;
import ru.entaxy.esb.resources.EntaxyResource;
import ru.entaxy.platform.runtime.security.jaas.modules.resources.ServiceHelper;
public class ResourceCallback implements PropertiesWithCallback.Callback {
protected String resourceUrl;
protected String defaultContent = "#";
public ResourceCallback(String resourceUrl) {
super();
this.resourceUrl = resourceUrl;
}
public ResourceCallback(String resourceUrl, String defaultContent) {
this(resourceUrl);
this.defaultContent = defaultContent;
}
@Override
public void load(PropertiesWithCallback properties) throws Exception {
EntaxyResource resource = ServiceHelper.getInstance().getEntaxyResourceService().getResource(resourceUrl);
if (resource == null)
throw new FileNotFoundException(resourceUrl);
if (!resource.exists()) {
resource.save(
new ByteArrayInputStream(new String(defaultContent == null ? "" : defaultContent).getBytes()));
}
properties.load(resource.getInputStream());
}
@Override
public void save(PropertiesWithCallback properties) throws Exception {
EntaxyResource resource = ServiceHelper.getInstance().getEntaxyResourceService().getResource(resourceUrl);
if (resource == null)
throw new FileNotFoundException(resourceUrl);
try (ByteArrayOutputStream bos = new ByteArrayOutputStream()) {
properties.save(bos);
try (ByteArrayInputStream bis = new ByteArrayInputStream(bos.toByteArray())) {
resource.save(bis);
}
} catch (Exception toRethrow) {
throw toRethrow;
}
}
}

View File

@ -0,0 +1,71 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>ru.entaxy.platform</groupId>
<artifactId>security</artifactId>
<version>1.10.0</version>
</parent>
<groupId>ru.entaxy.platform.security</groupId>
<artifactId>jaas</artifactId>
<packaging>pom</packaging>
<name>ENTAXY :: PLATFORM :: BASE :: SECURITY :: JAAS</name>
<description>ENTAXY :: PLATFORM :: BASE :: SECURITY :: JAAS</description>
<profiles>
<profile>
<id>attach-jaas-resources</id>
<activation>
<file>
<exists>src/main/resources/etc/init</exists>
</file>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<id>attach-jaas-artifacts</id>
<phase>package</phase>
<goals>
<goal>attach-artifact</goal>
</goals>
<configuration>
<artifacts>
<artifact>
<file>${project.build.outputDirectory}/etc/init/artifacts/shared/karaf-realm.xml</file>
<type>xml</type>
<classifier>karaf.realm</classifier>
</artifact>
<artifact>
<file>${project.build.outputDirectory}/etc/init/install/jaas.properties</file>
<type>properties</type>
<classifier>jaas</classifier>
</artifact>
<artifact>
<file>src/main/support/karaf_realm.json</file>
<type>json</type>
<classifier>karaf.realm</classifier>
</artifact>
</artifacts>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
<modules>
<module>jaas-producing</module>
<module>jaas-runtime</module>
<module>jaas-management</module>
<module>entaxy-legacy-auth</module>
<module>entaxy-legacy-auth-api</module>
</modules>
</project>

View File

@ -0,0 +1,111 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
~~~~~~licensing~~~~~~
jaas
==========
Copyright (C) 2020 - 2024 EmDev LLC
==========
You may not use this file except in accordance with the License Terms of the Copyright
Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
rights to the Software and any copies are the property of the Copyright Holder. Unless
it is explicitly allowed the Copyright Holder, the User is prohibited from using the
Software for commercial purposes to provide services to third parties.
The Copyright Holder hereby declares that the Software is provided on an "AS IS".
Under no circumstances does the Copyright Holder guarantee or promise that the
Software provided by him will be suitable or not suitable for the specific purposes
of the User, that the Software will meet all commercial and personal subjective
expectations of the User, that the Software will work properly, without technical
errors, quickly and uninterruptedly.
Under no circumstances shall the Copyright Holder or its Affiliates is not liable
to the User for any direct or indirect losses of the User, his expenses or actual
damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
or damage to data, property, etc.
~~~~~~/licensing~~~~~~
-->
<features name="entaxy-jaas-${project.version}" xmlns="http://karaf.apache.org/xmlns/features/v1.6.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.6.0 http://karaf.apache.org/xmlns/features/v1.6.0">
<repository>mvn:org.apache.karaf.features/standard/${karaf.version}/xml/features</repository>
<repository>mvn:ru.entaxy.esb.platform.runtime/core/${project.version}/xml/features</repository>
<!-- legacy repo -->
<repository>mvn:ru.entaxy.esb.system/system-parent/${project.version}/xml/features</repository>
<feature name="entaxy-jaas" version="${project.version}" start-level="${bundle.startlevel.base}">
<feature>entaxy-jaas-after-base</feature>
<feature>entaxy-jaas-runtime</feature>
<feature>entaxy-jaas-design</feature>
<feature>entaxy-jaas-management</feature>
</feature>
<feature name="entaxy-jaas-after-base" version="${project.version}" start-level="${bundle.startlevel.base}">
<configfile finalname="${karaf.etc}/init/artifacts/shared/entaxy/security/jaas/realm/karaf/1.0.0/karaf-1.0.0-blueprint.xml" override="false">
mvn:ru.entaxy.platform.security/jaas/${project.version}/xml/karaf.realm
</configfile>
<configfile finalname="${karaf.etc}/init/install/jaas.properties" override="false">
mvn:ru.entaxy.platform.security/jaas/${project.version}/properties/jaas
</configfile>
</feature>
<!--
@BACKWARD_C
-->
<feature name="entaxy-legacy-auth" version="${project.version}" start-level="${bundle.startlevel.system}">
<bundle>mvn:ru.entaxy.platform.security.jaas/entaxy-legacy-auth-api/${project.version}</bundle>
<bundle>mvn:ru.entaxy.platform.security.jaas/entaxy-legacy-auth/${project.version}</bundle>
<!--
<capability>
osgi.service;objectClass=org.hibernate.SessionFactory;effective:=active;
</capability>
-->
</feature>
<feature name="entaxy-jaas-runtime" version="${project.version}" start-level="${bundle.startlevel.system}">
<feature prerequisite="true">jasypt-encryption</feature>
<feature prerequisite="true" dependency="true">entaxy-jaas-after-base</feature>
<feature prerequisite="true">entaxy-initializers</feature>
<configfile finalname="${karaf.etc}/ru.entaxy.esb.system.basic_auth.cfg" override="false">
mvn:ru.entaxy.esb.system/system-parent/${project.version}/cfg/ru.entaxy.esb.system.basic_auth
</configfile>
<configfile finalname="${karaf.etc}/ru.entaxy.esb.system.basic_auth.htpasswd.cfg" override="false">
mvn:ru.entaxy.esb.system/system-parent/${project.version}/cfg/ru.entaxy.esb.system.basic_auth.htpasswd
</configfile>
<bundle>mvn:ru.entaxy.platform.security.jaas/jaas-runtime/${project.version}</bundle>
<!--
@TODO find out why we get exception on feature:install
while bundle:install works fine
-->
<!--
<capability>
osgi.service; effective:=active;objectClass=ru.entaxy.esb.platform.runtime.core.initializer.api.Initialized
</capability>
-->
</feature>
<feature name="entaxy-jaas-design" version="${project.version}" start-level="${bundle.startlevel.objects}">
<bundle>mvn:ru.entaxy.platform.security.jaas/jaas-producing/${project.version}</bundle>
<!--
@TODO find out why we get exception on feature:install
while bundle:install works fine
-->
<!--
<capability>
osgi.service; effective:=active;objectClass=ru.entaxy.platform.core.producer.api.EntaxyProducerService
</capability>
-->
</feature>
<feature name="entaxy-jaas-management" version="${project.version}" start-level="${bundle.startlevel.management}">
<bundle>mvn:ru.entaxy.platform.security.jaas/jaas-management/${project.version}</bundle>
</feature>
</features>

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,26 @@
###
# ~~~~~~licensing~~~~~~
# jaas
# ==========
# Copyright (C) 2020 - 2024 EmDev LLC
# ==========
# You may not use this file except in accordance with the License Terms of the Copyright
# Holder located at: https://entaxy.ru/eula . All copyrights, all intellectual property
# rights to the Software and any copies are the property of the Copyright Holder. Unless
# it is explicitly allowed the Copyright Holder, the User is prohibited from using the
# Software for commercial purposes to provide services to third parties.
#
# The Copyright Holder hereby declares that the Software is provided on an "AS IS".
# Under no circumstances does the Copyright Holder guarantee or promise that the
# Software provided by him will be suitable or not suitable for the specific purposes
# of the User, that the Software will meet all commercial and personal subjective
# expectations of the User, that the Software will work properly, without technical
# errors, quickly and uninterruptedly.
#
# Under no circumstances shall the Copyright Holder or its Affiliates is not liable
# to the User for any direct or indirect losses of the User, his expenses or actual
# damage, including, downtime; loss of bussines; lost profit; lost earnings; loss
# or damage to data, property, etc.
# ~~~~~~/licensing~~~~~~
###
entaxy.security.jaas.realm/karaf/1.0.0/xml/blueprint=shared;blueprint;50

View File

@ -0,0 +1,56 @@
{
"factoryId": "jaas-realm",
"objectId": "karaf",
"properties": {
"rank": 100,
"modules": [
{
"factoryId": "properties-jaas-login-module",
"scope": "private",
"properties": {
"__entaxyContainerId": "karaf",
"classifier": "karaf-properties",
"backendEnabled": true,
"module_users": "./etc/users.properties",
"encryption_enabled": false
}
},
{
"factoryId": "publickey-jaas-login-module",
"scope": "private",
"properties": {
"__entaxyContainerId": "karaf",
"classifier": "karaf-publickey",
"backendEnabled": true,
"module_users": "./etc/keys.properties"
}
},
{
"factoryId": "file-audit-jaas-login-module",
"scope": "private",
"properties": {
"__entaxyContainerId": "karaf",
"classifier": "karaf-file-audit",
"module_enabled": true
}
},
{
"factoryId": "log-audit-jaas-login-module",
"scope": "private",
"properties": {
"__entaxyContainerId": "karaf",
"classifier": "karaf-log-audit"
}
},
{
"factoryId": "eventadmin-audit-jaas-login-module",
"scope": "private",
"properties": {
"__entaxyContainerId": "karaf",
"classifier": "karaf-eventadminaudit"
}
}
]
}
}