Changes between Version 6 and Version 7 of CredPrinterDocs


Ignore:
Timestamp:
Oct 6, 2011 11:11:50 AM (13 years ago)
Author:
faber
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • CredPrinterDocs

    v6 v7  
    195195    an integer, the [source:doc/API libabac return code] of the attempted conversion.  If this is non-zero, the '''str''' and '''auxstr''' contents are undefined.  ({{{cred_server.py}}} sets them to the empty string, but do not rely on that.)
    196196
     197Attribute certificates include two additional fields containing the parsed contents of the head and tail of the credential.  These are in struct fields '''head''' and '''tail'''. Each of those structs containe between 2 and 4 of these fields, corresponding the the analogous Creddy fields:
     198  '''principal'''::
     199   the keyid of the principal (always prsent)
     200  '''pretty_principal''':
     201   the human-readable name of the principal (CN) if known, or the keyid if not (always present)
     202  '''role''':
     203   Simple role (no dots).  Present if a role is being assigned
     204  '''linked_role''':
     205   The linked role, present if a this is a linking role
     206
    197207The output array is ''not'' guaranteed to be in the same order as the input array (and generally will not be).  Use the '''id''' member to match input and output.
    198208
     
    202212{{{
    203213[
    204    {'credential': <xmlrpclib.Binary instance at 0x28b3dacc>, 'id': '000'},
    205    {'credential': <xmlrpclib.Binary instance at 0x28b3db6c>, 'id': '001'},
    206    {'credential': <xmlrpclib.Binary instance at 0x28b3db4c>, 'id': '002'}
     214 {'credential': <xmlrpclib.Binary instance at 0x803667cb0>, 'id': '000'},
     215 {'credential': <xmlrpclib.Binary instance at 0x803667cf8>, 'id': '001'},
     216 {'credential': <xmlrpclib.Binary instance at 0x803667d40>, 'id': '002'},
     217 {'credential': <xmlrpclib.Binary instance at 0x803667d88>, 'id': '003'}
    207218]
    208219}}}
    209220
    210 Three dicts/structs are encoded with a serial number as id and the binary of the credential.
     221Four dicts/structs are encoded with a serial number as id and the binary of the credential.
    211222
    212223Response
    213224{{{
    214225[
    215    {'credential': <xmlrpclib.Binary instance at 0x28b3dacc>, 'errcode': 0, 'auxstr': 'Acme', 'str': '9b47d3669b99a4ce1d3a0055be002ea6a580041a', 'type': 'identity', 'id': '000'},
    216    {'credential': <xmlrpclib.Binary instance at 0x28b3db6c>, 'errcode': 0, 'auxstr': 'Acme.partner <- f923e9f69d33b52d8bbdfd19f2ec89dde7beedd7', 'str': '9b47d3669b99a4ce1d3a0055be002ea6a580041a.partner <- f923e9f69d33b52d8bbdfd19f2ec89dde7beedd7', 'type': 'attribute', 'id': '001'},
    217    {'credential': <xmlrpclib.Binary instance at 0x28b3db4c>, 'errcode': -1, 'auxstr': '', 'str': '', 'type': 'unknown', 'id': '002'}
     226 {'auxstr': 'Acme',
     227  'credential': <xmlrpclib.Binary instance at 0x803667cb0>,
     228  'errcode': 0,
     229  'id': '000',
     230  'str': 'bb2f2f3544daa44f9f8f3b5cd2d8d71f6dc2974d',
     231  'type': 'identity'},
     232 {'auxstr': 'Acme.buy_rockets <- Acme.preferred_customer',
     233  'credential': <xmlrpclib.Binary instance at 0x803667cf8>,
     234  'errcode': 0,
     235  'head': {'pretty_principal': 'Acme',
     236           'principal': 'bb2f2f3544daa44f9f8f3b5cd2d8d71f6dc2974d',
     237           'role': 'buy_rockets'},
     238  'id': '001',
     239  'str': 'bb2f2f3544daa44f9f8f3b5cd2d8d71f6dc2974d.buy_rockets <- bb2f2f3544daa44f9f8f3b5cd2d8d71f6dc2974d.preferred_customer',
     240  'tail': {'pretty_principal': 'Acme',
     241           'principal': 'bb2f2f3544daa44f9f8f3b5cd2d8d71f6dc2974d',
     242           'role': 'preferred_customer'},
     243  'type': 'attribute'},
     244 {'auxstr': 'Acme.preferred_customer <- 9b2c1d0949e667a2264b200602aba5f3560e8404',
     245  'credential': <xmlrpclib.Binary instance at 0x803667d40>,
     246  'errcode': 0,
     247  'head': {'pretty_principal': 'Acme',
     248           'principal': 'bb2f2f3544daa44f9f8f3b5cd2d8d71f6dc2974d',
     249           'role': 'preferred_customer'},
     250  'id': '002',
     251  'str': 'bb2f2f3544daa44f9f8f3b5cd2d8d71f6dc2974d.preferred_customer <- 9b2c1d0949e667a2264b200602aba5f3560e8404',
     252  'tail': {'pretty_principal': '9b2c1d0949e667a2264b200602aba5f3560e8404',
     253           'principal': '9b2c1d0949e667a2264b200602aba5f3560e8404'},
     254  'type': 'attribute'},
     255 {'auxstr': '',
     256  'credential': <xmlrpclib.Binary instance at 0x803667d88>,
     257  'errcode': -1,
     258  'id': '003',
     259  'str': '',
     260  'type': 'unknown'}
    218261]
    219262}}}
    220263
    221 The first dict/struct is an identity, the second an attribute, and the third an invalid certificate.
     264The first dict/struct is an identity, the second and third are attributes, and the fourth an invalid certificate.