apache - Reading Shibboleth attributes in Node.js -


i trying port perl script, reads , consumes shibboleth session attributes, node.js. perl code looks, example, this:

die "must protected behind shibboleth authentication" unless $env{'auth_type'} eq 'shibboleth'; die "requires eppn" unless $env{'eppn'} ne ""; $user = $env{'eppn'}; $shib_session_id = $env{'shib-session-id'}; 

it appears though shibboleth attributes available perl environment variables. far can tell (i don't know perl), there nothing within script fetching or altering these values.

so, checked process.env, in node.js app, , none of these values exist. nor they, far have searched, exist in request object created express.js.

the perl script on apache server, nothing in httpd.conf looks it's passing special perl script. node.js app reversed proxied on same apache server.

is possible shibboleth attributes in node.js, or rely on perl/apache/shibboleth magic?

thanks @mpapec's comment, solved passing apache environment variables upstream request headers:

requestheader set x-auth-type       %{auth_type}e requestheader set x-eppn            %{eppn}e requestheader set x-shib-session-id %{shib-session-id}e 

these appear in req.headers in node.js app; although x-auth-type mysteriously set (null)... can work around that, time being, ideas why case?


Comments

Popular posts from this blog

java - Plugin org.apache.maven.plugins:maven-install-plugin:2.4 or one of its dependencies could not be resolved -

Round ImageView Android -

How can I utilize Yahoo Weather API in android -