Skip to content

Commit

Permalink
Various doc fixes and update maintainer list
Browse files Browse the repository at this point in the history
Signed-off-by: Jordan Borean <jborean93@gmail.com>
  • Loading branch information
jborean93 committed Feb 15, 2022
1 parent 935f95a commit 92bb1c2
Show file tree
Hide file tree
Showing 15 changed files with 70 additions and 66 deletions.
3 changes: 2 additions & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,9 @@ The Team

(GitHub usernames in parentheses)

* Robbie Harwood (@frozencemetery) - current maintainer and developer
* Jordan Borean (@jborean93) - current maintainer and developer
* Simo Sorce (@simo5) - developer
* Robbie Harwood (@frozencemetery) - author emeritus
* Solly Ross (@directxman12) - author emeritus
* Hugh Cole-Baker (@sigmaris) - author emeritus

Expand Down
20 changes: 10 additions & 10 deletions gssapi/creds.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def name(self) -> rnames.Name:

@property
def lifetime(self) -> int:
"""Get the remaining lifetime of these credentials"""
"""Get the remaining lifetime of these credentials, in seconds"""
return t.cast(int,
self.inquire(name=False, lifetime=True,
usage=False, mechs=False).lifetime)
Expand Down Expand Up @@ -137,8 +137,8 @@ def acquire(
Args:
name (~gssapi.names.Name): the name associated with the
credentials, or None for the default name
lifetime (int): the desired lifetime of the credentials, or None
for indefinite
lifetime (int): the desired lifetime of the credentials in seconds,
or None for indefinite
mechs (list): the desired :class:`MechType` OIDs to be used
with the credentials, or None for the default set
usage (str): the usage for the credentials -- either 'both',
Expand Down Expand Up @@ -253,8 +253,8 @@ def impersonate(
Args:
name (~gssapi.names.Name): the name to impersonate
lifetime (int): the desired lifetime of the new credentials,
or None for indefinite
lifetime (int): the desired lifetime of the new credentials in
seconds, or None for indefinite
mechs (list): the desired :class:`MechType` OIDs for the new
credentials
usage (str): the desired usage for the new credentials -- either
Expand Down Expand Up @@ -326,13 +326,13 @@ def inquire_by_mech(
about them.
Args:
mech (~gssapi.OID): the mechanism for which to retrive the
mech (~gssapi.OID): the mechanism for which to retrieve the
information
name (bool): get the name associated with the credentials
init_lifetime (bool): get the remaining initiate lifetime for
the credentials
the credentials in seconds
accept_lifetime (bool): get the remaining accept lifetime for
the credentials
the credentials in seconds
usage (bool): get the usage for the credentials
Returns:
Expand Down Expand Up @@ -396,9 +396,9 @@ def add(
usage (str): the usage for the credentials -- either 'both',
'initiate', or 'accept'
init_lifetime (int): the desired initiate lifetime of the
credentials, or None for indefinite
credentials in seconds, or None for indefinite
accept_lifetime (int): the desired accept lifetime of the
credentials, or None for indefinite
credentials in seconds, or None for indefinite
impersonator (Credentials): the credentials to use to impersonate
the given name, or None to not acquire normally
(:requires-ext:`s4u`)
Expand Down
18 changes: 10 additions & 8 deletions gssapi/raw/creds.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,17 @@ def acquire_cred(
Args:
name (~gssapi.raw.names.Name): the name for which to acquire the
credentials (or None for the "no name" functionality)
lifetime (int): the lifetime for the credentials (or None for
indefinite)
lifetime (int): the lifetime in seconds for the credentials (or None
for indefinite)
mechs (~gssapi.raw.types.MechType): the desired mechanisms for which
the credentials should work, or None for the default set
usage (str): the usage type for the credentials: may be
'initiate', 'accept', or 'both'
Returns:
AcquireCredResult: the resulting credentials, the actual mechanisms
with which they may be used, and their actual lifetime (or None for
indefinite or not supported)
with which they may be used, and their actual lifetime in seconds (or
None for indefinite or not supported)
Raises:
~gssapi.exceptions.BadMechanismError
Expand Down Expand Up @@ -103,9 +103,9 @@ def add_cred(
usage (str): usage type for credentials. Possible values:
'initiate' (default), 'accept', 'both' (failsafe).
init_lifetime (int): lifetime of credentials for use in initiating
security contexts (None for indefinite)
security contexts in seconds (None for indefinite)
accept_lifetime (int): lifetime of credentials for use in accepting
security contexts (None for indefinite)
security contexts in seconds (None for indefinite)
mutate_input (bool): whether to mutate the input credentials (True)
or produce a new set of credentials (False). Defaults to False
Expand Down Expand Up @@ -172,8 +172,10 @@ def inquire_cred_by_mech(
creds (Creds): the credentials to inspect
mech (~gssapi.OID): the desired mechanism
name (bool): get the Name associated with the credentials
init_lifetime (bool): get the initiator TTL for the credentials
accept_lifetime (bool): get the acceptor TTL for the credentials
init_lifetime (bool): get the initiator TTL for the credentials (in
seconds)
accept_lifetime (bool): get the acceptor TTL for the credentials (in
seconds)
usage (bool): get the usage type of the credentials
Returns:
Expand Down
12 changes: 6 additions & 6 deletions gssapi/raw/ext_cred_store.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ def acquire_cred_from(
See :doc:`credstore` for valid values
name (~gssapi.raw.names.Name): the name associated with the
credentials, or None for the default name
lifetime (int): the desired lifetime of the credentials, or None
for indefinite
lifetime (int): the desired lifetime of the credentials in seconds, or
None for indefinite
mechs (list): the desired mechanisms to be used with these
credentials, or None for the default set
usage (str): the usage for these credentials -- either 'both',
Expand Down Expand Up @@ -80,10 +80,10 @@ def add_cred_from(
credentials
usage (str): the usage for these credentials -- either 'both',
'initiate', or 'accept'
init_lifetime (int): the desired initiate lifetime of the
credentials, or None for indefinite
accept_lifetime (int): the desired accept lifetime of the
credentials, or None for indefinite
init_lifetime (int): the desired initiate lifetime of the credentials
in seconds, or None for indefinite
accept_lifetime (int): the desired accept lifetime of the credentials
in seconds, or None for indefinite
Returns:
AcquireCredResult: the new credentials set and information about
Expand Down
4 changes: 2 additions & 2 deletions gssapi/raw/ext_krb5.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ def krb5_export_lucid_sec_context(
context: "SecurityContext",
version: int,
) -> Krb5LucidContext:
"""Retuns a non-opaque version of the internal context info.
"""Returns a non-opaque version of the internal context info.
Gets information about the Kerberos security context passed in. Currently
only version 1 is known and supported by this library.
Expand Down Expand Up @@ -240,7 +240,7 @@ def krb5_get_tkt_flags(
Note:
Heimdal can only get the tkt flags on the acceptor security context.
MIT is able to get the tkt flags on initators and acceptors.
MIT is able to get the tkt flags on initiators and acceptors.
Args:
context (~gssapi.raw.sec_contexts.SecurityContext): the security
Expand Down
8 changes: 4 additions & 4 deletions gssapi/raw/ext_password.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -24,17 +24,17 @@ def acquire_cred_with_password(
Args:
name (~gssapi.raw.names.Name): the name to acquire credentials for
password (bytes): the password used to acquire credentialss with
lifetime (int): the lifetime for the credentials (or None for
indefinite)
lifetime (int): the lifetime for the credentials in seconds (or None
for indefinite)
mechs (~gssapi.raw.types.MechType): the desired mechanisms for which
the credentials should work (or None for the default set)
usage (str): usage type for credentials. Possible values:
'initiate' (default), 'accept', 'both' (failsafe).
Returns:
AcquireCredResult: the resulting credentials, the actual mechanisms
with which they may be used, and their actual lifetime (or None for
indefinite or not supported)
with which they may be used, and their actual lifetime in seconds (or
None for indefinite or not supported)
Raises:
~gssapi.exceptions.GSSError
Expand Down
16 changes: 8 additions & 8 deletions gssapi/raw/ext_password_add.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -31,17 +31,17 @@ def add_cred_with_password(
password (bytes): the password used to acquire credentialss with
usage (str): the usage type for the credentials: may be
'initiate', 'accept', or 'both'
init_lifetime (int): the lifetime for the credentials to remain valid
when using them to initiate security contexts (or None for
indefinite)
accept_lifetime (int): the lifetime for the credentials to remain
valid when using them to accept security contexts (or None for
indefinite)
init_lifetime (int): the lifetime, in seconds, for the credentials to
remain valid when using them to initiate security contexts (or None
for indefinite)
accept_lifetime (int): the lifetime, in seconds, for the credentials to
remain valid when using them to accept security contexts (or None
for indefinite)
Returns:
AddCredResult: the actual mechanisms with which the credentials may be
used, the actual initiator TTL, and the actual acceptor TTL (the TTLs
may be None for indefinite or not supported)
used, the actual initiator TTL in seconds, and the actual acceptor TTL
in seconds (the TTLs may be None for indefinite or not supported)
Raises:
~gssapi.exceptions.GSSError
Expand Down
2 changes: 1 addition & 1 deletion gssapi/raw/ext_rfc5587.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ def display_mech_attr(
"""Returns information about attributes in human readable form.
Args:
attr (~gssapi.OID): Mechanism attribute to retrive names and
attr (~gssapi.OID): Mechanism attribute to retrieve names and
descriptions of
Returns:
Expand Down
2 changes: 1 addition & 1 deletion gssapi/raw/ext_rfc6680.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ def inquire_name(
) -> "InquireNameResult":
"""Get information about a Name.
This method retrives information about the given name, including
This method retrieves information about the given name, including
the set of attribute names for the given name, as well as whether or
not the name is a mechanism name. Additionally, if the given name is
a mechanism name, the associated mechansim is returned as well.
Expand Down
22 changes: 11 additions & 11 deletions gssapi/raw/ext_s4u.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,16 @@ def acquire_cred_impersonate_name(
permissions to impersonate the target name
name (~gssapi.raw.names.Name): the name to impersonate
lifetime (int): the lifetime for the credentials (or None for
indefinite)
indefinite) in seconds
mechs (~gssapi.raw.types.MechType): the desired mechanisms for which
the credentials should work (or None for the default set)
usage (str): the usage type for the credentials: may be
'initiate', 'accept', or 'both'
Returns:
AcquireCredResult: the resulting credentials, the actual mechanisms
with which they may be used, and their actual lifetime (or None for
indefinite or not support)
with which they may be used, and their actual lifetime in seconds (or
None for indefinite or not support)
Raises:
~gssapi.exceptions.GSSError
Expand Down Expand Up @@ -69,17 +69,17 @@ def add_cred_impersonate_name(
singular and required, unlike acquireCredImpersonateName
usage (str): the usage type for the credentials: may be
'initiate', 'accept', or 'both'
init_lifetime (int): the lifetime for the credentials to remain
valid when using them to initiate security contexts (or None for
indefinite)
accept_lifetime (int): the lifetime for the credentials to remain
valid when using them to accept security contexts (or None for
indefinite)
init_lifetime (int): the lifetime, in seconds, for the credentials to
remain valid when using them to initiate security contexts (or None
for indefinite)
accept_lifetime (int): the lifetime, in seconds, for the credentials to
remain valid when using them to accept security contexts (or None
for indefinite)
Returns:
AddCredResult: the actual mechanisms with which the credentials may be
used, the actual initiator TTL, and the actual acceptor TTL (the TTLs
may be None for indefinite or not supported)
used, the actual initiator TTL in seconds, and the actual acceptor TTL
in seconds (the TTLs may be None for indefinite or not supported)
Raises:
~gssapi.exceptions.GSSError
Expand Down
4 changes: 2 additions & 2 deletions gssapi/raw/misc.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ def inquire_names_for_mech(
inquire_names_for_mech(mech)
Get the name types supported by a mechanism.
This method retrives the different name types supported by
This method retrieves the different name types supported by
the given mechanism.
Args:
Expand Down Expand Up @@ -123,7 +123,7 @@ class GSSError(Exception):
Create a new GSSError.
This method creates a new GSSError,
retrieves the releated human-readable
retrieves the related human-readable
string messages, and uses the results to construct an
exception message
Expand Down
10 changes: 5 additions & 5 deletions gssapi/raw/named_tuples.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,17 @@ class InquireCredResult(NamedTuple):
class InquireCredByMechResult(NamedTuple):
"""Information about the credential for a specific mechanism."""
name: Optional["g.Name"] #: The principal associated with the credential
init_lifetime: Optional[int] #: Time valid for initiation
accept_lifetime: Optional[int] #: Time valid for accepting
init_lifetime: Optional[int] #: Time valid for initiation, in seconds
accept_lifetime: Optional[int] #: Time valid for accepting, in seconds
usage: Optional[str] #: How the credential can be used


class AddCredResult(NamedTuple):
"""Result of adding to a GSSAPI credential."""
creds: Optional["g.Creds"] #: The credential that was generated
mechs: Set[OID] #: Set of mechs the cred is for
init_lifetime: int #: Time valid for initiation
accept_lifetime: int #: Time valid for accepting
init_lifetime: int #: Time valid for initiation, in seconds
accept_lifetime: int #: Time valid for accepting, in seconds


class DisplayNameResult(NamedTuple):
Expand Down Expand Up @@ -83,7 +83,7 @@ class InquireContextResult(NamedTuple):
"""Information about the security context."""
initiator_name: Optional["g.Name"] #: Name of the initiator
target_name: Optional["g.Name"] #: Name of the acceptor
lifetime: Optional[int] #: Time valid for the security context
lifetime: Optional[int] #: Time valid for the security context, in seconds
mech: Optional[OID] #: Mech used to create the security context
flags: Optional[RequirementFlag] #: Services available for the context
locally_init: Optional[bool] #: Context was initiated locally
Expand Down
2 changes: 1 addition & 1 deletion gssapi/raw/oids.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class OID:
to the constructor. The `elements` argument should be a
`bytes` consisting of the BER-encoded values in the OID.
To retrive the underlying bytes, use the :func:`bytes`
To retrieve the underlying bytes, use the :func:`bytes`
function in Python 3.
This object is hashable, and may be compared using equality
Expand Down
10 changes: 5 additions & 5 deletions gssapi/raw/sec_contexts.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ def init_sec_context(
None to use the default set: mutual_authentication and
out_of_sequence_detection. This may also be an
:class:`IntEnumFlagSet`
lifetime (int): the request lifetime of the security context (a value
of 0 or None means indefinite)
lifetime (int): the request lifetime of the security context in seconds
(a value of 0 or None means indefinite)
channel_bindings (ChannelBindings): The channel bindings (or None for
no channel bindings)
input_token (bytes): the token to use to update the security context,
Expand All @@ -72,8 +72,8 @@ def init_sec_context(
Returns:
InitSecContextResult: the output security context, the actual mech
type, the actual flags used, the output token to send to the acceptor,
the actual lifetime of the context (or None if not supported or
indefinite), and whether or not more calls are needed to finish the
the actual lifetime of the context in seconds (or None if not supported
or indefinite), and whether or not more calls are needed to finish the
initiation.
Raises:
Expand Down Expand Up @@ -120,7 +120,7 @@ def accept_sec_context(
Returns:
AcceptSecContextResult: the resulting security context, the initiator
name, the mechanism being used, the output token, the flags in use,
the lifetime of the context (or None for indefinite or not
the lifetime of the context in seconds (or None for indefinite or not
supported), the delegated credentials (valid only if the
delegate_to_peer flag is set), and whether or not further token
exchanges are needed to finalize the security context.
Expand Down
3 changes: 2 additions & 1 deletion gssapi/sec_contexts.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,7 +429,8 @@ def _inquire(
Args:
initiator_name (bool): get the initiator name for this context
target_name (bool): get the target name for this context
lifetime (bool): get the remaining lifetime for this context
lifetime (bool): get the remaining lifetime, in seconds, for this
context
mech (bool): get the :class:`MechType` used by this context
flags (bool): get the flags set on this context
locally_init (bool): get whether this context was locally initiated
Expand Down

0 comments on commit 92bb1c2

Please sign in to comment.