Skip to content

Commit d6f650b

Browse files
committed
Add documentation for cred store common values
Signed-off-by: Simo Sorce <[email protected]>
1 parent fe6d5cc commit d6f650b

File tree

6 files changed

+88
-3
lines changed

6 files changed

+88
-3
lines changed

docs-requirements.txt

-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
Sphinx >= 1.3.1
22
sphinx-rtd-theme >= 0.2.5b1
3-
sphinxcontrib-napoleon >= 0.2.8
43
recommonmark >= 0.4.0

docs/source/conf.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030

3131
# Add any Sphinx extension module names here, as strings. They can be extensions
3232
# coming with Sphinx (named 'sphinx.ext.*') or your custom ones.
33-
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode', "sphinxcontrib.napoleon", 'gssapi_find_missing', 'requires_rfc']
33+
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx', 'sphinx.ext.todo', 'sphinx.ext.coverage', 'sphinx.ext.ifconfig', 'sphinx.ext.viewcode', "sphinx.ext.napoleon", 'gssapi_find_missing', 'requires_rfc']
3434

3535
# Add any paths that contain templates here, relative to this directory.
3636
templates_path = ['_templates']

docs/source/credstore.rst

+71
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
Common Values for Credentials Store Extensions
2+
==============================================
3+
4+
The credentials store extension is an extension introduced by the MIT krb5
5+
library implementation of GSSAPI. It allows for finer control of creedntials
6+
from within a GSSAPI application.
7+
Each mechanism can define keywords to manipulate various aspects of their
8+
credentials for storage or retrieval operations.
9+
10+
.. note:
11+
12+
Only mechanisms that implement keywords can use them, some mechanism may
13+
share the same or similar keywords, but their meaning is always local to
14+
a specific mechanism.
15+
16+
The krb5 mechanism in MIT libraries
17+
-----------------------------------
18+
19+
The krb5 mechanism as implemented by MIT libraries supports the credentials
20+
store extension with a number of keywords.
21+
22+
client_keytab
23+
"""""""""""""
24+
25+
The `client_keytab` keyword can be used in a credential store when it is used
26+
with the :func:`gssapi.raw.ext_cred_store.acquire_cred_from` /
27+
:func:`gssapi.raw.ext_cred_store.add_cred_from` functions, to indicate a
28+
custom location for a keytab containing client keys.
29+
It is not used in the context of calls used to store credentials.
30+
The value is a string in the form "type:residual" where type can be any
31+
keytab storage type understood by the implementation. If a simple path is
32+
provided then the type is assumed to be the `FILE` type.
33+
34+
keytab
35+
""""""
36+
37+
The `keytab` keyword can be used in a credential store when it is used with
38+
the :func:`gssapi.raw.ext_cred_store.acquire_cred_from` /
39+
:func:`gssapi.raw.ext_cred_store.add_cred_from` functions, to indicate a
40+
custom location for a keytab containing service keys.
41+
It is not used in the context of calls used to store credentials.
42+
The value is a string in the form "type:residual" where type can be any
43+
keytab storage type understood by the implementation. If a simple path is
44+
provided then the type is assumed to be the `FILE` type.
45+
46+
ccache
47+
""""""
48+
49+
The `ccache` keyword can be used to reference a specific credential storage.
50+
It can be used both to indicate the source of existing credentials for the
51+
:func:`gssapi.raw.ext_cred_store.acquire_cred_from` /
52+
:func:`gssapi.raw.ext_cred_store.add_cred_from` functions, as well as the
53+
destination storage for the :func:`gssapi.raw.ext_cred_store.store_cred_into`
54+
function.
55+
The value is a string in the form "type:residual" where type can be any
56+
credential cache storage type understood by the implementation. If a simple
57+
path is provided then the type is assumed to be the `FILE` type. Other
58+
commonly used types are `DIR`, `KEYRING`, `KCM`. Each type has a different
59+
format for residuals; refer to the MIT krb5 documentation for more details.
60+
61+
rcache
62+
""""""
63+
64+
The `rcache` keyword can be used to reference a custom replay cache storage.
65+
It is used only with the :func:`gssapi.raw.ext_cred_store.acquire_cred_from` /
66+
:func:`gssapi.raw.ext_cred_store.add_cred_from` functions for credentials used
67+
to accept context establishments, not to initiate contexts.
68+
The value is a string in the form "type:residual" where type can be any
69+
replay cache storage type understood by the implementation. If a simple path
70+
is provided then the type is assumed to be the `FILE` type.
71+

docs/source/index.rst

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ straight into the :doc:`high-level API documentation <gssapi>`.
2828

2929
gssapi.rst
3030
gssapi.raw.rst
31+
otherdoc.rst
3132
tutorials.rst
3233

3334

docs/source/otherdoc.rst

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
Other Documentation
2+
===================
3+
4+
This section contain documentation that is not expressed directly in functions
5+
documentation, like implementation specific quirks or issues, implementation
6+
tips, environment influence on operations and similar.
7+
8+
.. toctree::
9+
:maxdepth: 1
10+
11+
credstore.rst

gssapi/raw/ext_cred_store.pyx

+4-1
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,8 @@ usage='both')
109109
110110
Args:
111111
store (dict): the credential store information pointing to the
112-
credential store from which to acquire the credentials
112+
credential store from which to acquire the credentials.
113+
See :doc:`credstore` for valid values
113114
name (Name): the name associated with the credentials,
114115
or None for the default name
115116
lifetime (int): the desired lifetime of the credentials, or None
@@ -204,6 +205,7 @@ init_lifetime=None, accept_lifetime=None)
204205
Args:
205206
store (dict): the store into which to store the credentials,
206207
or None for the default store.
208+
See :doc:`credstore` for valid values
207209
name (Name): the name associated with the credentials
208210
mech (OID): the desired mechanism to be used with these
209211
credentials
@@ -295,6 +297,7 @@ set_default=False)
295297
Args:
296298
store (dict): the store into which to store the credentials,
297299
or None for the default store.
300+
See :doc:`credstore` for valid values
298301
creds (Creds): the credentials to store
299302
usage (str): the usage to store the credentials with -- either
300303
'both', 'initiate', or 'accept'

0 commit comments

Comments
 (0)