source: TI12-security/trunk/documentation/epydoc/ndg.security.common.CredWallet.CredRepos-class.html @ 4245

Subversion URL: http://proj.badc.rl.ac.uk/svn/ndg/TI12-security/trunk/documentation/epydoc/ndg.security.common.CredWallet.CredRepos-class.html@4245
Revision 4245, 15.6 KB checked in by pjkersha, 11 years ago (diff)

Working unit tests for WSGI based Attribute Authority.

  • Altered so that all Attribute Config is picked up from the Paste ini file. Separate cfg or xml based config file is still supported.

TODO:

  • Simplify unit test config for client.
Line 
1<?xml version="1.0" encoding="ascii"?>
2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
3          "DTD/xhtml1-transitional.dtd">
4<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5<head>
6  <title>ndg.security.common.CredWallet.CredRepos</title>
7  <link rel="stylesheet" href="epydoc.css" type="text/css" />
8  <script type="text/javascript" src="epydoc.js"></script>
9</head>
10
11<body bgcolor="white" text="black" link="blue" vlink="#204080"
12      alink="#204080">
13<!-- ==================== NAVIGATION BAR ==================== -->
14<table class="navbar" border="0" width="100%" cellpadding="0"
15       bgcolor="#a0c0ff" cellspacing="0">
16  <tr valign="middle">
17  <!-- Home link -->
18      <th>&nbsp;&nbsp;&nbsp;<a
19        href="ndg-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
20
21  <!-- Tree link -->
22      <th>&nbsp;&nbsp;&nbsp;<a
23        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
24
25  <!-- Index link -->
26      <th>&nbsp;&nbsp;&nbsp;<a
27        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
28
29  <!-- Help link -->
30      <th>&nbsp;&nbsp;&nbsp;<a
31        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
32
33  <!-- Project homepage -->
34      <th class="navbar" align="right" width="100%">
35        <table border="0" cellpadding="0" cellspacing="0">
36          <tr><th class="navbar" align="center"
37            >NDG Security</th>
38          </tr></table></th>
39  </tr>
40</table>
41<table width="100%" cellpadding="0" cellspacing="0">
42  <tr valign="top">
43    <td width="100%">
44      <span class="breadcrumbs">
45        <a href="ndg-module.html">Package&nbsp;ndg</a> ::
46        <a href="ndg.security-module.html">Package&nbsp;security</a> ::
47        <a href="ndg.security.common-module.html">Package&nbsp;common</a> ::
48        <a href="ndg.security.common.CredWallet-module.html">Module&nbsp;CredWallet</a> ::
49        Class&nbsp;CredRepos
50      </span>
51    </td>
52    <td>
53      <table cellpadding="0" cellspacing="0">
54        <!-- hide/show private -->
55        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
56    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
57      </table>
58    </td>
59  </tr>
60</table>
61<!-- ==================== CLASS DESCRIPTION ==================== -->
62<h1 class="epydoc">Class CredRepos</h1><p class="nomargin-top"><span class="codelink"><a href="ndg.security.common.CredWallet-pysrc.html#CredRepos">source&nbsp;code</a></span></p>
63<p>CredWallet's interface class to a Credential Repository</p>
64
65<!-- ==================== INSTANCE METHODS ==================== -->
66<a name="section-InstanceMethods"></a>
67<table class="summary" border="1" cellpadding="3"
68       cellspacing="0" width="100%" bgcolor="white">
69<tr bgcolor="#70b0f0" class="table-header">
70  <td colspan="2" class="table-header">
71    <table border="0" cellpadding="0" cellspacing="0" width="100%">
72      <tr valign="top">
73        <td align="left"><span class="table-header">Instance Methods</span></td>
74        <td align="right" valign="top"
75         ><span class="options">[<a href="#section-InstanceMethods"
76         class="privatelink" onclick="toggle_private();"
77         >hide private</a>]</span></td>
78      </tr>
79    </table>
80  </td>
81</tr>
82<tr>
83    <td width="15%" align="right" valign="top" class="summary">
84      <span class="summary-type">&nbsp;</span>
85    </td><td class="summary">
86      <table width="100%" cellpadding="0" cellspacing="0" border="0">
87        <tr>
88          <td><span class="summary-sig"><a href="ndg.security.common.CredWallet.CredRepos-class.html#__init__" class="summary-sig-name">__init__</a>(<span class="summary-sig-arg">self</span>,
89        <span class="summary-sig-arg">propFilePath</span>=<span class="summary-sig-default">None</span>,
90        <span class="summary-sig-arg">dbPPhrase</span>=<span class="summary-sig-default">None</span>,
91        <span class="summary-sig-arg">**prop</span>)</span><br />
92      Initialise Credential Repository abstract base class derive from this
93      class to define Credentail Repository interface Credential Wallet</td>
94          <td align="right" valign="top">
95            <span class="codelink"><a href="ndg.security.common.CredWallet-pysrc.html#CredRepos.__init__">source&nbsp;code</a></span>
96           
97          </td>
98        </tr>
99      </table>
100     
101    </td>
102  </tr>
103<tr>
104    <td width="15%" align="right" valign="top" class="summary">
105      <span class="summary-type">&nbsp;</span>
106    </td><td class="summary">
107      <table width="100%" cellpadding="0" cellspacing="0" border="0">
108        <tr>
109          <td><span class="summary-sig"><a href="ndg.security.common.CredWallet.CredRepos-class.html#addUser" class="summary-sig-name">addUser</a>(<span class="summary-sig-arg">self</span>,
110        <span class="summary-sig-arg">username</span>,
111        <span class="summary-sig-arg">dn</span>)</span><br />
112      A new user to Credentials Repository</td>
113          <td align="right" valign="top">
114            <span class="codelink"><a href="ndg.security.common.CredWallet-pysrc.html#CredRepos.addUser">source&nbsp;code</a></span>
115           
116          </td>
117        </tr>
118      </table>
119     
120    </td>
121  </tr>
122<tr>
123    <td width="15%" align="right" valign="top" class="summary">
124      <span class="summary-type">&nbsp;</span>
125    </td><td class="summary">
126      <table width="100%" cellpadding="0" cellspacing="0" border="0">
127        <tr>
128          <td><span class="summary-sig"><a href="ndg.security.common.CredWallet.CredRepos-class.html#auditCredentials" class="summary-sig-name">auditCredentials</a>(<span class="summary-sig-arg">self</span>,
129        <span class="summary-sig-arg">**attCertValidKeys</span>)</span><br />
130      Check the attribute certificates held in the repository and delete
131any that have expired</td>
132          <td align="right" valign="top">
133            <span class="codelink"><a href="ndg.security.common.CredWallet-pysrc.html#CredRepos.auditCredentials">source&nbsp;code</a></span>
134           
135          </td>
136        </tr>
137      </table>
138     
139    </td>
140  </tr>
141<tr>
142    <td width="15%" align="right" valign="top" class="summary">
143      <span class="summary-type">list</span>
144    </td><td class="summary">
145      <table width="100%" cellpadding="0" cellspacing="0" border="0">
146        <tr>
147          <td><span class="summary-sig"><a href="ndg.security.common.CredWallet.CredRepos-class.html#getCredentials" class="summary-sig-name">getCredentials</a>(<span class="summary-sig-arg">self</span>,
148        <span class="summary-sig-arg">dn</span>)</span><br />
149      Get the list of credentials for a given users DN</td>
150          <td align="right" valign="top">
151            <span class="codelink"><a href="ndg.security.common.CredWallet-pysrc.html#CredRepos.getCredentials">source&nbsp;code</a></span>
152           
153          </td>
154        </tr>
155      </table>
156     
157    </td>
158  </tr>
159<tr>
160    <td width="15%" align="right" valign="top" class="summary">
161      <span class="summary-type">&nbsp;</span>
162    </td><td class="summary">
163      <table width="100%" cellpadding="0" cellspacing="0" border="0">
164        <tr>
165          <td><span class="summary-sig"><a href="ndg.security.common.CredWallet.CredRepos-class.html#addCredentials" class="summary-sig-name">addCredentials</a>(<span class="summary-sig-arg">self</span>,
166        <span class="summary-sig-arg">dn</span>,
167        <span class="summary-sig-arg">attCertList</span>)</span><br />
168      Add new attribute certificates for a user.</td>
169          <td align="right" valign="top">
170            <span class="codelink"><a href="ndg.security.common.CredWallet-pysrc.html#CredRepos.addCredentials">source&nbsp;code</a></span>
171           
172          </td>
173        </tr>
174      </table>
175     
176    </td>
177  </tr>
178</table>
179<!-- ==================== METHOD DETAILS ==================== -->
180<a name="section-MethodDetails"></a>
181<table class="details" border="1" cellpadding="3"
182       cellspacing="0" width="100%" bgcolor="white">
183<tr bgcolor="#70b0f0" class="table-header">
184  <td colspan="2" class="table-header">
185    <table border="0" cellpadding="0" cellspacing="0" width="100%">
186      <tr valign="top">
187        <td align="left"><span class="table-header">Method Details</span></td>
188        <td align="right" valign="top"
189         ><span class="options">[<a href="#section-MethodDetails"
190         class="privatelink" onclick="toggle_private();"
191         >hide private</a>]</span></td>
192      </tr>
193    </table>
194  </td>
195</tr>
196</table>
197<a name="__init__"></a>
198<div>
199<table class="details" border="1" cellpadding="3"
200       cellspacing="0" width="100%" bgcolor="white">
201<tr><td>
202  <table width="100%" cellpadding="0" cellspacing="0" border="0">
203  <tr valign="top"><td>
204  <h3 class="epydoc"><span class="sig"><span class="sig-name">__init__</span>(<span class="sig-arg">self</span>,
205        <span class="sig-arg">propFilePath</span>=<span class="sig-default">None</span>,
206        <span class="sig-arg">dbPPhrase</span>=<span class="sig-default">None</span>,
207        <span class="sig-arg">**prop</span>)</span>
208    <br /><em class="fname">(Constructor)</em>
209  </h3>
210  </td><td align="right" valign="top"
211    ><span class="codelink"><a href="ndg.security.common.CredWallet-pysrc.html#CredRepos.__init__">source&nbsp;code</a></span>&nbsp;
212    </td>
213  </tr></table>
214 
215  <p>Initialise Credential Repository abstract base class derive from this
216  class to define Credentail Repository interface Credential Wallet</p>
217  <p>If the connection string or properties file is set a connection will
218  be made</p>
219  <dl class="fields">
220    <dt>Parameters:</dt>
221    <dd><ul class="nomargin-top">
222        <li><strong class="pname"><code>dbPPhrase</code></strong> (string) - pass-phrase to database if applicable</li>
223        <li><strong class="pname"><code>propFilePath</code></strong> (string) - file path to a properties file.  This could contain configuration
224          parameters for the repository e.g.  database connection
225          parameters</li>
226        <li><strong class="pname"><code>**prop</code></strong> (dict) - any other keywords required</li>
227    </ul></dd>
228  </dl>
229</td></tr></table>
230</div>
231<a name="addUser"></a>
232<div>
233<table class="details" border="1" cellpadding="3"
234       cellspacing="0" width="100%" bgcolor="white">
235<tr><td>
236  <table width="100%" cellpadding="0" cellspacing="0" border="0">
237  <tr valign="top"><td>
238  <h3 class="epydoc"><span class="sig"><span class="sig-name">addUser</span>(<span class="sig-arg">self</span>,
239        <span class="sig-arg">username</span>,
240        <span class="sig-arg">dn</span>)</span>
241  </h3>
242  </td><td align="right" valign="top"
243    ><span class="codelink"><a href="ndg.security.common.CredWallet-pysrc.html#CredRepos.addUser">source&nbsp;code</a></span>&nbsp;
244    </td>
245  </tr></table>
246 
247  <p>A new user to Credentials Repository</p>
248  <dl class="fields">
249    <dt>Parameters:</dt>
250    <dd><ul class="nomargin-top">
251        <li><strong class="pname"><code>username</code></strong> (string) - username for new user</li>
252        <li><strong class="pname"><code>dn</code></strong> (string) - users Distinguished Name</li>
253    </ul></dd>
254  </dl>
255</td></tr></table>
256</div>
257<a name="auditCredentials"></a>
258<div>
259<table class="details" border="1" cellpadding="3"
260       cellspacing="0" width="100%" bgcolor="white">
261<tr><td>
262  <table width="100%" cellpadding="0" cellspacing="0" border="0">
263  <tr valign="top"><td>
264  <h3 class="epydoc"><span class="sig"><span class="sig-name">auditCredentials</span>(<span class="sig-arg">self</span>,
265        <span class="sig-arg">**attCertValidKeys</span>)</span>
266  </h3>
267  </td><td align="right" valign="top"
268    ><span class="codelink"><a href="ndg.security.common.CredWallet-pysrc.html#CredRepos.auditCredentials">source&nbsp;code</a></span>&nbsp;
269    </td>
270  </tr></table>
271 
272  <pre class="literalblock">
273Check the attribute certificates held in the repository and delete
274any that have expired
275
276@type attCertValidKeys: dict
277@param **attCertValidKeys: keywords which set how to check the
278Attribute Certificate e.g. check validity time, XML signature, version
279 etc.  Default is check validity time only - See AttCert class
280
281</pre>
282  <dl class="fields">
283  </dl>
284</td></tr></table>
285</div>
286<a name="getCredentials"></a>
287<div>
288<table class="details" border="1" cellpadding="3"
289       cellspacing="0" width="100%" bgcolor="white">
290<tr><td>
291  <table width="100%" cellpadding="0" cellspacing="0" border="0">
292  <tr valign="top"><td>
293  <h3 class="epydoc"><span class="sig"><span class="sig-name">getCredentials</span>(<span class="sig-arg">self</span>,
294        <span class="sig-arg">dn</span>)</span>
295  </h3>
296  </td><td align="right" valign="top"
297    ><span class="codelink"><a href="ndg.security.common.CredWallet-pysrc.html#CredRepos.getCredentials">source&nbsp;code</a></span>&nbsp;
298    </td>
299  </tr></table>
300 
301  <p>Get the list of credentials for a given users DN</p>
302  <dl class="fields">
303    <dt>Parameters:</dt>
304    <dd><ul class="nomargin-top">
305        <li><strong class="pname"><code>dn</code></strong> (string) - users distinguished name</li>
306    </ul></dd>
307    <dt>Returns: list</dt>
308        <dd>list of Attribute Certificates</dd>
309  </dl>
310</td></tr></table>
311</div>
312<a name="addCredentials"></a>
313<div>
314<table class="details" border="1" cellpadding="3"
315       cellspacing="0" width="100%" bgcolor="white">
316<tr><td>
317  <table width="100%" cellpadding="0" cellspacing="0" border="0">
318  <tr valign="top"><td>
319  <h3 class="epydoc"><span class="sig"><span class="sig-name">addCredentials</span>(<span class="sig-arg">self</span>,
320        <span class="sig-arg">dn</span>,
321        <span class="sig-arg">attCertList</span>)</span>
322  </h3>
323  </td><td align="right" valign="top"
324    ><span class="codelink"><a href="ndg.security.common.CredWallet-pysrc.html#CredRepos.addCredentials">source&nbsp;code</a></span>&nbsp;
325    </td>
326  </tr></table>
327 
328  <p>Add new attribute certificates for a user.  The user must have been
329  previously registered in the repository</p>
330  <dl class="fields">
331    <dt>Parameters:</dt>
332    <dd><ul class="nomargin-top">
333        <li><strong class="pname"><code>dn</code></strong> (string) - users Distinguished name</li>
334        <li><strong class="pname"><code>attCertList</code></strong> (list) - list of attribute certificates</li>
335    </ul></dd>
336  </dl>
337</td></tr></table>
338</div>
339<br />
340<!-- ==================== NAVIGATION BAR ==================== -->
341<table class="navbar" border="0" width="100%" cellpadding="0"
342       bgcolor="#a0c0ff" cellspacing="0">
343  <tr valign="middle">
344  <!-- Home link -->
345      <th>&nbsp;&nbsp;&nbsp;<a
346        href="ndg-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>
347
348  <!-- Tree link -->
349      <th>&nbsp;&nbsp;&nbsp;<a
350        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>
351
352  <!-- Index link -->
353      <th>&nbsp;&nbsp;&nbsp;<a
354        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>
355
356  <!-- Help link -->
357      <th>&nbsp;&nbsp;&nbsp;<a
358        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>
359
360  <!-- Project homepage -->
361      <th class="navbar" align="right" width="100%">
362        <table border="0" cellpadding="0" cellspacing="0">
363          <tr><th class="navbar" align="center"
364            >NDG Security</th>
365          </tr></table></th>
366  </tr>
367</table>
368<table border="0" cellpadding="0" cellspacing="0" width="100%%">
369  <tr>
370    <td align="left" class="footer">
371    <a href="epydoc-log.html">Generated by Epydoc
372    3.0.1 on Thu Sep  4 09:37:43 2008</a>
373    </td>
374    <td align="right" class="footer">
375      <a target="mainFrame" href="http://epydoc.sourceforge.net"
376        >http://epydoc.sourceforge.net</a>
377    </td>
378  </tr>
379</table>
380
381<script type="text/javascript">
382  <!--
383  // Private objects are initially displayed (because if
384  // javascript is turned off then we want them to be
385  // visible); but by default, we want to hide them.  So hide
386  // them unless we have a cookie that says to show them.
387  checkCookie();
388  // -->
389</script>
390</body>
391</html>
Note: See TracBrowser for help on using the repository browser.