SAML 통합을 테스트하는 중에도 동일한 문제에 부딪혔고, 마침내 정상 작동하게 만들었습니다. 로그가 활성화된 상태에서 @attributes의 내용을 확인해 보세요. 매핑에 필요한 실제 키는 바로 이것이며, 친숙한 이름(friendly name)이 아닙니다. 이는 XML 데이터의 Name 속성에 해당합니다. 제 경우 app.yml 안의 매핑은 다음과 같이 변경되었습니다:
def attribute_statements
result = {}
statements =
"name:fullName,name|email:email,mail|first_name:first_name,firstname,firstName|last_name:last_name,lastname,lastName|nickname:screenName"
custom_statements = setting(:attribute_statements)
statements = "#{statements}|#{custom_statements}" if custom_statements.present?
statements
.split("|")
.map do |statement|
attrs = statement.split(":", 2)
next if attrs.count != 2
(result[attrs[0]] ||= []) << attrs[1].split(",")
result[attrs[0]].flatten!
end
result
end
이 코드 부분은 (저는 Ruby 프로그래머가 아니라는 점을 유념해 주십시오) 시스템이 작동하려면 모든 속성을 시스템의 속성에 매핑해야 한다는 것을 시사합니다. 이 정보를 테스트해 보겠습니다. (현재 SAML 플러그인 관련 문제가 있어서 문제를 조사하고 있습니다).