Сервис OAuth2
ORY Hydra OAuth2 Server
Gitlab
OpenID Connect authentication module for Apache
# apt install libapache2-mod-auth-openidc
Подключение к GitLab
# cat /etc/apache2/sites-available/default-ssl.conf
...
OIDCProviderMetadataURL https://gitlab.bmstu.ru/.well-known/openid-configuration
OIDCClientID 802..........................................................4c8
OIDCClientSecret 991..........................................................5e7
OIDCRedirectURI https://val.bmstu.ru/auth-test
OIDCCryptoPassphrase h...any.....string.....j
<Directory /home/val/auth-test>
Options ExecCGI Indexes FollowSymLinks
AddHandler cgi-script .cgi
DirectoryIndex env.cgi
AuthType openid-connect
Require valid-user
</Directory>
Alias /auth-test "/home/val/auth-test"
...
Тестирование
!!! В настройках
URL без финального “/”, при подключении обязательно с ним !!!
https://val.bmstu.ru/auth-test/