Shibboleth SP - Reading assertion attributes from Java

后端 未结 3 968
别跟我提以往
别跟我提以往 2020-12-22 07:44

I understand that configured attributes will be stored as environment variables by default and will be accessible like

request.getAttribute(\"Shib-Identity-P         


        
3条回答
  •  星月不相逢
    2020-12-22 08:30

    1. Make sure you have this field in you attribute map file.

      1.1 And idP has to send the attribute too.

    2. Since you have attribute prefix as "AJP_" your attributes will be coming as "AJP_attributeName" (This can vary too)

      2.1 You have to open up your AJP port which usually listens on 8009 and redirect the /secure path to AJP. You have to do this in apache to forward proxy as AJP.

      2.2 In your servlet/handler of /secure path try getting attribute as request.getHeader("AJP_attrName").

      (Can try following too if this does not work a. reqest.getAttribute("attr") b. reqest.getAttribute("AJP_attr") c. header.getAttribute("attr") c. header.getAttribute("AJP_attr"). I am telling you to try out this because I have done this long time ago and I am not sure about exact method.)

提交回复
热议问题