aistore.sdk.authn.types

View as Markdown

Module Contents

Classes

NameDescription
BucketPermissionRepresents a bucket with its associated permissions.
ClusterInfoRepresents information about a cluster.
ClusterListRepresents a list of clusters.
ClusterPermissionRepresents a cluster with its associated permissions.
LoginMsgRepresents a login message with a password and optional expiration duration.
RoleInfoRepresents role information including permissions for clusters and buckets.
RolesListRepresents a list of roles.
TokenMsgRepresents a message containing a token.
UserInfoRepresents user information in the AuthN service.
UserMapRepresents a map of usernames to their info.

API

class aistore.sdk.authn.types.BucketPermission()

Bases: BaseModel

Represents a bucket with its associated permissions.

bck
BucketModel
perm
str
aistore.sdk.authn.types.BucketPermission.__str__() -> str
aistore.sdk.authn.types.BucketPermission.describe() -> str
class aistore.sdk.authn.types.ClusterInfo()

Bases: BaseModel

Represents information about a cluster.

alias
Optional[str] = None
id
str
urls
List[str] = []
class aistore.sdk.authn.types.ClusterList()

Bases: BaseModel

Represents a list of clusters.

clusters
Dict[str, ClusterInfo] = {}
class aistore.sdk.authn.types.ClusterPermission()

Bases: BaseModel

Represents a cluster with its associated permissions.

id
str
perm
str
aistore.sdk.authn.types.ClusterPermission.__str__() -> str
aistore.sdk.authn.types.ClusterPermission.describe() -> str
class aistore.sdk.authn.types.LoginMsg()

Bases: BaseModel

Represents a login message with a password and optional expiration duration.

expires_in
Optional[Union[int, float]]
password
str
aistore.sdk.authn.types.LoginMsg.as_dict()

Converts the instance to a dict, converting the expiration duration to nanoseconds if specified.

Returns:

Dict[str, Union[str, int]]: The dict representation of the login message.

class aistore.sdk.authn.types.RoleInfo()

Bases: BaseModel

Represents role information including permissions for clusters and buckets.

admin
bool = False
buckets
Optional[List[BucketPermission]] = None
clusters
Optional[List[ClusterPermission]] = None
desc
str
name
str
aistore.sdk.authn.types.RoleInfo.__str__() -> str
class aistore.sdk.authn.types.RolesList()

Bases: RootModel[List[RoleInfo]]

Represents a list of roles.

aistore.sdk.authn.types.RolesList.__getitem__(
item
)
aistore.sdk.authn.types.RolesList.__iter__()
aistore.sdk.authn.types.RolesList.__len__()
aistore.sdk.authn.types.RolesList.__str__() -> str
class aistore.sdk.authn.types.TokenMsg()

Bases: BaseModel

Represents a message containing a token.

token
str
class aistore.sdk.authn.types.UserInfo()

Bases: BaseModel

Represents user information in the AuthN service.

id
str
password
Optional[str] = None
roles
RolesList
aistore.sdk.authn.types.UserInfo.dict(
kwargs = {}
)

Override the dict method to serialize the ‘password’ field as ‘pass’.

Returns:

Dict[str, Union[str, RolesList]]: The dict representation of the user information.

class aistore.sdk.authn.types.UserMap()

Bases: RootModel[Dict[str, UserInfo]]

Represents a map of usernames to their info.

aistore.sdk.authn.types.UserMap.__getitem__(
item
)
aistore.sdk.authn.types.UserMap.__iter__()
aistore.sdk.authn.types.UserMap.__len__()
aistore.sdk.authn.types.UserMap.__str__() -> str
aistore.sdk.authn.types.UserMap.items()