Módosítások

AA Testing

1 433 bájt hozzáadva, 2017. szeptember 15., 20:47
getopt version of the script
<source lang="bash">
#!/bin/bash
 
basedir=$(dirname $0)
# URL of the Attribute Authority
# Testing principal (subject)
Principal="bajnokk@niif.hu"
# HEXAA cert
AACert="$basedir/home/bajnokkkeys/hexaa.eduid.hu-aa.crt"
# EntityID and credentials of the SP on behalf of which
# the request is made
ReqSP="https://devsp.aaihexaa.niifeduid.hu/shibbolethtest"ReqCert="$basedir/etckeys/shibboleth/devtest.sp.aaihexaa.niifeduid.hu.shibboleth-fed.crt"ReqKey="$basedir/keys/test.sp.hexaa.eduid.hu-fed.key"  usage () { cat <<EOSUsage: $0 [options] Options: -a uri Attribute Authority URI. Defaults to 'https://etchexaa.eduid.hu:8443/shibbolethsimplesaml/devmodule.aaiphp/aa/attributeserver.php' -p principal Testing principal (user name / subject). Defaults to 'bajnokk@niif.hu'.shibboleth -s entity EntityID of the SP on behalf of which the request is made.Defaults to 'https://sp.hexaa.eduid.hu/test' -k keyfile Key file in PEM format containing the keyof the SP used for the request. Defaults to 'keys/test.sp.hexaa.eduid.hu-fed.key' -c certfile Cert file in PEM format containing the certificate of the SP used for the request. Defaults to 'keys/test.sp.hexaa.eduid.hu-fed.crt'EOS exit 3}
# Get command line arguments
while getopts "a:p:s:k:c:h" opt; do
case $opt in
a)
AA_URI=$OPTARG
;;
p)
Principal=$OPTARG
;;
s)
ReqSP=$OPTARG
;;
k)
ReqKey=$OPTARG
;;
c)
ReqCert=$OPTARG
;;
h)
usage
;;
\?)
usage
;;
esac
done
DATE=$(date --utc +%FT%TZ)
echo "$REQ_XML" | \
curl --silent --show-error --cacert $AACert --cert $ReqCert --key $ReqKey \
--header "Content-Type: text/xml;charset=UTF-8" --data @- $AA_URI
 
</source>
[[Category: HOWTO]]

Navigációs menü