summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
authorRoland Hedberg <roland.hedberg@adm.umu.se>2014-10-28 10:45:02 -0400
committerRoland Hedberg <roland.hedberg@adm.umu.se>2014-10-28 10:45:02 -0400
commitf05587c9111297ec591755382a71f1ea66cc8015 (patch)
tree7703901cd163a1ff8ad84d40f822ea8b79b37e8d /doc
parenta714765c9ea2e48b3cfb8ba29c9c195cdd11a1c4 (diff)
downloadpysaml2-f05587c9111297ec591755382a71f1ea66cc8015.tar.gz
Messed up the documentation. Now trying to fix it.
Diffstat (limited to 'doc')
-rw-r--r--doc/conf.py125
-rw-r--r--doc/howto.rst431
-rw-r--r--doc/index.rst52
-rw-r--r--doc/install.rst43
-rw-r--r--doc/make.bat146
-rwxr-xr-xdoc/make.sh4
6 files changed, 128 insertions, 673 deletions
diff --git a/doc/conf.py b/doc/conf.py
index 81a57fd9..8397b3d7 100644
--- a/doc/conf.py
+++ b/doc/conf.py
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
#
-# SAML2test documentation build configuration file, created by
-# sphinx-quickstart on Sat Jan 19 11:38:19 2013.
+# pysaml2 documentation build configuration file, created by
+# sphinx-quickstart on Mon Aug 24 08:13:41 2009.
#
# This file is execfile()d with the current directory set to its containing dir.
#
@@ -12,21 +12,17 @@
# serve to show the default.
import sys, os
-import alabaster
# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
-#sys.path.insert(0, os.path.abspath('.'))
+#sys.path.append(os.path.abspath('.'))
# -- General configuration -----------------------------------------------------
-# If your documentation needs a minimal Sphinx version, state it here.
-#needs_sphinx = '1.0'
-
# Add any Sphinx extension module names here, as strings. They can be extensions
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
-extensions = ['alabaster', 'sphinx.ext.autodoc', 'sphinx.ext.viewcode']
+extensions = ['sphinx.ext.autodoc', 'sphinx.ext.doctest', 'sphinx.ext.coverage']
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
@@ -35,23 +31,23 @@ templates_path = ['_templates']
source_suffix = '.rst'
# The encoding of source files.
-#source_encoding = 'utf-8-sig'
+#source_encoding = 'utf-8'
# The master toctree document.
master_doc = 'index'
# General information about the project.
-project = u'SAML2test'
-copyright = u'2013, Roland Hedberg'
+project = u'pysaml2'
+copyright = u'2010-2011, Roland Hedberg'
# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
-version = '0.3.0'
+version = '1.2'
# The full version, including alpha/beta/rc tags.
-release = '0.3.0'
+release = '1.2.0beta'
# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
@@ -63,9 +59,12 @@ release = '0.3.0'
# Else, today_fmt is used as the format for a strftime call.
#today_fmt = '%B %d, %Y'
-# List of patterns, relative to source directory, that match files and
-# directories to ignore when looking for source files.
-exclude_patterns = ['_build']
+# List of documents that shouldn't be included in the build.
+#unused_docs = []
+
+# List of directories, relative to source directory, that shouldn't be searched
+# for source files.
+exclude_trees = ['_build']
# The reST default role (used for this markup: `text`) to use for all documents.
#default_role = None
@@ -90,27 +89,9 @@ pygments_style = 'sphinx'
# -- Options for HTML output ---------------------------------------------------
-# The theme to use for HTML and HTML Help pages. See the documentation for
-# a list of builtin themes.
-html_theme_path = [alabaster.get_path()]
-html_theme = 'alabaster'
-html_sidebars = {
- '**': [
- 'about.html',
- 'navigation.html',
- 'searchbox.html',
- 'donate.html',
- ]
-}
-
-html_theme_options = {
- 'description': '',
- 'github_button': False,
- 'github_user': 'its-dirg',
- 'github_repo': 'IdProxy',
- 'github_banner': False,
-
-}
+# The theme to use for HTML and HTML Help pages. Major themes that come with
+# Sphinx are currently 'default' and 'sphinxdoc'.
+html_theme = 'default'
# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
@@ -157,7 +138,7 @@ html_static_path = ['_static']
#html_additional_pages = {}
# If false, no module index is generated.
-#html_domain_indices = True
+#html_use_modindex = True
# If false, no index is generated.
#html_use_index = True
@@ -168,41 +149,30 @@ html_static_path = ['_static']
# If true, links to the reST sources are added to the pages.
#html_show_sourcelink = True
-# If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
-#html_show_sphinx = True
-
-# If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
-#html_show_copyright = True
-
# If true, an OpenSearch description file will be output, and all pages will
# contain a <link> tag referring to it. The value of this option must be the
# base URL from which the finished HTML is served.
#html_use_opensearch = ''
-# This is the file name suffix for HTML files (e.g. ".xhtml").
-#html_file_suffix = None
+# If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml").
+#html_file_suffix = ''
# Output file base name for HTML help builder.
-htmlhelp_basename = 'SAML2testdoc'
+htmlhelp_basename = 'pysaml2doc'
# -- Options for LaTeX output --------------------------------------------------
-latex_elements = {
-# The paper size ('letterpaper' or 'a4paper').
-#'papersize': 'letterpaper',
+# The paper size ('letter' or 'a4').
+#latex_paper_size = 'letter'
# The font size ('10pt', '11pt' or '12pt').
-#'pointsize': '10pt',
-
-# Additional stuff for the LaTeX preamble.
-#'preamble': '',
-}
+#latex_font_size = '10pt'
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass [howto/manual]).
latex_documents = [
- ('index', 'SAML2test.tex', u'SAML2test Documentation',
+ ('index', 'pysaml2.tex', u'pysaml2 Documentation',
u'Roland Hedberg', 'manual'),
]
@@ -214,48 +184,11 @@ latex_documents = [
# not chapters.
#latex_use_parts = False
-# If true, show page references after internal links.
-#latex_show_pagerefs = False
-
-# If true, show URL addresses after external links.
-#latex_show_urls = False
+# Additional stuff for the LaTeX preamble.
+#latex_preamble = ''
# Documents to append as an appendix to all manuals.
#latex_appendices = []
# If false, no module index is generated.
-#latex_domain_indices = True
-
-
-# -- Options for manual page output --------------------------------------------
-
-# One entry per manual page. List of tuples
-# (source start file, name, description, authors, manual section).
-man_pages = [
- ('index', 'saml2test', u'SAML2test Documentation',
- [u'Roland Hedberg'], 1)
-]
-
-# If true, show URL addresses after external links.
-#man_show_urls = False
-
-
-# -- Options for Texinfo output ------------------------------------------------
-
-# Grouping the document tree into Texinfo files. List of tuples
-# (source start file, target name, title, author,
-# dir menu entry, description, category)
-texinfo_documents = [
- ('index', 'SAML2test', u'SAML2test Documentation',
- u'Roland Hedberg', 'SAML2test', 'One line description of project.',
- 'Miscellaneous'),
-]
-
-# Documents to append as an appendix to all manuals.
-#texinfo_appendices = []
-
-# If false, no module index is generated.
-#texinfo_domain_indices = True
-
-# How to display URL addresses: 'footnote', 'no', or 'inline'.
-#texinfo_show_urls = 'footnote'
+#latex_use_modindex = True
diff --git a/doc/howto.rst b/doc/howto.rst
deleted file mode 100644
index 5fa65de8..00000000
--- a/doc/howto.rst
+++ /dev/null
@@ -1,431 +0,0 @@
-.. _howto:
-
-How to use SAML2test
-====================
-
-:Release: |release|
-:Date: |today|
-
-Before you can use SAML2test, you must get it installed.
-If you have not done so yet, read `Install <install.rst>`_.
-
-When you want to test a SAML2 entity with this tool you need following things:
-
-#. The Test Driver Configuration, an example can be found in tests/idp_test/config.py
-#. Attribute Maps mapping URNs, OIDs and friendly names
-#. Key files for the test tool
-#. A metadata file representing the tool
-#. The Test Target Configuration file describes how to interact with the entity to be tested. The metadata for the entity is part of this file. An example can be found in tests/idp_test/test_target_config.py.
-
-These files should be stored outside the saml2test package to have a clean separation between the package and a particular test configuration. To create a directory for the configuration files copy the saml2test/tests including its contents.
-
-
-(1) Test Driver Configuration
-:::::::::::::::::::::::::::::
-
-This is a normal `PySAML2 configuration file <http://pythonhosted.org/pysaml2/howto/config.html>`_. You can have more than one and then chose which one to use at run time by supplying the test script with an argument. If no configuration is explicitly provided than **tests/ipd_test/config.py** is provided as a default.
-
-This configuration mostly contains the test tool’s metadata structured as a Python dictionary. It doesn't vary a lot between testing different IdPs, except for the value of BASE, and optionally these control options:
-
-In addition to the configuration directives documented for the PySAML2 configuration file these may be used:
-
-accepted_time_diff
-..................
-Default: 60
-
-logger
-......
-Specify the logging options for the test run.
-
-only_use_keys_in_metadata
-.........................
-If true it ignore the validation path of signing keys. As of V0.4.0, this does not apply to TLS keys (which does not conform to [SAML MetaIOP].
-If false it does validate the signing certificate against the default CA keys of pysaml2. Add the directory to python path, like:
-export PYTHONPATH=/some_path/saml2test.conf   # Remember: no trailing slash in PYTHONPATH
-
-secret
-......
-Not being used currently
-
-You could also change organization and contact information if you'd like to.
-
-(2) Attribute Mapping
-:::::::::::::::::::::
-Attributes that may be contained in a SAML assertion must be defined in the attribute mapping as documented in the `PySAML2 config guide <http://pythonhosted.org/pysaml2/howto/config.html#attribute-map-dir>`_. If the ‚to‘ and ‚fro‘ mappings are exactly the same just one of them is required. But sometimes it is necessary to have both "to" and "from" because translation isn't symmetric. Like having "sn" and "surname" mapping to the same urn.
-
-You may copy the default mapping into your test configuration directory:
-cp -pr saml2test/tests/attributemaps .
-
-There must be one file per attribute namespace, i.e. attrname-format:basic needs to go into basic.py, and attrname-format:uri needs to go into saml_uri.py.
-
-(3) Key Files
-:::::::::::::
-The test tool’s metadata needs key files, both a private key and a certificate. The default files are provided in same2test/tests/keys as:
-mykey.pem
-mycert.pem
-To change file names, the references in the Tool Configuration need be be changed as well.
-
-(4) Test Tool Metadata
-::::::::::::::::::::::
-The test tool’s metadata is generated from the contents of the Tool Configuration, e.g.:
-make_metadata.py config.py > testdrv_metadata.xml
-
-The resulting SAML2 metadata needs to be imported to the test target.
-
-
-(5) Test Target Configuration File
-::::::::::::::::::::::::::::::::::
-This configuration is contained in the "info" Python dictionary.
-
-The keys are:
-
-entity_id
-.........
-
-**entity_id** is really only necessary if there is more than one entity
-represented in the metadata. If not provided and if the **metadata** only
-describes one entity that entity's entityID is used.
-
-start_page
-..........
-
-URL for the initial request the test driver issues when executing an SP test.
-
-args
-....
-
-Contains a Python dictionary controlling some aspects of an Authnentication Response" with following structure::
-
- "AuthnResponse": {
- "sign_assertion": True,
- "authn": {"class_ref": AUTHN_PASSWORD_PROTECTED, # Authentication Context Class Reference
- "authn_auth": "http://authnservice.example.com/login"} # Authenticating Authority
- },
-
-identity
-........
-
-Contains a list of key-value pairs with attribute names and values, that the embedded IDP will include in assertions.
-Attribute Names in this context are friendly names, not URNs/OIDs.
-To obtain these attributes from the IDP there are three options:
- #. include an EntityCategory in the EntityDescriptor of the SP. The EntityCategory must be defined in pysaml2.
- #. include RequestedAttributes in the EntityDescriptor of the SP.
- #. include RequestedAttributes in the AuthnRequest.
-These methods work additive. Attributes must be registered in the attribute map.
-
-userid
-......
-
-The UserID used as a base for the Assertion/Subject/NameID.
-
-
-interaction
-...........
-
-The really hard part is the **interaction** part. This is where the
-the script is told how to fake that there is a human behind the keyboard.
-
-It consists of a lists of dictionaries with the keys: **matches**,
-**page-type** and **control**.
-
-The idea is to use **matches** to **activated** a corresponding set of **controls**.
-
-matches
--------
-
-**matches** is used to identify a page or a form within a page.
-There are four different things that can be used to match the page:
-
-* url : The action url
-* title : The title of the page, substring matching is used.
-* content: Something in the page, again substring matching is used, and finally
-* class: (currently not used)
-
-Normally the front-end will pick out the necessary information by
-using a users interaction with the entity. If you are running this
-directly from the prompt then you have to provide the information.
-You can build this information by using the fact that the script will
-dump any page it doesn't know what to do with.
-
-An example::
-
-
- {
- "matches": {
- "url": "http://localhost:8088/login",
- "title": 'IDP test login'
- },
- "page-type": "login",
- "control": {
- "type": "form",
- "set": {"login": "roland", "password": "dianakra"}
- }
- }
-
-The action here is to set the control *login* to 'roland' and the control
-*password* to 'dianakra' and then post the form.
-
-Or if the server uses HTTP Post binding::
-
- {
- "matches": {
- "url": "http://localhost:8088/sso/redirect",
- "title": "SAML 2.0 POST"
- },
- "control": {
- "type": "response",
- "pick": {"form": {"action":"http://localhost:8088/acs"}}
- }
- },
-
-Here the action is just to post the form, no information is added to the form.
-
-page-type
----------
-
-**page-type** is used to mark the page as *login* or *user-consent*.
-This is used in specific conversation where one or the other is expected
-in certain circumstances.
-
-control
--------
-
-**control** specifies what the script should enter where and which button
-to press.
-
-metadata
-........
-
-This is then the metadata for the entity to be tested. As noted previously
-the metadata can actually describe more than one entity. In this case
-the **entity_id** must be specified explicitly.
-
-Running the script testing an IDP
-:::::::::::::::::::::::::::::::::
-
-Synopsis::
-
- $ idp_testdrv.py --help
- usage: idp_testdrv.py [-h] [-d] [-H] [-C CA_CERTS] [-J TT_CONFIG_FILE] [-m] [-l]
- [-c TD_CONFIG]
- [oper]
-
- positional arguments:
- oper Which test to run
-
- optional arguments:
- -C CA_CERTS CA certs to use to verify HTTPS server certificates, if
- HTTPS is used and no server CA certs are defined then
- no cert verification will be done. For a generic validation you may use the ca_bundle.crt
- file that comes with Mozilla.
- -c TD_CONFIG, --config Test driver configuration module at the current directory or the path specified
- with the -P option. Do not use relative paths or the .py filename extension
- -d, --debug Print debug information to stderr
- -H, --prettyprint Status output as human readable python dictionary
- -h, --help show this help message and exit
- -J TT_CONFIG_FILE Test target configuration in JSON format
- -L, --log Print HTTP log information # TODO: update documentation
- -l, --list List all the test operations as a JSON object
- -m, --metadata Return the SP metadata
- -O, --operations Operations module (generated from Repository as idp_saml2base.py)
- -P, --configpath Path to the configuration file for the SP
- -t, --testpackage Module describing tests (e.g. idp_samlbase.py generated from repository)
- -Y, --pysamllog Print pySAML2 logs to stderr
-
- Output on stdout is a JSON dicitionary containing the test summary (overwrite with -H).
- Output to stderr is the log file
-
-
-Remember to generate the test target's config file in json format from python.
-
-
-Running the script testing an SP
-::::::::::::::::::::::::::::::::
-
-Synopsis::
-
- $ sp_testdrv.py --help
- usage: sp_testdrv.py [-h] [-H] [-d] [-C CA_CERTS] [-J TT_CONFIG_FILE] [-m] [-l] [-c TD_CONFIG] [oper]
-
- positional arguments:
- oper Which test to run (mandatory except for options -h, -l and -m)
-
- optional arguments:
- -C CA_CERTS CA certs to use to verify HTTPS server certificates, if
- HTTPS is used and no server CA certs are defined then
- no cert verification will be done. For a generic validation you may use the ca_bundle.crt
- file that comes with Mozilla.
- -c TD_CONFIG, --config Test driver configuration module at the current directory or the path specified
- with the -P option. Do not use relative paths or filename extension
- -d, --debug Print debug information to stderr
- -h, --help show this help message and exit
- -H, --prettyprint Status output as human readable python dictionary
- -J TT_CONFIG_FILE Test target configuration in JSON format
- -k Print HTTP response contents into separate files
- -L, --log Path to the logfile directory
- -l, --list List all the test flows as a JSON object
- -m, --metadata Return the SP metadata
- -O, --operations Operations module (generated from Repository as idp_saml2base.py)
- -P, --configpath Path to the configuration file for the SP
- -t, --testpackage Module describing tests (e.g. sp_testbase.py generated from repository)
- -Y, --pysamllog Print pySAML2 logs to stderr
-
- Output on stdout is a JSON dicitionary containing the test summary (overwrite with -H).
- Output to stderr is the log file
-
-Examples
-::::::::
-
-To see what tests are available::
-
- $ idp_testdrv.py -l
- [
- {
- "id": "basic-authn",
- "descr": "AuthnRequest using HTTP-redirect",
- "name": "Absolute basic SAML2 AuthnRequest"
- }, {
- "id": "basic-authn-post",
- "descr": "AuthnRequest using HTTP-POST",
- "name": "Basic SAML2 AuthnRequest using HTTP POST"
- }, {
- "id": "log-in-out",
- "descr": "AuthnRequest using HTTP-redirect followed by a logout",
- "name": "Absolute basic SAML2 log in and out"
- }, {
- "id": "authn-assertion_id_request",
- "descr": "AuthnRequest followed by an AssertionIDRequest",
- "name": "AuthnRequest and then an AssertionIDRequest"
- }, {
- "id": "authn-authn_query",
- "descr": "AuthnRequest followed by an AuthnQuery",
- "name": "AuthnRequest and then an AuthnQuery"
- }
- ]
-
-A typical command would then be (reformated to be more readable)::
-
- $ idp_testdrv.py -J localhost.json 'log-in-out'
- {
- "status": 1,
- "tests": [
- {
- "status": 1,
- "id": "check-saml2int-metadata",
- "name": "Checks that the Metadata follows the profile"
- }, {
- "status": 1,
- "id": "check-http-response",
- "name": "Checks that the HTTP response status is within the 200 or 300 range"
- }, {
- "status": 1,
- "id": "check-http-response",
- "name": "Checks that the HTTP response status is within the 200 or 300 range"
- }, {
- "status": 1,
- "id": "check-http-response",
- "name": "Checks that the HTTP response status is within the 200 or 300 range"
- }, {
- "status": 1,
- "id": "check-saml2int-attributes",
- "name": "Any <saml2:Attribute> elements exchanged via any SAML 2.0 messages, assertions, or metadata MUST contain a NameFormat of urn:oasis:names:tc:SAML:2.0:attrname-format:uri."
- }, {
- "status": 1,
- "id": "verify-content",
- "name": "Basic content verification class, does required and max/min checks"
- }, {
- "status": 1,
- "id": "check-logout-support",
- "name": ""
- }, {
- "status": 1,
- "id": "verify-content",
- "name": "Basic content verification class, does required and max/min checks"
- }, {
- "status": 1,
- "id": "verify-logout",
- "name": ""
- }
- ],
- "id": "log-in-out"
- }
-
-First you have the status for the whole test was '1', which is the same as OK,
-for this test run.
-The used status code are:
-
-0. INFORMATION
-1. OK
-2. WARNING (the test target's behavior is according to the spec but may not be as expected )
-3. ERROR (the test target's behavior is not according to the spec)
-4. CRITICAL (the test driver threw an exception)
-5. INTERACTION (interaction needed but matching rule does not match - applies to final page in SP test as well)
-
-Then you get all the separate sub tests that has been run during the
-conversation.
-
-If things go wrong you will get a trace log dump to stderr.
-If all goes well but you still want to see all the interaction you can do::
-
- $ idp_testdrv.py -J localhost.json -d 'basic-authn' 2> tracelog
- < same output as above >
- $ cat tracelog
- 0.017364 SAML Request: <?xml version='1.0' encoding='UTF-8'?>
- <ns0:AuthnRequest xmlns:ns0="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:ns1="urn:oasis:names:tc:SAML:2.0:assertion" AssertionConsumerServiceURL="http://localhost:8087/acs/redirect" Destination="http://localhost:8088/sso/redirect" ID="id-8c9a57670d1bc374898297702285ba74" IssueInstant="2013-01-20T09:02:44Z" ProtocolBinding="urn:oasis:names:tc:SAML:2.0:bindings:HTTP-Redirect" ProviderName="SAML2 test tool" Version="2.0"><ns1:Issuer Format="urn:oasis:names:tc:SAML:2.0:nameid-format:entity">http://localhost:8087/sp.xml</ns1:Issuer><ns0:NameIDPolicy AllowCreate="true" Format="urn:oasis:names:tc:SAML:2.0:nameid-format:persistent" /></ns0:AuthnRequest>
- 0.036136 <-- REDIRECT TO: http://localhost:8088/login?came_from=%2Fsso%2Fredirect&key=331035cf0e26cdefc15759582e34994ac8e54971
- 0.040084 <-- CONTENT:
-
-
- <html>
- <head><title>IDP test login</title>
- <link rel="stylesheet" type="text/css" href="/css/main.css" media="screen">
- <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
- </head>
- <body>
- <div class="header">
- <h1><a href="/">Login</a></h1>
- </div>
-
-
- <h1>Please log in</h1>
- <p class="description">
- To register it's quite simple: enter a login and a password
- </p>
-
- <form action="/verify" method="post">
- <input type="hidden" name="key" value="331035cf0e26cdefc15759582e34994ac8e54971"/>
- <input type="hidden" name="came_from" value="/sso/redirect"/>
-
- <div class="label">
- <label for="login">Username</label>
- </div>
- <div>
- <input type="text" name="login" value=""/><br/>
- </div>
-
- <div class="label">
- <label for="password">Password</label>
- </div>
- <div>
- <input type="password" name="password"
- value=""/>
- </div>
-
- <input class="submit" type="submit" name="form.submitted" value="Log In"/>
- </form>
-
- <div>
- <div class="footer">
- <p>&#169; Copyright 2011 Ume&#229; Universitet &nbsp;</p>
- </div>
- </div>
- </body>
- </html>
-
- 0.042697 >> login <<
- 0.042715 <-- FUNCTION: select_form
- 0.042744 <-- ARGS: {u'set': {u'login': u'roland', u'password': u'dianakra'}, u'type': u'form', 'location': 'http://localhost:8088/login?came_from=%2Fsso%2Fredirect&key=331035cf0e26cdefc15759582e34994ac8e54971', '_trace_': <idp_test.Trace object at 0x101e79750>, 'features': None}
- 0.055864 <-- REDIRECT TO: http://localhost:8088/sso/redirect?id=zLvrjojPLLgbnDyq&key=331035cf0e26cdefc15759582e34994ac8e54971
-
- ... and so on ...
-
diff --git a/doc/index.rst b/doc/index.rst
index 475cb6ec..e9447c68 100644
--- a/doc/index.rst
+++ b/doc/index.rst
@@ -1,34 +1,40 @@
-.. _index:
+.. _howto:
-.. SAML2test documentation master file, created by
- sphinx-quickstart on Sat Jan 19 11:38:19 2013.
- You can adapt this file completely to your liking, but it should at least
- contain the root `toctree` directive.
-
-Welcome to SAML2test's documentation!
-=====================================
+How to use PySAML2
+===================
:Release: |release|
:Date: |today|
-Contents:
+Before you can use Pysaml2, you'll need to get it installed.
+If you have not done it yet, read the :ref:`install`
-.. toctree::
- :maxdepth: 1
+Well, now you have it installed and you want to do something.
+
+And I'm sorry to tell you this; but there isn't really a lot you can do with
+this code on it's own.
+
+Sure you can send a AuthenticationRequest to an IdentityProvider or a
+AttributeQuery to an AttributeAuthority but in order to get what they
+return you have to sit behind a Web server. Well that is not really true since
+the AttributeQuery would be over SOAP and you would get the result over the
+connection you have to the AttributeAuthority.
- howto
- install
- saml2test
+But anyway, you may get my point. This is middleware stuff !
-Indices and tables
-==================
+PySAML2 is built to fit into a
+`WSGI <http://www.python.org/dev/peps/pep-0333/>`_ application
-* :ref:`genindex`
-* :ref:`modindex`
-* :ref:`search`
+But it can be used in a non-WSGI environment too.
+
+So you will find descriptions of both cases here.
+
+The configuration is the same disregarding whether you are using PySAML2 in a
+WSGI or non-WSGI environment.
+
+.. toctree::
+ :maxdepth: 1
-.. raw:: html
+ config
- <a href="https://github.com/rohe/saml2test" class="github" target="_blank">
- <img style="position: absolute; top: 0; right: 0; border: 0;" src="_static/ViewmeonGitHub.png" alt="Fork me on GitHub" class="github"/>
- </a> \ No newline at end of file
+
diff --git a/doc/install.rst b/doc/install.rst
index a19fd38f..58910e29 100644
--- a/doc/install.rst
+++ b/doc/install.rst
@@ -3,23 +3,35 @@
Quick install guide
===================
-Before you can use SAML2test, you'll need to get it installed. This guide
+Before you can use PySAML2, you'll need to get it installed. This guide
will guide you to a simple, minimal installation.
-Install SAML2test
------------------
+Install PySAML2
+---------------
-For all this to work you need to have Python installed.
-The development has been done using 2.7.2.
-There is no 3.X version yet.
+For all this to work you need to have Python installed.
+The development has been done using 2.7.
+There is now a 3.X version.
Prerequisites
^^^^^^^^^^^^^
-The big dependency is on pysaml2, which you for the time being must
-get from github::
+You have to have ElementTree, which is either part of your Python distribution
+if it's recent enough, or if the Python is too old you have to install it,
+for instance by getting it from the Python Package Instance by using
+easy_install.
- $ git clone https://github.com/rohe/pysaml2.git
+You also need xmlsec1 which you can download from http://www.aleksey.com/xmlsec/
+
+If you're on OS X you can get xmlsec1 installed from MacPorts or Fink.
+
+Depending on how you are going to use PySAML2 you might also need
+
+* Mako
+* pyASN1
+* repoze.who
+* python-memcache
+* memcached
Quick build instructions
^^^^^^^^^^^^^^^^^^^^^^^^
@@ -30,3 +42,16 @@ Once you have installed all the necessary prerequisites a simple::
will install the basic code.
+Note for rhel/centos 6: cffi depends on libffi-devel, and cryptography on openssl-devel to compile
+So you might want first to do:
+yum install libffi-devel openssl-devel
+
+After this you ought to be able to run the tests without an hitch.
+The tests are based on the pypy test environment, so::
+
+ cd tests
+ py.test
+
+is what you should use. If you don't have py.test, get it it's part of pypy!
+It's really good !
+
diff --git a/doc/make.bat b/doc/make.bat
index 34e7d66c..4a006237 100644
--- a/doc/make.bat
+++ b/doc/make.bat
@@ -2,15 +2,10 @@
REM Command file for Sphinx documentation
-if "%SPHINXBUILD%" == "" (
- set SPHINXBUILD=sphinx-build
-)
-set BUILDDIR=_build
-set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
-set I18NSPHINXOPTS=%SPHINXOPTS% .
+set SPHINXBUILD=sphinx-build
+set ALLSPHINXOPTS=-d _build/doctrees %SPHINXOPTS% .
if NOT "%PAPER%" == "" (
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
- set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
)
if "%1" == "" goto help
@@ -18,172 +13,99 @@ if "%1" == "" goto help
if "%1" == "help" (
:help
echo.Please use `make ^<target^>` where ^<target^> is one of
- echo. html to make standalone HTML files
- echo. dirhtml to make HTML files named index.html in directories
- echo. singlehtml to make a single large HTML file
- echo. pickle to make pickle files
- echo. json to make JSON files
- echo. htmlhelp to make HTML files and a HTML help project
- echo. qthelp to make HTML files and a qthelp project
- echo. devhelp to make HTML files and a Devhelp project
- echo. epub to make an epub
- echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
- echo. text to make text files
- echo. man to make manual pages
- echo. texinfo to make Texinfo files
- echo. gettext to make PO message catalogs
- echo. changes to make an overview over all changed/added/deprecated items
- echo. linkcheck to check all external links for integrity
- echo. doctest to run all doctests embedded in the documentation if enabled
+ echo. html to make standalone HTML files
+ echo. dirhtml to make HTML files named index.html in directories
+ echo. pickle to make pickle files
+ echo. json to make JSON files
+ echo. htmlhelp to make HTML files and a HTML help project
+ echo. qthelp to make HTML files and a qthelp project
+ echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
+ echo. changes to make an overview over all changed/added/deprecated items
+ echo. linkcheck to check all external links for integrity
+ echo. doctest to run all doctests embedded in the documentation if enabled
goto end
)
if "%1" == "clean" (
- for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
- del /q /s %BUILDDIR%\*
+ for /d %%i in (_build\*) do rmdir /q /s %%i
+ del /q /s _build\*
goto end
)
if "%1" == "html" (
- %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
- if errorlevel 1 exit /b 1
+ %SPHINXBUILD% -b html %ALLSPHINXOPTS% _build/html
echo.
- echo.Build finished. The HTML pages are in %BUILDDIR%/html.
+ echo.Build finished. The HTML pages are in _build/html.
goto end
)
if "%1" == "dirhtml" (
- %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
- goto end
-)
-
-if "%1" == "singlehtml" (
- %SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
- if errorlevel 1 exit /b 1
+ %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% _build/dirhtml
echo.
- echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
+ echo.Build finished. The HTML pages are in _build/dirhtml.
goto end
)
if "%1" == "pickle" (
- %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
- if errorlevel 1 exit /b 1
+ %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% _build/pickle
echo.
echo.Build finished; now you can process the pickle files.
goto end
)
if "%1" == "json" (
- %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
- if errorlevel 1 exit /b 1
+ %SPHINXBUILD% -b json %ALLSPHINXOPTS% _build/json
echo.
echo.Build finished; now you can process the JSON files.
goto end
)
if "%1" == "htmlhelp" (
- %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
- if errorlevel 1 exit /b 1
+ %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% _build/htmlhelp
echo.
echo.Build finished; now you can run HTML Help Workshop with the ^
-.hhp project file in %BUILDDIR%/htmlhelp.
+.hhp project file in _build/htmlhelp.
goto end
)
if "%1" == "qthelp" (
- %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
- if errorlevel 1 exit /b 1
+ %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% _build/qthelp
echo.
echo.Build finished; now you can run "qcollectiongenerator" with the ^
-.qhcp project file in %BUILDDIR%/qthelp, like this:
- echo.^> qcollectiongenerator %BUILDDIR%\qthelp\SAML2test.qhcp
+.qhcp project file in _build/qthelp, like this:
+ echo.^> qcollectiongenerator _build\qthelp\pysaml2.qhcp
echo.To view the help file:
- echo.^> assistant -collectionFile %BUILDDIR%\qthelp\SAML2test.ghc
- goto end
-)
-
-if "%1" == "devhelp" (
- %SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished.
- goto end
-)
-
-if "%1" == "epub" (
- %SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished. The epub file is in %BUILDDIR%/epub.
+ echo.^> assistant -collectionFile _build\qthelp\pysaml2.ghc
goto end
)
if "%1" == "latex" (
- %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
- goto end
-)
-
-if "%1" == "text" (
- %SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished. The text files are in %BUILDDIR%/text.
- goto end
-)
-
-if "%1" == "man" (
- %SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished. The manual pages are in %BUILDDIR%/man.
- goto end
-)
-
-if "%1" == "texinfo" (
- %SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
- if errorlevel 1 exit /b 1
- echo.
- echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
- goto end
-)
-
-if "%1" == "gettext" (
- %SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
- if errorlevel 1 exit /b 1
+ %SPHINXBUILD% -b latex %ALLSPHINXOPTS% _build/latex
echo.
- echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
+ echo.Build finished; the LaTeX files are in _build/latex.
goto end
)
if "%1" == "changes" (
- %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
- if errorlevel 1 exit /b 1
+ %SPHINXBUILD% -b changes %ALLSPHINXOPTS% _build/changes
echo.
- echo.The overview file is in %BUILDDIR%/changes.
+ echo.The overview file is in _build/changes.
goto end
)
if "%1" == "linkcheck" (
- %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
- if errorlevel 1 exit /b 1
+ %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% _build/linkcheck
echo.
echo.Link check complete; look for any errors in the above output ^
-or in %BUILDDIR%/linkcheck/output.txt.
+or in _build/linkcheck/output.txt.
goto end
)
if "%1" == "doctest" (
- %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
- if errorlevel 1 exit /b 1
+ %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% _build/doctest
echo.
echo.Testing of doctests in the sources finished, look at the ^
-results in %BUILDDIR%/doctest/output.txt.
+results in _build/doctest/output.txt.
goto end
)
diff --git a/doc/make.sh b/doc/make.sh
index 8496e1df..a2d7c6e6 100755
--- a/doc/make.sh
+++ b/doc/make.sh
@@ -1,5 +1,5 @@
#!/bin/sh
-rm -f saml2test*
-sphinx-apidoc -F -o ../doc/ ../src/saml2test
+rm -f saml2*
+sphinx-apidoc -F -o ../doc/ ../src/saml2
make clean
make html \ No newline at end of file