oauth2.0 如何为Osticket实现Ouath2?

whhtz7ly  于 2023-05-05  发布在  其他
关注(0)|答案(1)|浏览(178)

我一直在尝试为我的apache 2服务器上托管的osticket实现oauth2。在成功遵循文档official osticket documentation for oauth2 plugin之后
我曾经遇到过这样一个问题,在用户通过IdP进行身份验证后,应用程序无法重定向到/API/oauth端点,而服务器拒绝识别任何此类URL。error由于没有为Oauth2客户端插件的后端实现提供文档,我假设它会被自动处理。我应该采取哪些步骤?下面是我的Apache配置文件Osticket看起来像:

<VirtualHost *:80>
        ServerAdmin webmaster@localhost
        ServerName abc.com
        DocumentRoot /www/itsm

        RewriteEngine On
        RewriteCond %{HTTPS} off
        RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}

        ErrorLog ${APACHE_LOG_DIR}/itsm_error.log
        CustomLog ${APACHE_LOG_DIR}/itsm_access.log combined

</VirtualHost>
<VirtualHost *:443>
        ServerAdmin webmaster@localhost
        ServerName abc.com
        DocumentRoot /var/www/osTicket/upload

        <Directory /www/itsm/>
                Options FollowSymLinks
                AllowOverride All
                Require all granted
        </Directory>
        #RewriteEngine On
        #RewriteCond %{HTTPS} off
        #RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
        ErrorLog ${APACHE_LOG_DIR}/itsm_error.log
        CustomLog ${APACHE_LOG_DIR}/itsm_access.log combined
    
    SSLEngine on
        SSLCertificateFile /etc/letsencrypt/live/abc.com/cert.pem
        SSLCertificateChainFile /etc/letsencrypt/live/abc.com/fullchain.pem
        SSLCertificateKeyFile /etc/letsencrypt/live/abc.com/privkey.pem

        <Directory "/var/www/osTicket/upload">
        AuthType Basic
        AuthName "Restricted Content"
        AuthUserFile /var/www/osTicket/upload/.htpasswd
        Require valid-user
        </Directory>
</VirtualHost>
j2cgzkjk

j2cgzkjk1#

这是在osticket 1.17.3 vanilla上工作-从ost webpage下载,带有oauth2/azure:

<IfModule mod_ssl.c>

 <VirtualHost *:443>
   DocumentRoot "/var/www/html/"
   ServerName support.somewhereelse.ch
   ServerAdmin it@support.somewhereelse.ch

  ErrorLog    /dev/stdout
  TransferLog /dev/stdout
  CustomLog   /dev/stdout combined

  RewriteEngine On

   <Directory "/var/www/html">
        Options Indexes FollowSymLinks MultiViews
        Require all granted
        AllowOverride All
   </Directory>

   SSLEngine on

   SSLCertificateFile    /etc/ssl/certs/pem
   SSLCertificateKeyFile /etc/ssl/certs/key

 </VirtualHost>
</IfModule>


<VirtualHost *:80>
    ServerAdmin webmaster@localhost
    ServerName support.somewhereelse.ch
    redirect permanent / https://support.somewhereelse.ch/
</VirtualHost>

相关问题