RustImplementation #23

Merged
mysticmomba merged 118 commits from RustImplementation into master 2025-11-04 18:13:24 -05:00
2 changed files with 7 additions and 6 deletions
Showing only changes of commit f09bb5ff62 - Show all commits
-1
View File
@@ -58,7 +58,6 @@ def main():
apivalidation() apivalidation()
print(f"Running non-interactively to start monitoring OTP") print(f"Running non-interactively to start monitoring OTP")
utils.clientfunctions.getClientsPolicy(url)
# Process input here # Process input here
else: else:
+7 -5
View File
@@ -5,7 +5,9 @@ import pandas as pd
import utils.pretty as ct import utils.pretty as ct
def getClientsPolicy(url, clientid="0dcddaf3-d017-4ced-9227-ceeca3117286"): def getDestAllowlistFromClientID(url, clientid="0dcddaf3-d017-4ced-9227-ceeca3117286"):
#This is dependant on their being an allowlist in the policy with the same name as the policy
endpoint = url + '/v1/agent/find' endpoint = url + '/v1/agent/find'
payload = { payload = {
@@ -22,12 +24,12 @@ def getClientsPolicy(url, clientid="0dcddaf3-d017-4ced-9227-ceeca3117286"):
policyname = getPolicyName(url,data.loc[0, "groupid"]) policyname = getPolicyName(url,data.loc[0, "groupid"])
allowlists = getPolicyAllowlists(url,data.loc[0, "groupid"]) allowlists = getPolicyAllowlists(url,data.loc[0, "groupid"])
allowlists = allowlists['name'].tolist()
print(policyname) app_id = allowlists.loc[allowlists['name'] == f'{policyname}', 'applicationid'].values[0]
print(allowlists)
return app_id
def getPolicyAllowlists(url, groupid): def getPolicyAllowlists(url, groupid):
endpoint = url + '/v1/group/policies' endpoint = url + '/v1/group/policies'