Hi Martin,
Here is what I am doing right now with pyFF (though I just found a
somewhat critical issue that I am going to report on/ask for help soon):
(Apologies for the shorthand...)
docker pull redis:5.0.5
mkdir -p /tmp/redis-data
docker run \
-d \
--name redis \
-v /tmp/redis-data:/data \
-p 6379:6379 \
redis:5.0.5
mkdir /opt/pyff
pushd /opt/pyff
virtualenv --python=python3.5 .
/opt/pyff/bin/activate
pip install --upgrade pip
pip install
git+https://github.com/IdentityPython/pyFF.git at
f74a2278be7a806fe4c0aae8e51c8e4f8708f26d
gunicorn \
--preload \
--log-config logger.ini \
--bind 0.0.0.0:8080 \
-t 600 \
-e PYFF_PIPELINE=test_mdx.yaml \
-e PYFF_UPDATE_FREQUENCY=3600 \
-e
PYFF_PUBLIC_URL=https://urlproxy.sunet.se/canit/urlproxy.php?_q=aHR0cDovLzEyNy4wLjAuMTo4MDgw&_s=ZGVmYXVsdA%3D%3D&_c=01104970&_r=c3VuZXQtc2U%3D
\
-e PYFF_STORE_CLASS=pyff.store:RedisWhooshStore \
--threads 4 \
--worker-tmp-dir=/dev/shm \
--worker-class=gthread \
pyff.wsgi:app
With this I can then do
curl
https://urlproxy.sunet.se/canit/urlproxy.php?_q=aHR0cDovLzEyNy4wLjAuMTo4MDg…
| xmllint --format -
to test MDQ.
To test the search API I can do
curl -H 'Accept: application/json'
'https://urlproxy.sunet.se/canit/urlproxy.php?_q=aHR0cDovLzEyNy4wLjAuMTo4MDgwL2FwaS9zZWFyY2g%2FcXVlcnk9d2lzY29uc2lu&_s=ZGVmYXVsdA%3D%3D&_c=92701b8b&_r=c3VuZXQtc2U%3D'
| python -m json.tool
The search API though does not run through a pyFF pipeline. If you want
that you need to do
curl -H 'Accept: application/json'
'https://urlproxy.sunet.se/canit/urlproxy.php?_q=aHR0cDovLzEyNy4wLjAuMTo4MDgwL2VudGl0aWVzLz9xdWVyeT13aXNjb25zaW4%3D&_s=ZGVmYXVsdA%3D%3D&_c=c3f4f7ba&_r=c3VuZXQtc2U%3D'
| python -m json.tool
If your plumbing includes something like this:
- select as special_discovery:
- some IdP entityID
- some other IdP entityID
- or some other selection pipe
then you can query like
curl -H 'Accept: application/json'
'https://urlproxy.sunet.se/canit/urlproxy.php?_q=aHR0cDovLzEyNy4wLjAuMTo4MDgwL2VudGl0aWVzL3NwZWNpYWxfZGlzY292ZXJ5P3F1ZXJ5PXdpc2NvbnNpbg%3D%3D&_s=ZGVmYXVsdA%3D%3D&_c=a9cfb8b0&_r=c3VuZXQtc2U%3D'
| python -m json.tool
and the results will be restricted to those IdPs you have included
for the "special" discovery.
Notes:
- You want to use the latest commit because of some issues found in the 1.1.1 release
that were later fixed.
- I am using the RedishWhooshStore backend not so much for Redis (though
that is nice) but for Whoosh. The indexing by Whoosh is better and provides
a better search experience for your users.
- I think I just found an issue, however, with how the Whoosh indexing
is generated (or not). I will be sending an email on it. Don't be surprised
if you find that the API search is not returning results if you follow
the recipe aboved. It was working for me previously, but I ran into trouble yesterday...
HTH,
Scott K
@Scott: have you made any progress that we can make
use of since last time you
asked?