ECP

John Dennis jdennis at redhat.com
Thu Aug 1 20:40:07 EDT 2019


On 8/1/19 7:24 PM, Cath Messner wrote:
> Dipping my toes in ECP.
> 
> In ECP, is it possible to extract the attribute for the user (assuming 
> of course released and available)? If so, are there any example scripts 
> (Pytho, bash), that I can referenced?
> 
> So far the scripts I have found, do not extract the attributes.

It's just XML, any library that can parse and extract data from XML 
documents will work. I'm attaching a Python script that extracts the 
EntityID from metadata (also XML). You'll have to modify it find and 
extract the Attributes in the Assertion but it should give you a 
reasonable starting point. It uses xpath to find the element and one of 
the tricks is you have to provide the namespace mapping to xpath. You 
will need to understand xpath and how to use the lxml Python library 
(https://lxml.de/tutorial.html).


-- 
John Dennis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: get_entityid.py
Type: text/x-python
Size: 2486 bytes
Desc: not available
URL: <http://shibboleth.net/pipermail/users/attachments/20190801/997fe350/attachment.py>


More information about the users mailing list