Skip to content

Commit e1e6ce2

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

File tree

4 files changed

+79
-2
lines changed

4 files changed

+79
-2
lines changed

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

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

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+
credstore.rst
3132
tutorials.rst
3233

3334

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)