go http サーバーの前での認証などのリバース プロキシとして Apache を使用しています。
次の apache kerberos セットアップは、1 つの問題で動作します。go アプリケーションで認証済みのユーザー名を取得する方法がわかりません。
httpd.conf:
<VirtualHost host.domain.com:80>
ProxyPreserveHost On
ProxyPass / http://127.0.0.1:9000/
ProxyPassReverse / http://127.0.0.1:9000/
<Location />
## gzip
##
AddOutputFilterByType DEFLATE text/html
Order deny,allow
Allow from all
AuthType Kerberos
AuthName "User Admin"
KrbAuthRealms DOMAIN.COM
Krb5Keytab /etc/host.krb5keytab
KrbMethodNegotiate on
KrbAuthoritative on
KrbMethodK5Passwd off
KrbLocalUserMapping on
KrbSaveCredentials on
require valid-user
</Location>
</VirtualHost>
と
AuthType basic
go 関数を使用して、リクエストの Authorization ヘッダーからユーザー名を取得します
func (*Request) BasicAuth
ただし、Authorization ヘッダーのネゴシエーションでは、これは不可能です。さらに、cgi 環境がないため、REMOTE_USER 環境変数を使用できません。RequestHeader も設定しようとしましたが、成功しませんでした。
go アプリケーションから承認されたユーザー名を取得する可能性はありますか?