OpenConext / Mujina

A mock IDP and SP using the OpenSAML library

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Trying to use the SP & issues with metadata

pjsg opened this issue · comments

I'm trying to use the Mujina-SP as part of a test harness for a SAML IdP that I'm working on. The issue that I have is that I can't figure out how to programatically set the IdP metadata into the SP. In particular, this appears to be required in order to have the signatures verify correctly.

Unfortunately I can't (easily) have a static metadata file that I inject into the Mujina-SP as it contains variable data that is determined when I run the tests.

Any ideas?

The current codebase does not support programmatically altering the IdP metadata used by the SP.

If you want to have a go at it then you could use the hook in the WebSecurityConfigurer. You can add more MetadataProvider instances. If you autowire this MetadataProvider into the SpController along with the CachingMetadataManager Bean, then you can add an endpoint to change the metadata and call the refresh on the MetadataManager.

@pjsg Did you manage to implement this or did you find a workaround? Programmatically changing the IdP metadata is not on the roadmap, but I would welcome a PR.