diff --git a/stubs/hvac/METADATA.toml b/stubs/hvac/METADATA.toml index a0c9d6f95ce6..911834e936a9 100644 --- a/stubs/hvac/METADATA.toml +++ b/stubs/hvac/METADATA.toml @@ -1,3 +1,3 @@ -version = "2.1.*" +version = "2.2.*" upstream_repository = "https://github.com/hvac/hvac" requires = ["types-requests"] diff --git a/stubs/hvac/hvac/api/auth_methods/aws.pyi b/stubs/hvac/hvac/api/auth_methods/aws.pyi index f9de9e6af61d..e89a9b1d008b 100644 --- a/stubs/hvac/hvac/api/auth_methods/aws.pyi +++ b/stubs/hvac/hvac/api/auth_methods/aws.pyi @@ -15,11 +15,17 @@ class Aws(VaultApiBase): sts_endpoint: Incomplete | None = None, iam_server_id_header_value: Incomplete | None = None, mount_point: str = "aws", + sts_region: str | None = None, ): ... def read_config(self, mount_point: str = "aws"): ... def delete_config(self, mount_point: str = "aws"): ... def configure_identity_integration( - self, iam_alias: Incomplete | None = None, ec2_alias: Incomplete | None = None, mount_point: str = "aws" + self, + iam_alias: Incomplete | None = None, + ec2_alias: Incomplete | None = None, + mount_point: str = "aws", + iam_metadata: str | list[str] | None = None, + ec2_metadata: str | list[str] | None = None, ): ... def read_identity_integration(self, mount_point: str = "aws"): ... def create_certificate_configuration( diff --git a/stubs/hvac/hvac/api/auth_methods/jwt.pyi b/stubs/hvac/hvac/api/auth_methods/jwt.pyi index 5b4e60a823b0..98829d4d969c 100644 --- a/stubs/hvac/hvac/api/auth_methods/jwt.pyi +++ b/stubs/hvac/hvac/api/auth_methods/jwt.pyi @@ -20,7 +20,8 @@ class JWT(VaultApiBase): jwt_supported_algs: Incomplete | None = None, default_role: Incomplete | None = None, provider_config: Incomplete | None = None, - path: Incomplete | None = None, + path: str | None = None, + namespace_in_state: bool | None = None, ): ... def read_config(self, path: Incomplete | None = None): ... def create_role( diff --git a/stubs/hvac/hvac/api/secrets_engines/__init__.pyi b/stubs/hvac/hvac/api/secrets_engines/__init__.pyi index fe226a4ed28e..3831a24d9e5a 100644 --- a/stubs/hvac/hvac/api/secrets_engines/__init__.pyi +++ b/stubs/hvac/hvac/api/secrets_engines/__init__.pyi @@ -9,6 +9,7 @@ from hvac.api.secrets_engines.identity import Identity as Identity from hvac.api.secrets_engines.kv import Kv as Kv from hvac.api.secrets_engines.kv_v1 import KvV1 as KvV1 from hvac.api.secrets_engines.kv_v2 import KvV2 as KvV2 +from hvac.api.secrets_engines.ldap import Ldap as Ldap from hvac.api.secrets_engines.pki import Pki as Pki from hvac.api.secrets_engines.rabbitmq import RabbitMQ as RabbitMQ from hvac.api.secrets_engines.ssh import Ssh as Ssh @@ -25,6 +26,7 @@ __all__ = ( "Kv", "KvV1", "KvV2", + "Ldap", "Pki", "Transform", "Transit", diff --git a/stubs/hvac/hvac/api/secrets_engines/identity.pyi b/stubs/hvac/hvac/api/secrets_engines/identity.pyi index 8d8ecb44e279..d848c279494d 100644 --- a/stubs/hvac/hvac/api/secrets_engines/identity.pyi +++ b/stubs/hvac/hvac/api/secrets_engines/identity.pyi @@ -2,7 +2,6 @@ from _typeshed import Incomplete from hvac.api.vault_api_base import VaultApiBase -DEFAULT_MOUNT_POINT: str logger: Incomplete class Identity(VaultApiBase): diff --git a/stubs/hvac/hvac/api/secrets_engines/ldap.pyi b/stubs/hvac/hvac/api/secrets_engines/ldap.pyi new file mode 100644 index 000000000000..7a17162bf8c1 --- /dev/null +++ b/stubs/hvac/hvac/api/secrets_engines/ldap.pyi @@ -0,0 +1,41 @@ +from typing import Final + +from hvac.api.vault_api_base import VaultApiBase + +DEFAULT_MOUNT_POINT: Final = "ldap" + +class Ldap(VaultApiBase): + def configure( + self, + binddn: str | None = None, + bindpass: str | None = None, + url: str | None = None, + password_policy: str | None = None, + schema: str | None = None, + userdn: str | None = None, + userattr: str | None = None, + upndomain: str | None = None, + connection_timeout: int | str | None = None, + request_timeout: int | str | None = None, + starttls: bool | None = None, + insecure_tls: bool | None = None, + certificate: str | None = None, + client_tls_cert: str | None = None, + client_tls_key: str | None = None, + mount_point: str = "ldap", + ): ... + def read_config(self, mount_point: str = "ldap"): ... + def rotate_root(self, mount_point: str = "ldap"): ... + def create_or_update_static_role( + self, + name: str, + username: str | None = None, + dn: str | None = None, + rotation_period: str | None = None, + mount_point: str = "ldap", + ): ... + def read_static_role(self, name: str, mount_point: str = "ldap"): ... + def list_static_roles(self, mount_point: str = "ldap"): ... + def delete_static_role(self, name: str, mount_point: str = "ldap"): ... + def generate_static_credentials(self, name: str, mount_point: str = "ldap"): ... + def rotate_static_credentials(self, name: str, mount_point: str = "ldap"): ... diff --git a/stubs/hvac/hvac/api/secrets_engines/transit.pyi b/stubs/hvac/hvac/api/secrets_engines/transit.pyi index 5d5e5060ac6d..495611b0e5c0 100644 --- a/stubs/hvac/hvac/api/secrets_engines/transit.pyi +++ b/stubs/hvac/hvac/api/secrets_engines/transit.pyi @@ -42,7 +42,8 @@ class Transit(VaultApiBase): batch_input: Incomplete | None = None, type: Incomplete | None = None, convergent_encryption: Incomplete | None = None, - mount_point="transit", + mount_point: str = "transit", + associated_data: str | None = None, ): ... def decrypt_data( self, @@ -51,7 +52,8 @@ class Transit(VaultApiBase): context: Incomplete | None = None, nonce: Incomplete | None = None, batch_input: Incomplete | None = None, - mount_point="transit", + mount_point: str = "transit", + associated_data: str | None = None, ): ... def rewrap_data( self, diff --git a/stubs/hvac/hvac/api/vault_api_base.pyi b/stubs/hvac/hvac/api/vault_api_base.pyi index f2b6723211fb..c677beb3f85a 100644 --- a/stubs/hvac/hvac/api/vault_api_base.pyi +++ b/stubs/hvac/hvac/api/vault_api_base.pyi @@ -1,7 +1,10 @@ +from _typeshed import Incomplete from abc import ABCMeta from logging import Logger +from hvac.adapters import Adapter + logger: Logger class VaultApiBase(metaclass=ABCMeta): - def __init__(self, adapter) -> None: ... + def __init__(self, adapter: Adapter[Incomplete]) -> None: ... diff --git a/stubs/hvac/hvac/constants/identity.pyi b/stubs/hvac/hvac/constants/identity.pyi index ec4f9638fb7c..c9041bf3e3b2 100644 --- a/stubs/hvac/hvac/constants/identity.pyi +++ b/stubs/hvac/hvac/constants/identity.pyi @@ -1,3 +1,5 @@ from collections.abc import Iterable +from typing import Final ALLOWED_GROUP_TYPES: Iterable[str] +DEFAULT_MOUNT_POINT: Final = "identity" diff --git a/stubs/hvac/hvac/exceptions.pyi b/stubs/hvac/hvac/exceptions.pyi index 5aec65640cc0..9bf16de0939b 100644 --- a/stubs/hvac/hvac/exceptions.pyi +++ b/stubs/hvac/hvac/exceptions.pyi @@ -33,6 +33,8 @@ class InvalidRequest(VaultError): ... class Unauthorized(VaultError): ... class Forbidden(VaultError): ... class InvalidPath(VaultError): ... +class UnsupportedOperation(VaultError): ... +class PreconditionFailed(VaultError): ... class RateLimitExceeded(VaultError): ... class InternalServerError(VaultError): ... class VaultNotInitialized(VaultError): ...