This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
сервис_oauth2 [2022/05/17 07:56] val |
сервис_oauth2 [2022/10/06 08:21] val |
||
---|---|---|---|
Line 10: | Line 10: | ||
===== Gitlab ===== | ===== Gitlab ===== | ||
- | * [[Инструмент GitLab]] | + | * Инструмент GitLab [[Инструмент GitLab#Сервер OAuth2]] |
- | ===== OpenID Connect authentication module for Apache ===== | ||
- | * Аuthenticates users of a web site against an OpenID Connect Identity Provider or an OAuth 2.0 Authorization Server | ||
- | |||
- | <code> | ||
- | # apt install libapache2-mod-auth-openidc | ||
- | |||
- | # cat /etc/apache2/sites-available/default-ssl.conf | ||
- | </code><code> | ||
- | ... | ||
- | 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" | ||
- | ... | ||
- | </code> | ||
- | |||
- | ==== Тестирование ==== | ||
- | |||
- | * !!! В настройках URL без финального "/", при подключении обязательно с ним !!! | ||
- | |||
- | <code> | ||
- | https://val.bmstu.ru/auth-test/ | ||
- | </code> |