Hi Jérôme,
The issue goes away with CAS version 5.2.3 and pac4j version 2.3.1.
Thanks,
Scott K
> Hi Jérôme,
>
> I am using the JSON service registry. The service is registered as
>
> {
> "@class" : "org.apereo.cas.services.RegexRegisteredService",
> "serviceId" : "
https://my.org/testing/cas/phpclient/example_simple.php",
> "name" : "testClient01",
> "id" : 1,
> "evaluationOrder" : 10,
> "attributeReleasePolicy" : {
> "@class" : "org.apereo.cas.services.ReturnAllAttributeReleasePolicy"
> },
> "usernameAttributeProvider" : {
> "@class" : "org.apereo.cas.services.PrincipalAttributeRegisteredServiceUsernameProvider",
> "usernameAttribute" : "urn:oid:0.9.2342.19200300.100.1.1",
> "canonicalizationMode" : "NONE"
> }
> }
>
> So I believe the correct attribute release policy is in place to release all
> attributes to the service.
>
> The CAS log file contains this WARN message:
>
> 2018-03-24 10:02:59,411 WARN [org.apereo.cas.services.PrincipalAttributeRegisteredServiceUsernameProvider] - <Principal [AAdzZWNyZXQxoaZsp8jwcLkuGIb3wouQ4fg7MWmqgx+bnkd/EuWdmYlccwnzGtnBELaGS7ZMhiYxjvbzbXmlFcmhlQyJe9RyOsSx27yE14APpGvAWDpuR9bkuah8SfexOMbogtnYyK3aMRXjnFqsso5giA==] does not have an attribute [urn:oid:0.9.2342.19200300.100.1.1] among attributes [{}] so CAS cannot provide the user attribute the service expects. CAS will instead return the default principal id [AAdzZWNyZXQxoaZsp8jwcLkuGIb3wouQ4fg7MWmqgx+bnkd/EuWdmYlccwnzGtnBELaGS7ZMhiYxjvbzbXmlFcmhlQyJe9RyOsSx27yE14APpGvAWDpuR9bkuah8SfexOMbogtnYyK3aMRXjnFqsso5giA==]. Ensure the attribute selected as the username is allowed to be released by the service attribute release policy.>
>
> So CAS thinks there is no attribute "urn:oid:0.9.2342.19200300.100.1.1" but
> earlier in the log file pac4j logs
>
> 2018-03-24 10:02:58,906 DEBUG [org.pac4j.saml.client.SAML2Client] - <profile: #S
> AML2Profile# | id: AAdzZWNyZXQxoaZsp8jwcLkuGIb3wouQ4fg7MWmqgx+bnkd/EuWdmYlccwnzG
> tnBELaGS7ZMhiYxjvbzbXmlFcmhlQyJe9RyOsSx27yE14APpGvAWDpuR9bkuah8SfexOMbogtnYyK3aM
> RXjnFqsso5giA== | attributes: {urn:oid:0.9.2342.19200300.100.1.3=[skoranda@gmail
> .com], mail=[
skor...@gmail.com], urn:oid:0.9.2342.19200300.100.1.1=[scott.koran
> da], displayName=[Scott Koranda], givenName=[Scott], urn:oid:2.5.4.42=[Scott], n
> otBefore=2018-03-24T10:02:57.588Z, uid=[scott.koranda], urn:oid:2.16.840.1.11373
> 0.3.1.241=[Scott Koranda], urn:oid:1.3.6.1.4.1.5923.1.1.1.6=[scott.koranda@spher
>
icalcowgroup.com], notOnOrAfter=2018-03-24T10:07:57.588Z, eduPersonPrincipalName
> =[
scott....@sphericalcowgroup.com], urn:oid:2.5.4.4=[Koranda], sn=[Koranda],
> sessionindex=_0572dab54bff96c199e29f058aae9302} | roles: [] | permissions: [] |
> isRemembered: false | clientName: null | linkedId: null |>
>
> where the attribute urn:oid:0.9.2342.19200300.100.1.1 is explicitly shown to
> be populated.
>
> Am I missing something in my JSON service configuration?
>
> Again this is for version 5.1.3.
>
> Thanks,
>
> Scott K
> > > urn:oid:1.3.6.1.4.1.5923.1.1.1.6=[
scott....@sphericalcowgroup.com],
> > > notOnOrAfter=2018-03-22T14:49:45.460Z,
> > > eduPersonPrincipalName=[
scott....@sphericalcowgroup.com],
> > > email to
cas-user+u...@apereo.org.
> > To unsubscribe from this group and stop receiving emails from it, send an email to
cas-user+u...@apereo.org.
> > To view this discussion on the web visit
https://groups.google.com/a/apereo.org/d/msgid/cas-user/CAP279Lxnu8HSxPMQzxLvCW0Ee0-RmBVEGq%2BC67PRqajwz0Q5Tg%40mail.gmail.com.