Skip to content

Additional attributes on ContactPerson Element#79

Merged
thijskh merged 6 commits into
simplesamlphp:masterfrom
tdiscuit:master
Oct 18, 2016
Merged

Additional attributes on ContactPerson Element#79
thijskh merged 6 commits into
simplesamlphp:masterfrom
tdiscuit:master

Conversation

@tdiscuit
Copy link
Copy Markdown
Contributor

In order for federation participants to claim compliance for Sirtfi, they need to define the security contact for their organization. The contactType of "other" is used, but Sirtfi requires additional attributes, xmlns:remd and remd:contactType, on the ContactPerson element (shown here).

Currently, this isn't possible, but this PR adds an associative array, $ContactPersonAttributes, which will add attributes to the ContactPerson element.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage decreased (-0.06%) to 63.779% when pulling 5cf2fbb on tdiscuit:master into 381bb70 on simplesamlphp:master.

@relaxnow
Copy link
Copy Markdown
Contributor

@tdiscuit could you please add a unit test?

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+1.2%) to 65.086% when pulling 52e9d94 on tdiscuit:master into 381bb70 on simplesamlphp:master.

@coveralls
Copy link
Copy Markdown

Coverage Status

Coverage increased (+1.3%) to 65.155% when pulling a94403b on tdiscuit:master into 381bb70 on simplesamlphp:master.

@tdiscuit
Copy link
Copy Markdown
Contributor Author

tdiscuit commented Oct 12, 2016

@relaxnow I've added unit tests and SAML2\XML\md\ContactPerson is 100% covered.

I also noticed I missed pulling out attributes on the contact person element if XML is supplied, so I added that in.

@jaimeperez
Copy link
Copy Markdown
Member

Thanks so much @tdiscuit!

I was wondering... would it make sense to have this as a new class, extending ContactPerson? Basically, a class specific to this use case, setting whatever needs to be set to comply with the SIRTFI contact, so that you just need to mark it like that in some way and then use the new class instead of the generic one. I think it could be worth evaluating the idea since ContactPerson is quite generic and the SIRTFI stuff is very specific on the contrary.

@tdiscuit
Copy link
Copy Markdown
Contributor Author

Anytime @jaimeperez! But I still have more work to do since I'll be submitting a PR for SimpleSAMLphp as well ;) ... once I hash that bit out.

I was thinking the same thing, but I went with this route since I am doing this for Sirtfi now, but there may be other trust frameworks that I don't know about that require additional attributes on other contact types. So by keeping it generic, it becomes very easy to implement. Of course I am open to discussion around that.

@jaimeperez
Copy link
Copy Markdown
Member

That's also true, although I don't know if there are other frameworks doing the same already. Maybe @joostd or @pmeulen know better?

In any case, I think this is also a sensible approach since the implementation is then extremely simple.

@thijskh
Copy link
Copy Markdown
Member

thijskh commented Oct 15, 2016

I'm not aware of any other trust frameworks that use extensions to the ContactPerson element. Likely the current approach is indeed just fine and suffices for now. To keep it 'agile' we can refactor this later should other use cases pop up. All in all I propose to merge this PR.

@thijskh thijskh merged commit 8e06a19 into simplesamlphp:master Oct 18, 2016
@thijskh
Copy link
Copy Markdown
Member

thijskh commented Oct 18, 2016

Merged. thanks!

@jaimeperez
Copy link
Copy Markdown
Member

Thank you guys!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants