Skip to content

metadata.sources xml should accept a directory #1368

Open

Description

@Lasering

Is your feature request related to a problem? Please describe.
When an IDP has a lot of SPs registered it makes more sense to have each SP metadata in an individual file. Currently this type of layout is not directly supported.

Describe the solution you'd like
metadata.sources with type xml should support a config named directory which would search for all xml files inside that directory, and add all of those metadatas.

Describe alternatives you've considered
Writing a piece of code in the config.php which lists all XML files inside the pretended directory and for each one adds an entry to metadata.sources with ['type' => 'xml', 'file' => 'path-to-the-file']

Additional context
An even better approach would be:
['type' => 'directory', 'directory' => 'the-directory', 'set' => 'remote']
All php and xml metadata files inside the-directory would be added.

A XML metadata can be easily distinguished from IDP vs SP because of md:IDPSSODescriptor vs md:SPSSODescriptor.
A simplesamlphp metadata can be easily distinguished from IDP vs SP because of the metadata-set field. In this case it is even possible to distinguish between remote vs hosted.

Activity

  1. tvdijen commented on Aug 21, 2020

    @tvdijen
    Member

    Related: #1292

    I'd like to see a generic solution that would work for both xml-files and flatfiles..
    Instead of the 'file' and 'directory' parameter we could have a 'path' parameter and then programmatically determine whether it's a file or a directory. If it's a dir, we need to wrap an iterator around the existing code..

  2. Lasering commented on Aug 21, 2020

    @Lasering
    ContributorAuthor

    That is what I was suggesting in the Additional Context.

  3. monkeyiq commented on Mar 21, 2024

    @monkeyiq
    Contributor

    I have merged a PR #2018 with this functionality into the simplesamlphp-2.3 branch and master.

    The patch should also back port to a 2.2 release reasonably well if you would like to take it for a test run.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions