Currently writeMetadataToResponse method on Saml2MetadataFilter is private, we may need it protected, so we can allow developer to customize the SP metadata file name.
Comment From: jzheaux
Thanks for the suggestion, @GitHanter.
How would your application determine the name of the file? I'm wondering if something more involved than Saml2MetadataFilter#setMetadataFilename is needed.
Comment From: spring-projects-issues
If you would like us to look at this issue, please provide the requested information. If the information is not provided within the next 7 days this issue will be closed.
Comment From: GitHanter
Thanks for the suggestion, @GitHanter.
How would your application determine the name of the file? I'm wondering if something more involved than
Saml2MetadataFilter#setMetadataFilenameis needed.
We name it as sp-<registrationId>-metadata.xml, but I think we should give developer a chance to change the metadata file name.
Comment From: jzheaux
Thanks, @GitHanter, that makes sense.
It would be nice to have a setter that supports the {registrationId} placeholder as other SAML configuration values do.
Would you be able to provide a PR to add Saml2MetadataFilter#setMetadataFilename(String), where the filter resolves {registrationId} placeholders? Then, you could do:
Saml2MetadataFilter filter = new ...
filter.setMetadataFilename("sp-{registrationId}-metadata.xml");
Comment From: GitHanter
@jzheaux Sure, I'll do the PR this weekend.