0

I am planning to use the Shibboleth SSO Service Provider in my application, which is explained here. It is mentioned, that after a successful login, user information can be

"read from the webserver environment, e.g. with $_SERVER['mail'] in PHP".

How do I accomplish this in Java with TomEE?

I am using Apache Web Server in combination with Tomcat, such that servlet requests are forwarded to Tomcat. Is it even possible to access the Apache environment?

MWiesner
  • 8,868
  • 11
  • 36
  • 70
user2035039
  • 961
  • 3
  • 16
  • 30

1 Answers1

0

According to the documentation of mod_proxy_ajp:

Environment variables whose names have the prefix AJP_ are forwarded to the origin server as AJP request attributes (with the AJP_ prefix removed from the name of the key).

So assuming you configure your Shibboleth SP to decode a SAML Attribute as the webserver environment variable "mail", in your application code you can get the value by using

request.getAttribute("AJP_mail")
Yiannis Kakavas
  • 597
  • 3
  • 9