Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PLGN-341] AD LDAP - Rename disable and enable user #2017

Merged
merged 8 commits into from
Oct 10, 2023
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
36 changes: 18 additions & 18 deletions plugins/active_directory_ldap/.CHECKSUM
Original file line number Diff line number Diff line change
@@ -1,67 +1,67 @@
{
"spec": "b708dde20801073ec6c88d4ea8f9b005",
"manifest": "a0f76ed1965bb6d1dc016498e95f3d9b",
"setup": "efe20ef0d6884b7d4d0c6014f18f8489",
"spec": "d5dfdb03974651b69e5a02256df71e03",
"manifest": "5d016144fec71b932d8182d5c1a7f81d",
"setup": "def3e06498eabadbc9aaa7270aff8be6",
"schemas": [
{
"identifier": "add_user/schema.py",
"hash": "33fdb96944e28df085a5c5bb7559f1b1"
"hash": "531c525fd832681685e2bb75274bcb36"
},
{
"identifier": "delete/schema.py",
"hash": "384eabbb2b07330f89eb2af252395c09"
"hash": "a203224c38992aaa6097c17e88f1a3fa"
},
{
"identifier": "disable_user/schema.py",
"hash": "b7f528b02e19959cfd46edc73094be59"
"hash": "bfdd8e9e5f9baa07298d3f3c36980036"
},
{
"identifier": "disable_users/schema.py",
"hash": "b4d1d4429d1c0299c30c65a141b6cc6d"
"hash": "8a07c9f105c7f7e94629ca7d3bca04dc"
},
{
"identifier": "enable_user/schema.py",
"hash": "25faca0d19911ec323613c143af8cd1c"
"hash": "fba48a15eddfb6e3270390a1aa106569"
},
{
"identifier": "enable_users/schema.py",
"hash": "c2729c798f17ff526d6cee062c0adce4"
"hash": "31af3ea7034551b317b1a7a9b4f54f01"
},
{
"identifier": "force_password_reset/schema.py",
"hash": "0ddf292d4d50da32ff2145174977be78"
"hash": "9c9d7cff588c7aa8e2a04a374b71203f"
},
{
"identifier": "modify_groups/schema.py",
"hash": "701ca94af58acf652658af61847b2ba3"
"hash": "c70a0d8227c9f837c7df6b297eeb1010"
},
{
"identifier": "modify_object/schema.py",
"hash": "1b32055ec467d01a1cf9665464c0b30a"
"hash": "49a5aebc2f4658812dc9999cdef54bd8"
},
{
"identifier": "move_object/schema.py",
"hash": "55ead46630a2d8eac580fc1ba0ec9b96"
"hash": "bc5788385d2c28b944b3e69e44db016e"
},
{
"identifier": "query/schema.py",
"hash": "e0ab1f6d91f2978190752ec15606cf9d"
"hash": "deab9b0f530f17c659f76bab4ae89a4f"
},
{
"identifier": "query_group_membership/schema.py",
"hash": "16791ced6e59d52c51f6138f4ab131a6"
"hash": "47a055bc7f7dbf143254a461ff323a95"
},
{
"identifier": "reset_password/schema.py",
"hash": "131278b80dd81061a21f1c980581a50f"
"hash": "f21d83aa58c5f20a176725c6fd358f7c"
},
{
"identifier": "unlock_user/schema.py",
"hash": "54677f2ee3aceb6b4cee3819091419e1"
"hash": "e808186d05fd10745dff1bc5d6b6fb52"
},
{
"identifier": "connection/schema.py",
"hash": "7771d949365aac89570c6dc01624834c"
"hash": "a9dea93ed1c5572129ece478059aea3e"
}
]
}
21 changes: 7 additions & 14 deletions plugins/active_directory_ldap/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,20 @@
FROM rapid7/insightconnect-python-3-38-slim-plugin:4
# Refer to the following documentation for available SDK parent images: https://docs.rapid7.com/insightconnect/sdk-guide/#sdk-guide
FROM rapid7/insightconnect-python-3-38-plugin:5

LABEL organization=rapid7
LABEL sdk=python
LABEL type=plugin

# Add any custom package dependencies here
# NOTE: Add pip packages to requirements.txt

# End package dependencies

# Add source code
WORKDIR /python/src

ADD ./plugin.spec.yaml /plugin.spec.yaml
ADD . /python/src
ADD ./requirements.txt /python/src/requirements.txt

# Install pip dependencies
RUN if [ -f requirements.txt ]; then pip install -r requirements.txt; fi

# Install plugin
RUN python setup.py build && python setup.py install
ADD . /python/src

RUN python setup.py build && python setup.py install

# User to run plugin code. The two supported users are: root, nobody
# User to run plugin code. The two supported users are: root, nobody
USER nobody

ENTRYPOINT ["/usr/local/bin/komand_active_directory_ldap"]
48 changes: 24 additions & 24 deletions plugins/active_directory_ldap/bin/komand_active_directory_ldap
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
#!/usr/bin/env python
# GENERATED BY KOMAND SDK - DO NOT EDIT
# GENERATED BY INSIGHT-PLUGIN - DO NOT EDIT
import os
import json
from sys import argv

Name = "Active Directory LDAP"
Vendor = "rapid7"
Version = "8.0.0"
Version = "9.0.0"
Description = "This plugin utilizes Microsoft's Active Directory service to create and manage domains, users, and objects within a network"


Expand All @@ -23,7 +23,7 @@ def main():
monkey.patch_all()

import insightconnect_plugin_runtime
from komand_active_directory_ldap import connection, actions, triggers
from komand_active_directory_ldap import connection, actions, triggers, tasks

class ICONActiveDirectoryLdap(insightconnect_plugin_runtime.Plugin):
def __init__(self):
Expand All @@ -34,34 +34,34 @@ def main():
description=Description,
connection=connection.Connection()
)
self.add_action(actions.AddUser())

self.add_action(actions.Query())
self.add_action(actions.Delete())

self.add_action(actions.DisableUser())

self.add_action(actions.DisableUsers())


self.add_action(actions.AddUser())

self.add_action(actions.EnableUser())

self.add_action(actions.EnableUsers())

self.add_action(actions.ForcePasswordReset())


self.add_action(actions.DisableUser())

self.add_action(actions.DisableUsers())

self.add_action(actions.ModifyGroups())

self.add_action(actions.ModifyObject())


self.add_action(actions.MoveObject())

self.add_action(actions.Query())

self.add_action(actions.QueryGroupMembership())


self.add_action(actions.ResetPassword())


self.add_action(actions.ModifyObject())

self.add_action(actions.ForcePasswordReset())

self.add_action(actions.QueryGroupMembership())

self.add_action(actions.UnlockUser())


"""Run plugin"""
cli = insightconnect_plugin_runtime.CLI(ICONActiveDirectoryLdap())
Expand Down
Loading