script to extract entityIDs
Cantor, Scott
cantor.2 at osu.edu
Sun Aug 9 14:44:18 EDT 2015
On 8/9/15, 11:22 AM, "dev on behalf of Tom Scavo" <dev-bounces at shibboleth.net on behalf of trscavo at gmail.com> wrote:
>
>Write a script that extracts the IdP entityIDs from a mixed metadata
>file (i.e., a file of IdPs and SPs). The only requirements are:
>
>1) must be reasonably fast
>2) must run on either Linux or MAC OS (or preferably both)
>3) must not require a 3rd-party software install
>
>I have a bash script that does this but it's abysmally slow. I'm sure
>someone can do better...
XSLT is the obvious way, but I haven't done one in a while and they take me an hour or two to do when I haven't been doing them recently.
Without getting too in depth into edge cases like checking validUntil, you'd match on an XPath expression of EntityDescriptor/IDPSSODescriptor and have that template match spit out @entityID from the root element.
xsltproc is generally available on both Linux and Mac.
-- Scott
More information about the dev
mailing list