1

ive been trying to implement oauth2 for osticket hosted on my apache2 server. After following the docs sucessfully official osticket documentation for oauth2 plugin

ive been stuck at a point where, the app is unable to redirect to the /api/oauth endpoint after user authentication with the IdP and server refuses to identify any such url. error Since no documentation was provided for the backend implemetation for the Oauth2 client plugin i assumed it would be automatically taken care of. What steps should i proceed with? Heres what my apache config file for Osticket looks like:

<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>

1 Answers1

0

This is working on osticket 1.17.3 vanilla - download from the ost webpage with 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>
user3054986
  • 417
  • 7
  • 18