Pipes and plumbing. Plumbing instances are sequences of pipes. Each pipe is called in order to load, select, transform, sign or output SAML metadata.
Bases: pyff.utils.PyffException
Bases: object
A delayed pipeline callback used as a post for parse_metadata
Bases: dict
The plugin registry uses pkg_resources.iter_entry_points to list all EntryPoints in the group ‘pyff.pipe’. All pipe entry_points must have the following prototype:
Referencing this function as an entry_point using something = module:the_somethig_func in setup.py allows the function to be referenced as ‘something’ in a pipeline.
Bases: object
A plumbing instance represents a basic processing chain for SAML metadata. A simple, yet reasonably complete example:
- load:
- /var/metadata/registry
- http://md.example.com
- select:
- #md:EntityDescriptor[md:IDPSSODescriptor]
- xslt:
stylesheet: tidy.xsl
- fork:
- finalize:
Name: http://example.com/metadata.xml
cacheDuration: PT1H
validUntil: PT1D
- sign:
key: signer.key
cert: signer.crt
- publish: /var/metadata/public/metadata.xml
Running this plumbing would bake all metadata found in /var/metadata/registry and at http://md.example.com into an EntitiesDescriptor element with @Name http://example.com/metadata.xml, @cacheDuration set to 1hr and @validUntil 1 day from the time the ‘finalize’ command was run. The tree woud be transformed using the “tidy” stylesheets and would then be signed (using signer.key) and finally published in /var/metadata/public/metadata.xml
Bases: object
Represents a single request. When processing a set of pipelines a single request is used. Any part of the pipeline may modify any of the fields.
The inner request pipeline processor.
Parameters: | pl – The plumbing to run this request through |
---|
The main entrypoint for processing a request pipeline. Calls the inner processor.
Parameters: |
|
---|---|
Returns: | The result of applying the processing pipeline to t. |
Return a triple callable,name,args of the pipe specified by the object d.
Parameters: | d – The following alternatives for d are allowed: |
---|
Register the decorated function in the pyff pipe registry :param name: optional name - if None, use function name
Create a new plumbing instance by parsing yaml from the filename.
Parameters: | fn – A filename containing the pipeline. |
---|---|
Returns: | A plumbing object |
This uses the resource framework to locate the yaml file which means that pipelines can be shipped as plugins.