'Nginx kerberos auth for oracle apex HTTP Header Variable

We got "HTTP Header Variable" at Authentication Scheme in apex for kerberos auth.

f?p=&APP_ID.:LOGIN_DESKTOP:&APP_SESSION.:APEX_AUTHENTICATION=DB

On proxy server with apache the config is:

<Location /ords>
  AuthType Kerberos
  AuthName "Kerberos Login"
  KrbAuthRealms smth
  KrbServiceName HTTP/devgate.smth@SMTH
  Krb5KeyTab /etc/krb-keytab/keytab.spnego
  require valid-user
  RewriteEngine On
  RewriteCond %{REMOTE_USER} (.+)@.*
  RewriteRule . - [E=RU:%1]
  RequestHeader set SSO_USER %{RU}e
</Location>
ProxyPass /ords/ http://site.smth:8888/ords/
ProxyPassReverse /ords/ http://site.smth:8888/ords/

I'm trying to migrate to another server with nginx on it, but this config does not work.

location /ords {
auth_gss on;
auth_gss_realm SMTH;
auth_gss_keytab /etc/krb-keytab/keytab.spnego;
auth_gss_service_name HTTP/devgate.smth;
proxy_set_header Origin "" ;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Forwarded-Server $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header SSO_USER $remote_user;
auth_gss_format_full on;
proxy_pass http://site.smth:8888/ords/;
     }

What am I doing wrong?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source