Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion privx_api/authorizer.py
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ def download_web_proxy_config(
PrivXStreamResponse
"""
response = self._http_stream(
UrlEnum.AUTHORIZER.DOWNLOAD_CARRIER_CONFIG,
UrlEnum.AUTHORIZER.DOWNLOAD_WEB_PROXY_CONFIG,
path_params={
"trusted_client_id": trusted_client_id,
"session_id": session_id,
Expand Down
16 changes: 4 additions & 12 deletions privx_api/connection_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ def get_connections(
sort_dir: Optional[str] = None,
fuzzy_count: Optional[bool] = False,
verbose: Optional[bool] = False,
item_format: Optional[str] = None,
) -> PrivXAPIResponse:
"""
Get connections.
Expand All @@ -40,6 +41,7 @@ def get_connections(
sortdir=sort_dir,
fuzzycount=bool(fuzzy_count),
verbose=bool(verbose),
item_format=item_format,
)
response_status, data = self._http_get(
UrlEnum.CONNECTION_MANAGER.CONNECTIONS,
Expand All @@ -56,6 +58,7 @@ def search_connections(
connection_params: Optional[dict] = None,
fuzzy_count: Optional[bool] = False,
verbose: Optional[bool] = False,
item_format: Optional[str] = None,
) -> PrivXAPIResponse:
"""
Search for connections.
Expand All @@ -70,6 +73,7 @@ def search_connections(
sortdir=sort_dir,
fuzzycount=bool(fuzzy_count),
verbose=bool(verbose),
item_format=item_format,
)

response_status, data = self._http_post(
Expand Down Expand Up @@ -581,15 +585,3 @@ def get_ueba_status(self) -> PrivXAPIResponse:
"""
response_status, data = self._http_get(UrlEnum.CONNECTION_MANAGER.UEBA_STATUS)
return self._api_response(response_status, HTTPStatus.OK, data)

def get_ueba_internal_status(self) -> PrivXAPIResponse:
"""
Get UEBA microservice internal status

Returns:
PrivXAPIResponse
"""
response_status, data = self._http_get(
UrlEnum.CONNECTION_MANAGER.UEBA_INTERNAL_STATUS
)
return self._api_response(response_status, HTTPStatus.OK, data)
4 changes: 0 additions & 4 deletions privx_api/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ class HostStoreEnum:
DISABLE = "HOST_STORE.DISABLE"
HOST = "HOST_STORE.HOST"
HOSTS = "HOST_STORE.HOSTS"
REALM = "HOST_STORE.REALM"
RESOLVE = "HOST_STORE.RESOLVE"
SEARCH = "HOST_STORE.SEARCH"
SETTINGS = "HOST_STORE.SETTINGS"
Expand All @@ -68,7 +67,6 @@ class HostStoreEnum:
DISABLE: "/host-store/api/v1/hosts/{host_id}/disabled",
HOST: "/host-store/api/v1/hosts/{host_id}",
HOSTS: "/host-store/api/v1/hosts",
REALM: "/host-store/api/v1/realm/resolve",
RESOLVE: "/host-store/api/v1/hosts/resolve",
SEARCH: "/host-store/api/v1/hosts/search",
SETTINGS: "/host-store/api/v1/settings/default_service_options",
Expand Down Expand Up @@ -218,7 +216,6 @@ class ConnectionManagerEnum:
UEBA_DATASET = "CONNECTION_MANAGER.UEBA_DATASET"
UEBA_TRAIN_DATASET = "CONNECTION_MANAGER.UEBA_TRAIN_DATASET"
UEBA_CONNECTION_COUNT = "CONNECTION_MANAGER.UEBA_CONNECTION_COUNT"
UEBA_INTERNAL_STATUS = "CONNECTION_MANAGER.UEBA_INTERNAL_STATUS"
UEBA_STATUS = "CONNECTION_MANAGER.UEBA_STATUS"
CONNECTION_TAGS = "CONNECTION_MANAGER.CONNECTION_TAGS"
UPDATE_CONNECTION_TAGS = "CONNECTION_MANAGER.UPDATE_CONNECTION_TAGS"
Expand Down Expand Up @@ -257,7 +254,6 @@ class ConnectionManagerEnum:
UEBA_TRAIN_DATASET: "/connection-manager/api/v1/ueba/train/{dataset_id}",
UEBA_CONNECTION_COUNT: "/connection-manager/api/v1/ueba/query-connection-count",
UEBA_STATUS: "/connection-manager/api/v1/ueba/status",
UEBA_INTERNAL_STATUS: "/connection-manager/api/v1/ueba/status/internal",
CONNECTION_TAGS: "/connection-manager/api/v1/connections/tags",
UPDATE_CONNECTION_TAGS: "/connection-manager/api/v1/connections/"
"{connection_id}/tags",
Expand Down
14 changes: 0 additions & 14 deletions privx_api/host_store.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,20 +192,6 @@ def set_host_disabled_status(
)
return self._api_response(response_status, HTTPStatus.OK, data)

def resolve_host_realm(self, realm_params: dict) -> PrivXAPIResponse:
"""
Resolve address to a single host in host store and return web
connections for user ID.

Returns:
PrivXAPIResponse
"""
response_status, data = self._http_post(
UrlEnum.HOST_STORE.REALM,
body=realm_params,
)
return self._api_response(response_status, HTTPStatus.OK, data)

def get_default_service_options(self) -> PrivXAPIResponse:
"""
Get the default service options.
Expand Down
4 changes: 2 additions & 2 deletions privx_api/secrets_manager.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ def refresh_target_domain(self, target_domain_id: str) -> PrivXAPIResponse:
PrivXAPIResponse
"""
response_status, data = self._http_post(
UrlEnum.SECRETS_MANAGER.TARGET_DOMAIN,
UrlEnum.SECRETS_MANAGER.REFRESH_TARGET_DOMAIN,
path_params={"target_domain_id": target_domain_id},
)
return self._api_response(response_status, HTTPStatus.OK, data)
Expand Down Expand Up @@ -377,7 +377,7 @@ def batch_update_target_domain_account(
Returns:
PrivXAPIResponse
"""
response_status, data = self._http_put(
response_status, data = self._http_post(
UrlEnum.SECRETS_MANAGER.BATH_UPDATE_TARGET_DOMAIN_ACCOUNT,
path_params={"target_domain_id": target_domain_id},
body=td_params,
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ black==26.3.1
flake8-polyfill==1.0.2
flake8==5.0.4
isort==5.8.0
pytest==7.4.3
pytest==9.0.3
radon==4.5.0
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

setup(
name="privx_api",
version="43.0.0",
version="44.0.0",
packages=["privx_api"],
license="Apache Licence 2.0",
url="https://github.com/SSHcom/privx-sdk-for-python",
Expand Down
Loading