Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
titleURN-based entityIDs in InCommon metadata
# fetch InCommon metadata
$ MD_LOCATION=http://md.incommon.org/InCommon/InCommon-metadata.xml
$ MD_PATH=/tmp/md/InCommon-metadata.xml
$ curl --silent --dump-header /dev/tty $MD_LOCATION > $MD_PATH
HTTP/1.1 200 OK
Date: Fri, 1222 FebApr 2016 12:3447:3037 GMT
Server: Apache
Last-Modified: Thu, 1121 FebApr 2016 2018:2759:4230 GMT
ETag: "110328-10843d5208d373-52b8461eaab80531034f616880"
Accept-Ranges: bytes
Content-Length: 1731886934132851
Connection: close
Content-Type: application/samlmetadata+xml
 
# count the legacy URN-based entityIDs issued to InCommon IdPsentities
$ cat $MD_PATH \
  | grep -E ' entityID="urn:mace:incommon:[^:"]+"' \
  | sed -e 's/^.* entityID="\(urn:mace:incommon:[^:"]*\)".*$/\1/' \
  | wc -l 
      7577
 
# count all the URN-based entityIDs in InCommon metadata,
# including entities registered by other federations
$ cat $MD_PATH \
  | grep -F ' entityID="urn:' \
  | sed -e 's/^.* entityID="\([^"]*\)".*$/\1/' \
  | wc -l 
      76106

Simply omit the last command in the pipe (wc) to produce the actual list, or better yet, view a pre-computed list of URN-based entityIDs in InCommon metadata.