spring-projects / spring-projects/spring-security
SEC-2219: OpenId Attribute Exchange does not work with Intuit Provider
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 9.6k
- Forks
- 6.3k
- Avg merge
- 2d 11h
- Merged PRs (30d)
- 52
Description
grady cooper (Migrated from SEC-2219) said:
org.springframework.security.openidOpenID4JavaConsumer::fetchAxAttributes() uses the attribute name to retrieve the attribute values( List values = fetchResp.getAttributeValues(attr.getName());). However, the intuit OP (which maybe a .NET provider) uses an alias scheme (not the attribute name) to provide values. Partial responses from intuit OP (notice "email" attributes value is names value.alias3 (not "email") :
I believe the correct fix is to lookup attributes by type ( org.openid4java.message.ax.AxPayload::getAttributeValuesByTypeUri(String typeUri)) - however, I'm a newbie to openid and admittedly don't know all the compatibility issues.
security configuration for intuit OP:
<b:entry key=".*intuit.com.*">
<b:list>
<b:bean class="org.springframework.security.openid.OpenIDAttribute">
<b:constructor-arg name="name" value="email"/>
<b:constructor-arg name="type" value="http://axschema.org/contact/email"/>
<b:property name="required" value="true"/>
</b:bean>
<b:bean class="org.springframework.security.openid.OpenIDAttribute">
<b:constructor-arg name="name" value="firstname"/>
<b:constructor-arg name="type" value="http://axschema.org/namePerson/first"/>
<b:property name="required" value="true"/>
</b:bean>
<b:bean class="org.springframework.security.openid.OpenIDAttribute">
<b:constructor-arg name="name" value="lastname" />
<b:constructor-arg name="type" value="http://axschema.org/namePerson/last"/>
<b:property name="required" value="true"/>
</b:bean>
<b:bean class="org.springframework.security.openid.OpenIDAttribute">
<b:constructor-arg name="name" value="realmId" />
<b:constructor-arg name="type" value="http://axschema.org/intuit/realmId"/>
<b:property name="required" value="true"/>
</b:bean>
</b:list>
</b:entry>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start at org.springframework.security.openid.OpenID4JavaConsumer::fetchAxAttributes() and compare its use of fetchResp.getAttributeValues(attr.getName()) with the Intuit response and the proposed AxPayload type-URI lookup. Done means configured attributes such as email, firstname, lastname, and realmId are retrieved when the provider uses aliases rather than configured names.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, spring
- Domain
- authentication, security
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100