Расширенная настройка GitLab

Расширенная настройка GitLab 01Расширенная настройка GitLab подразумевает конфигурирование множества дополнительных компонентов, среди которых я планирую рассмотреть настройку почтовых уведомлений, интеграцию с LDAP, а также настройку Rack attack.


Если вам интересна тематика Debian и связанных с ним приложений, рекомендую обратиться к тегу Debian на моем блоге.


Расширенная настройка GitLab

Ранее я рассматривал установку GitLab с нуля (см. Установка GitLab), теперь же я планирую пролить свет на некоторые дополнительные настройки, о чем ниже.

Настройка почтовых уведомлений

Настройка рассылок по электронной почте крайне желательна, ведь иначе пользователи не смогут получать даже письма для восстановления/сброса пароля.

По умолчанию GitLab использует Postfix в качестве MTA и лично меня это полностью устраивает. Тем не менее, при стандартной установке GitLab 1 из репозиториев Postfix у меня нормально не поставился и выкидывал кучу ошибок при попытке что-либо настроить. В таких ситуациях лучшим вариантом будет переконфигурировать пакет:

В процессе работы команды вам будут заданы множество вопросов о конфигурации MTA. На все можете отвечать утвердительно, ответа при этом не меняя (итоговая конфигурация все равно будет задана вручную).

После завершения операции мой конфиг выглядел следующим образом (не рекомендую его слепо копировать, в зависимости от версий Postfix и окружения ваши настройки могут сильно отличаться):

По умолчанию почта с GitLab на ваши корпоративные серверы доставляться скорее всего не будет, либо начнет попадать в спам. Чтобы избежать этого, добавьте адрес хоста GitLab в белые списки.

Примечание: для углубленного изучения настройки Postfix читайте официальную документацию. В данном примере вас должна интересовать настройка Postfix как null-клиента 2. Также вы можете воспользоваться моими статьями, которые доступны по тегу Unix Mail.

С базовой настройкой почты разобрались.

Расширенная настройка почты

Этот вариант настройки интеграции с почтовыми сервисами я рассматривать не планирую, но и не оставить на него ссылку я не могу 3.

Интеграция с LDAP

В GitLab доступна интеграция 4 с LDAP. Имея инфраструктуру Active Directory, вполне логично воспользоваться данным функционалом.

Открываем конфиг:

Вставляем кусок кода:

Сохраняем изменения и выходим.

Примечание: будьте внимательны, конфиг чувствителен к пробелам и знакам табуляции, которых там быть вообще не должно, иначе при компиляции будете стабильно получать ошибки. Дойти до этого мне помогли отдельные ресурсы 5 6.

Небольшие пояснения по некоторым параметрам секции:

  • host: — адрес хоста, то есть контроллера домена. Можно ввести только один адрес, отказоустойчивая конфигурация доступна в платных версиях GitLab;
  • port: — стандартный порт LDAP;
  • uid: — идентификатор пользователя, по умолчанию sAMAccountName. Это говорит о том, что пользователям нужно будет вводить свой логин AD без конструкций domain\ или @domain.tld. Если вам нужна аутентификация с учетками вида user@domain.tld, то используйте атрибут userPrincipalName;
  • bind_dn: — учетная запись, через которую GitLab будет получать данные из AD. Наделять эту учетку лишними правами не нужно;
  • password: — пароль от учетки, все просто;
  • base: — контейнер для поиска учетных записей. Задайте его в явном виде, если хотите ограничить круг поиска, например определив путь до контейнера с учетными записями отдела разработки ПО. Обратите внимание, что AD чувствителен к регистру букв, путь должен быть в точности как в свойствах контейнера в атрибуте msDS-parentdistname.

Про остальные параметры вы сможете прочитать из официальной документации 7 8, в том числе и других редакций GitLab.

Пересобираем GitLab:

Если все пройдет успешно, в конце получите сообщение:

При вводе неправильных данных будете получать ошибки на подобии этой:

Расширенная настройка GitLab 02

Остается проверить 9 работает ли интеграция:

В идеале вы должны увидеть перечисление всех учетных записей в указанном контейнере AD и в конце:

Если видите что-то другое, разбирайтесь с конфигом.

Rack attack

Этот механизм 10 представляет из себя своеобразную защиту от DDOS-атак (от «надоедливых» клиентов, как это написано в руководстве). Скорее всего большинство админов и не собираются выставлять GitLab наружу, оставив ему судьбу исключительно внутреннего ресурса. Тем не менее, как минимум нужно указать надежные сети, клиентам из которых разрешено мучать GitLab сколько вздумается.

Для этого открываем конфиг:

Редактируем секцию:

Жирным шрифтом выделена подсеть с результирующей маской, добавленная вручную.

Не забываем пересобрать:

На этом настройка завершена.

comments powered by HyperComments
2luminary
2022-06-18 02:31:45
<strong>3double-barrelled</strong>
dissertation vs thesis
2022-07-05 20:51:16
<strong>doctoral dissertation help history https://helpwithdissertationwritinglondon.com/</strong>
dissertation proposal writing
2022-07-05 23:13:51
<strong>dissertation presentation https://dissertationwritingcenter.com/</strong>
doctoral dissertation writing help
2022-07-06 01:07:04
<strong>bestdissertation https://dissertationhelpexpert.com/</strong>
masters dissertation writing services
2022-07-06 03:19:50
<strong>dissertation title examples https://accountingdissertationhelp.com/</strong>
doctoral dissertation help reference
2022-07-06 07:51:15
<strong>dissertation writing plan https://examplesofdissertation.com/</strong>
free dissertation help
2022-07-06 10:24:35
<strong>buy a dissertation online help https://writing-a-dissertation.net/</strong>
writing your dissertation in a week
2022-07-06 13:26:14
<strong>doctoral dissertation help usa https://bestdissertationwritingservice.net/</strong>
uk dissertation writing
2022-07-06 18:38:10
<strong>dissertation help online https://customdissertationwritinghelp.com/</strong>
writing dissertation service
2022-07-06 22:34:48
<strong>dissertation literature review https://writingadissertationproposal.com/</strong>
example of dissertation
2022-07-07 04:14:01
<strong>dissertation introduction https://dissertationhelperhub.com/</strong>
online edd no dissertation
2022-07-07 06:21:39
<strong>dissertation help online https://customthesiswritingservices.com/</strong>
online casino roulette
2022-07-25 22:15:23
<strong>vegas 777 online casino https://firstonlinecasino.org/</strong>
wind creek casino online games
2022-07-26 00:48:22
<strong>casanova casino online https://onlinecasinofortunes.com/</strong>
online casino with no deposit bonus
2022-07-26 03:26:30
<strong>usa online casino real money https://newlasvegascasinos.com/</strong>
betfair online casino nj
2022-07-26 05:45:02
<strong>viva slots vegas™ free slot casino games online https://trust-online-casino.com/</strong>
online casino games with real money
2022-07-26 09:07:29
<strong>trusted online casino https://9lineslotscasino.com/</strong>
michigan online casino no deposit bonus
2022-07-26 16:12:43
<strong>mgm casino online michigan https://internet-casinos-online.net/</strong>
casino online pa
2022-07-26 18:38:38
<strong>same day payout online casino https://cybertimeonlinecasino.com/</strong>
turning stone online casino
2022-07-26 19:09:46
<strong>borgata online casino promotions https://1freeslotscasino.com/</strong>
san manuel online casino promo codes
2022-07-26 22:17:00
<strong>online-casino https://vrgamescasino.com/</strong>
play free casino games online
2022-07-27 03:21:23
<strong>online casino no deposit bonus https://casino-online-jackpot.com/</strong>
online casino sweepstakes
2022-07-27 10:55:28
<strong>online casino sweepstakes https://ownonlinecasino.com/</strong>
online casino nevada
2022-07-27 13:04:00
<strong>online casino no verification withdrawal usa https://all-online-casino-games.com/</strong>
newest online casino pa
2022-07-27 14:14:36
<strong>best online casino games https://casino8online.com/</strong>
express vpn free trial
2022-08-07 14:53:24
<strong>avast vpn license file https://freevpnconnection.com/</strong>
best free vpn pc
2022-08-07 16:39:15
<strong>best vpn multiple devices https://shiva-vpn.com/</strong>
vpn best
2022-08-07 21:00:46
<strong>cyberghost vpn free trial https://freehostingvpn.com/</strong>
buy vpn proxy
2022-08-07 22:37:42
<strong>x-vpn https://ippowervpn.net/</strong>
best vpn provider
2022-08-08 05:12:12
<strong>vpn buy online https://free-vpn-proxy.com/</strong>
vpn free trial
2022-08-08 08:14:34
<strong>free vpn for pc windows 10 https://rsvpnorthvalley.com/</strong>
gay men dating sites
2022-08-23 13:46:06
<strong>japan gay dating sites https://gay-singles-dating.com/</strong>
gay dating advice
2022-08-23 18:11:09
<strong>gay dating professional bodybuilders https://datinggayservices.com/</strong>
online dejting
2022-08-24 12:51:27
<strong>free local singles https://freephotodating.com/</strong>
free dating online
2022-08-24 16:12:24
<strong>women dates local no fee https://onlinedatingbabes.com/</strong>
top sites dating
2022-08-24 17:45:04
<strong>meet european singles in usa https://adult-singles-online-dating.com/</strong>
the dating game
2022-08-24 20:23:45
<strong>top sites dating https://adult-classifieds-online-dating.com/</strong>
online dating personals
2022-08-24 22:39:08
<strong>online sex chat https://online-internet-dating.net/</strong>
farmersonly
2022-08-25 00:58:24
<strong>single senior dating site online https://speedatingwebsites.com/</strong>
danting site
2022-08-25 03:31:23
<strong>shemale dating https://datingpersonalsonline.com/</strong>
westminster dating app the world
2022-08-25 04:22:01
<strong>good dating sites https://wowdatingsites.com/</strong>
mature singles
2022-08-25 07:01:14
<strong>free dating online dating https://lavaonlinedating.com/</strong>
sex dating sights
2022-08-25 08:44:59
<strong>dating sites into trampling https://freeadultdatingpasses.com/</strong>
our time dating service
2022-08-25 12:19:33
<strong>internet dating services https://virtual-online-dating-service.com/</strong>
meet online service
2022-08-25 15:51:00
<strong>free online dating sites reviews https://onlinedatingservicesecrets.com/</strong>
pa online casino apps
2022-08-30 10:15:38
<strong>caesars casino online bonus code https://onlinecasinos4me.com/</strong>
888 casino online support
2022-08-30 12:01:53
<strong>parx online casino https://online2casino.com/</strong>
caesar casino online nj
2022-08-30 20:24:59
<strong>play online casino https://casinosonlinex.com/</strong>
sex chat gay
2022-09-03 02:09:14
<strong>gay chat rouetee https://newgaychat.com/</strong>
m4m chat phone free rochester ny gay
2022-09-03 03:26:21
<strong>in gay chat what is an otter? https://gaychatcams.net/</strong>
gay chat rooms ring central
2022-09-03 14:08:50
<strong>gay chat roulette chat https://gay-live-chat.net/</strong>
springfield mo gay chat room
2022-09-03 20:43:11
<strong>gay wire chat looking https://chatcongays.com/</strong>
gay video chat tumblr
2022-09-03 23:58:32
<strong>snap chat gay boy cums https://gayphillychat.com/</strong>
gay french chat camtocam
2022-09-04 06:23:40
<strong>utah gay bi chat https://gaychatnorules.com/</strong>
hot gay text chat
2022-09-04 10:17:58
<strong>gay chat room https://gaymusclechatrooms.com/</strong>
gay snap chat
2022-09-04 17:23:45
<strong>gay chat rooms for free without registration https://free-gay-sex-chat.com/</strong>
gay video cam chat
2022-09-04 21:55:29
<strong>gay boy jack off cam chat https://gayinteracialchat.com/</strong>
skype gay chat
2022-10-20 16:41:47
<strong>best gay chat rooms https://gaymanchatrooms.com/</strong>
where can i buy resume paper
2022-10-20 18:38:40
<strong>college paper writer https://term-paper-help.org/</strong>
write my paper for me in 3 hours
2022-10-20 19:55:23
<strong>write my paper https://sociologypapershelp.com/</strong>
how to write my paper
2022-10-20 20:24:51
<strong>can you write my paper for me https://uktermpaperwriters.com/</strong>
college papers help
2022-10-20 22:47:15
<strong>best paper writing services https://paperwritinghq.com/</strong>
best online paper writers
2022-10-21 00:10:47
<strong>help with writing papers https://writepapersformoney.com/</strong>
pay to write paper
2022-10-21 00:42:11
<strong>pay someone to write a paper https://write-my-paper-for-me.org/</strong>
paper writer services
2022-10-21 04:19:22
<strong>what is the best paper writing service https://top100custompapernapkins.com/</strong>
i will pay you to write my paper
2022-10-21 05:35:01
<strong>write my custom paper https://researchpaperswriting.org/</strong>
what are the best paper writing services
2022-10-21 06:15:33
<strong>help with writing paper https://cheapcustompaper.org/</strong>
need help with paper
2022-10-21 10:42:23
<strong>pay to do my paper https://mypaperwritinghelp.com/</strong>
help me write a paper
2022-10-21 13:33:47
<strong>need help writing a paper https://essaybuypaper.com/</strong>
pay to write a paper
2022-10-21 14:19:41
<strong>pay to write paper https://papercranewritingservices.com/</strong>
can you write my paper for me
2022-10-21 15:49:46
<strong>writing services for college papers https://premiumpapershelp.com/</strong>
order a paper
2022-10-21 18:49:44
<strong>buy cheap paper online https://studentpaperhelp.com/</strong>
2theorist
2023-01-27 12:22:01
<strong>2reunion</strong>
degree coursework
2023-02-05 14:30:38
<strong>coursework writing https://brainycoursework.com/</strong>
creative writing coursework
2023-02-05 17:20:15
<strong>coursework only degree https://writingacoursework.com/</strong>
coursework sample
2023-02-05 18:44:23
<strong>coursework planner https://mycourseworkhelp.net/</strong>
coursework science
2023-02-05 20:11:55
<strong>creative writing english coursework https://courseworkdownloads.com/</strong>
data analysis coursework
2023-02-05 21:23:26
<strong>coursework on a resume https://courseworkinfotest.com/</strong>
do my coursework
2023-02-05 23:10:40
<strong>coursework plagiarism checker https://coursework-expert.com/</strong>
coursework project
2023-02-06 00:30:51
<strong>buy coursework online https://teachingcoursework.com/</strong>
coursework questions
2023-02-06 01:10:58
<strong>coursework sample of written work https://buycoursework.org/</strong>
coursework science
2023-02-06 02:53:28
<strong>coursework writer https://courseworkdomau.com/</strong>
professional dating sites
2023-02-08 14:22:25
<strong>free sex dating https://jewish-dating-online.net/</strong>
free dating siwomen
2023-02-08 14:33:50
<strong>free singles https://jewish-dating-online.net/</strong>
online site
2023-02-08 16:47:09
<strong>free chatting online dating sites https://free-dating-sites-free-personals.com/</strong>
dating chat
2023-02-08 17:45:34
<strong>absolutely free dating sites no fees ever https://sexanddatingonline.com/</strong>
free dating service
2023-02-08 18:38:09
<strong>absolutely free dating sites https://onlinedatingsurvey.com/</strong>
new dating
2023-02-08 20:20:52
<strong>free dating online https://onlinedatingsuccessguide.com/</strong>
free dating sites totally free
2023-02-08 21:16:44
<strong>free daing https://onlinedatinghunks.com/</strong>
free local dates
2023-02-08 22:36:51
<strong>dating website best https://datingwebsiteshopper.com/</strong>
dating sites
2023-02-09 00:05:09
<strong>good free dating sites https://allaboutdatingsites.com/</strong>
online meeting sites
2023-02-09 01:12:06
<strong>relative dating https://freedatinglive.com/</strong>
Яндекс.Метрика