python4cpm 1.0.20__tar.gz → 1.0.21__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python4cpm
3
- Version: 1.0.20
3
+ Version: 1.0.21
4
4
  Summary: Python for CPM
5
5
  Author-email: Gonzalo Atienza Rela <gonatienza@gmail.com>
6
6
  License: MIT License
@@ -40,9 +40,10 @@ This platform allows you to duplicate it multiple times, simply changing its set
40
40
 
41
41
  ### Preparing Python
42
42
 
43
- 1. Install Python in CPM. **Python must be installed for all users when running the install wizard**.
44
- 2. Create a venv in CPM, by running `py -m venv c:\venv`. Use the default location `c:\venv` or a custom one (e.g., `c:\my-venv-path`).
45
- 3. Install `python4cpm` in your venv:
43
+ 1. Install Python in CPM.
44
+ - **Python must be installed for all users**. Follow the custom install steps from the installation wizard to check the checkbox.
45
+ 3. Create a venv in CPM, by running `py -m venv c:\venv`. If desired, use a custom location and adjust any future references.
46
+ 4. Install `python4cpm` in your venv:
46
47
  - If your CPM can connect to the internet, install with `c:\venv\Scripts\pip install python4cpm`.
47
48
  - If your CPM cannot connect to the internet:
48
49
  - Download the latest `python4cpm-*.whl` file from the [pypi project files](https://pypi.org/project/python4cpm/#files).
@@ -52,17 +53,28 @@ This platform allows you to duplicate it multiple times, simply changing its set
52
53
 
53
54
  ### Importing the platform
54
55
 
55
- 1. Download the latest [Credential Management .NET SDK](https://community.cyberark.com/marketplace/s/#a3550000000EkA0AAK-a3950000000jjoOAAQ) and place its content in the bin folder of CPM (`C:\Program Files (x86)\CyberArk\Password Manager\bin`).
56
+ #### If you are using CPM (SaaS or Self-Hosted):
57
+ 1. Download the latest [Credential Management .NET SDK](https://community.cyberark.com/marketplace/s/#a3550000000EkA0AAK-a3950000000jjoOAAQ) and place its content in the bin folder of CPM (`C:\Program Files (x86)\CyberArk\Password Manager\bin`). The files for this may already be present.
56
58
  2. Download the `python4cpm-platform-*.zip` asset from the [release](https://github.com/gonatienza/python4cpm/releases).
57
59
  3. Import the platform zip file into Privilege Cloud/PVWA `(Administration -> Platform Management -> Import platform)`.
58
- 4. Craft your python script and place it within the bin folder of CPM (`C:\Program Files (x86)\CyberArk\Password Manager\bin`).
60
+ 4. Craft your python script and place it within a folder in CPM (e.g., `C:\python4cpm-scripts`).
59
61
  5. Duplicate the imported platform in Privilege Cloud/PVWA `(Administration -> Platform Management -> Application -> Python for CPM)` and name it after your application (e.g., My App).
60
- 6. Edit the duplicated platform and specify the path of your placed script in the bin folder of CPM, under `Target Account Platform -> Automatic Platform Management -> Additional Policy Settings -> Parameters -> PythonScriptPath -> Value` (e.g., `bin\myapp.py`).
61
- 7. If you used a custom venv location, also update `Target Account Platform -> Automatic Platform Management -> Additional Policy Settings -> Parameters -> PythonExePath -> Value` with the custom path for the venv's `python.exe` file (e.g., `c:\my-venv-path\Scripts\python.exe`).
62
+ 6. Edit the duplicated platform and specify the path of your script, under `Target Account Platform -> Automatic Platform Management -> Additional Policy Settings -> Parameters -> PythonScriptPath -> Value` (e.g., `C:\python4cpm-scripts\myapp.py`).
63
+ 7. Also update `Target Account Platform -> Automatic Platform Management -> Additional Policy Settings -> Parameters -> PythonExePath -> Value` with the custom path for the venv's `python.exe` file (e.g., `c:\venv\Scripts\python.exe`).
62
64
  8. If you want to disable logging, update `Target Account Platform -> Automatic Platform Management -> Additional Policy Settings -> Parameters -> PythonLogging -> Value` to `no`.
63
65
  9. If you want to change the logging level to `debug`, update `Target Account Platform -> Automatic Platform Management -> Additional Policy Settings -> Parameters -> PythonLoggingLevel -> Value` to `debug`.
64
66
  10. For new applications repeat steps from 4 to 9.
65
67
 
68
+ #### If you are using SRS (SaaS only):
69
+ 1. Download the `python4cpm-platform-*.zip` asset from the [release](https://github.com/gonatienza/python4cpm/releases).
70
+ 2. Import the platform zip file into Privilege Cloud `(Administration -> Platform Management -> Import platform)`.
71
+ 3. Craft your python script and place it within a folder in the Cloud Connector (where the SRS Management Agent runs) (e.g., `C:\python4cpm-scripts`).
72
+ 4. Duplicate the imported platform in Privilege Cloud/PVWA `(Administration -> Platform Management -> Application -> Python for CPM)` and name it after your application (e.g., My App).
73
+ 5. Edit the duplicated platform and specify the path of your script, under `Plugin Settings -> Additional Parameters -> PythonScriptPath` (e.g., `C:\python4cpm-scripts\myapp.py`).
74
+ 6. Also update `Plugin Settings -> Additional Parameters -> PythonExePath` with the custom path for the venv's `python.exe` file (e.g., `c:\venv\Scripts\python.exe`).
75
+ 7. If you want to disable logging, update `Plugin Settings -> Additional Parameters -> PythonLogging` to `no`.
76
+ 8. If you want to change the logging level to `debug`, update `Plugin Settings -> Additional Parameters -> PythonLoggingLevel -> Value` to `debug`.
77
+ 9. For new applications repeat steps from 3 to 8.
66
78
 
67
79
  ## Python Script
68
80
 
@@ -8,9 +8,10 @@ This platform allows you to duplicate it multiple times, simply changing its set
8
8
 
9
9
  ### Preparing Python
10
10
 
11
- 1. Install Python in CPM. **Python must be installed for all users when running the install wizard**.
12
- 2. Create a venv in CPM, by running `py -m venv c:\venv`. Use the default location `c:\venv` or a custom one (e.g., `c:\my-venv-path`).
13
- 3. Install `python4cpm` in your venv:
11
+ 1. Install Python in CPM.
12
+ - **Python must be installed for all users**. Follow the custom install steps from the installation wizard to check the checkbox.
13
+ 3. Create a venv in CPM, by running `py -m venv c:\venv`. If desired, use a custom location and adjust any future references.
14
+ 4. Install `python4cpm` in your venv:
14
15
  - If your CPM can connect to the internet, install with `c:\venv\Scripts\pip install python4cpm`.
15
16
  - If your CPM cannot connect to the internet:
16
17
  - Download the latest `python4cpm-*.whl` file from the [pypi project files](https://pypi.org/project/python4cpm/#files).
@@ -20,17 +21,28 @@ This platform allows you to duplicate it multiple times, simply changing its set
20
21
 
21
22
  ### Importing the platform
22
23
 
23
- 1. Download the latest [Credential Management .NET SDK](https://community.cyberark.com/marketplace/s/#a3550000000EkA0AAK-a3950000000jjoOAAQ) and place its content in the bin folder of CPM (`C:\Program Files (x86)\CyberArk\Password Manager\bin`).
24
+ #### If you are using CPM (SaaS or Self-Hosted):
25
+ 1. Download the latest [Credential Management .NET SDK](https://community.cyberark.com/marketplace/s/#a3550000000EkA0AAK-a3950000000jjoOAAQ) and place its content in the bin folder of CPM (`C:\Program Files (x86)\CyberArk\Password Manager\bin`). The files for this may already be present.
24
26
  2. Download the `python4cpm-platform-*.zip` asset from the [release](https://github.com/gonatienza/python4cpm/releases).
25
27
  3. Import the platform zip file into Privilege Cloud/PVWA `(Administration -> Platform Management -> Import platform)`.
26
- 4. Craft your python script and place it within the bin folder of CPM (`C:\Program Files (x86)\CyberArk\Password Manager\bin`).
28
+ 4. Craft your python script and place it within a folder in CPM (e.g., `C:\python4cpm-scripts`).
27
29
  5. Duplicate the imported platform in Privilege Cloud/PVWA `(Administration -> Platform Management -> Application -> Python for CPM)` and name it after your application (e.g., My App).
28
- 6. Edit the duplicated platform and specify the path of your placed script in the bin folder of CPM, under `Target Account Platform -> Automatic Platform Management -> Additional Policy Settings -> Parameters -> PythonScriptPath -> Value` (e.g., `bin\myapp.py`).
29
- 7. If you used a custom venv location, also update `Target Account Platform -> Automatic Platform Management -> Additional Policy Settings -> Parameters -> PythonExePath -> Value` with the custom path for the venv's `python.exe` file (e.g., `c:\my-venv-path\Scripts\python.exe`).
30
+ 6. Edit the duplicated platform and specify the path of your script, under `Target Account Platform -> Automatic Platform Management -> Additional Policy Settings -> Parameters -> PythonScriptPath -> Value` (e.g., `C:\python4cpm-scripts\myapp.py`).
31
+ 7. Also update `Target Account Platform -> Automatic Platform Management -> Additional Policy Settings -> Parameters -> PythonExePath -> Value` with the custom path for the venv's `python.exe` file (e.g., `c:\venv\Scripts\python.exe`).
30
32
  8. If you want to disable logging, update `Target Account Platform -> Automatic Platform Management -> Additional Policy Settings -> Parameters -> PythonLogging -> Value` to `no`.
31
33
  9. If you want to change the logging level to `debug`, update `Target Account Platform -> Automatic Platform Management -> Additional Policy Settings -> Parameters -> PythonLoggingLevel -> Value` to `debug`.
32
34
  10. For new applications repeat steps from 4 to 9.
33
35
 
36
+ #### If you are using SRS (SaaS only):
37
+ 1. Download the `python4cpm-platform-*.zip` asset from the [release](https://github.com/gonatienza/python4cpm/releases).
38
+ 2. Import the platform zip file into Privilege Cloud `(Administration -> Platform Management -> Import platform)`.
39
+ 3. Craft your python script and place it within a folder in the Cloud Connector (where the SRS Management Agent runs) (e.g., `C:\python4cpm-scripts`).
40
+ 4. Duplicate the imported platform in Privilege Cloud/PVWA `(Administration -> Platform Management -> Application -> Python for CPM)` and name it after your application (e.g., My App).
41
+ 5. Edit the duplicated platform and specify the path of your script, under `Plugin Settings -> Additional Parameters -> PythonScriptPath` (e.g., `C:\python4cpm-scripts\myapp.py`).
42
+ 6. Also update `Plugin Settings -> Additional Parameters -> PythonExePath` with the custom path for the venv's `python.exe` file (e.g., `c:\venv\Scripts\python.exe`).
43
+ 7. If you want to disable logging, update `Plugin Settings -> Additional Parameters -> PythonLogging` to `no`.
44
+ 8. If you want to change the logging level to `debug`, update `Plugin Settings -> Additional Parameters -> PythonLoggingLevel -> Value` to `debug`.
45
+ 9. For new applications repeat steps from 3 to 8.
34
46
 
35
47
  ## Python Script
36
48
 
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "python4cpm"
7
- version = "1.0.20"
7
+ version = "1.0.21"
8
8
  description = "Python for CPM"
9
9
  authors = [
10
10
  { name = "Gonzalo Atienza Rela", email = "gonatienza@gmail.com" }
@@ -3,12 +3,12 @@ import logging
3
3
  from logging.handlers import RotatingFileHandler
4
4
 
5
5
 
6
- _LOGS_DIR = os.path.join("Logs", "ThirdParty", "Python4CPM")
6
+ _LOGS_DIR = os.path.join("Logs", "ThirdParty")
7
7
  _LOGGING_ENABLED_VALUE = "yes"
8
8
  _LOGGING_LEVELS = {
9
9
  "info": logging.INFO,
10
10
  "debug": logging.DEBUG
11
- }
11
+ }
12
12
 
13
13
 
14
14
  def get_logger(
@@ -19,7 +19,7 @@ def get_logger(
19
19
  if args_logging.lower() != _LOGGING_ENABLED_VALUE:
20
20
  return None
21
21
  os.makedirs(_LOGS_DIR, exist_ok=True)
22
- logs_file = os.path.join(_LOGS_DIR, f"{name}.log")
22
+ logs_file = os.path.join(_LOGS_DIR, f"{__name__}-{name}.log")
23
23
  _id = os.urandom(4).hex()
24
24
  logger = logging.getLogger(_id)
25
25
  if args_logging_level.lower() in _LOGGING_LEVELS:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python4cpm
3
- Version: 1.0.20
3
+ Version: 1.0.21
4
4
  Summary: Python for CPM
5
5
  Author-email: Gonzalo Atienza Rela <gonatienza@gmail.com>
6
6
  License: MIT License
@@ -40,9 +40,10 @@ This platform allows you to duplicate it multiple times, simply changing its set
40
40
 
41
41
  ### Preparing Python
42
42
 
43
- 1. Install Python in CPM. **Python must be installed for all users when running the install wizard**.
44
- 2. Create a venv in CPM, by running `py -m venv c:\venv`. Use the default location `c:\venv` or a custom one (e.g., `c:\my-venv-path`).
45
- 3. Install `python4cpm` in your venv:
43
+ 1. Install Python in CPM.
44
+ - **Python must be installed for all users**. Follow the custom install steps from the installation wizard to check the checkbox.
45
+ 3. Create a venv in CPM, by running `py -m venv c:\venv`. If desired, use a custom location and adjust any future references.
46
+ 4. Install `python4cpm` in your venv:
46
47
  - If your CPM can connect to the internet, install with `c:\venv\Scripts\pip install python4cpm`.
47
48
  - If your CPM cannot connect to the internet:
48
49
  - Download the latest `python4cpm-*.whl` file from the [pypi project files](https://pypi.org/project/python4cpm/#files).
@@ -52,17 +53,28 @@ This platform allows you to duplicate it multiple times, simply changing its set
52
53
 
53
54
  ### Importing the platform
54
55
 
55
- 1. Download the latest [Credential Management .NET SDK](https://community.cyberark.com/marketplace/s/#a3550000000EkA0AAK-a3950000000jjoOAAQ) and place its content in the bin folder of CPM (`C:\Program Files (x86)\CyberArk\Password Manager\bin`).
56
+ #### If you are using CPM (SaaS or Self-Hosted):
57
+ 1. Download the latest [Credential Management .NET SDK](https://community.cyberark.com/marketplace/s/#a3550000000EkA0AAK-a3950000000jjoOAAQ) and place its content in the bin folder of CPM (`C:\Program Files (x86)\CyberArk\Password Manager\bin`). The files for this may already be present.
56
58
  2. Download the `python4cpm-platform-*.zip` asset from the [release](https://github.com/gonatienza/python4cpm/releases).
57
59
  3. Import the platform zip file into Privilege Cloud/PVWA `(Administration -> Platform Management -> Import platform)`.
58
- 4. Craft your python script and place it within the bin folder of CPM (`C:\Program Files (x86)\CyberArk\Password Manager\bin`).
60
+ 4. Craft your python script and place it within a folder in CPM (e.g., `C:\python4cpm-scripts`).
59
61
  5. Duplicate the imported platform in Privilege Cloud/PVWA `(Administration -> Platform Management -> Application -> Python for CPM)` and name it after your application (e.g., My App).
60
- 6. Edit the duplicated platform and specify the path of your placed script in the bin folder of CPM, under `Target Account Platform -> Automatic Platform Management -> Additional Policy Settings -> Parameters -> PythonScriptPath -> Value` (e.g., `bin\myapp.py`).
61
- 7. If you used a custom venv location, also update `Target Account Platform -> Automatic Platform Management -> Additional Policy Settings -> Parameters -> PythonExePath -> Value` with the custom path for the venv's `python.exe` file (e.g., `c:\my-venv-path\Scripts\python.exe`).
62
+ 6. Edit the duplicated platform and specify the path of your script, under `Target Account Platform -> Automatic Platform Management -> Additional Policy Settings -> Parameters -> PythonScriptPath -> Value` (e.g., `C:\python4cpm-scripts\myapp.py`).
63
+ 7. Also update `Target Account Platform -> Automatic Platform Management -> Additional Policy Settings -> Parameters -> PythonExePath -> Value` with the custom path for the venv's `python.exe` file (e.g., `c:\venv\Scripts\python.exe`).
62
64
  8. If you want to disable logging, update `Target Account Platform -> Automatic Platform Management -> Additional Policy Settings -> Parameters -> PythonLogging -> Value` to `no`.
63
65
  9. If you want to change the logging level to `debug`, update `Target Account Platform -> Automatic Platform Management -> Additional Policy Settings -> Parameters -> PythonLoggingLevel -> Value` to `debug`.
64
66
  10. For new applications repeat steps from 4 to 9.
65
67
 
68
+ #### If you are using SRS (SaaS only):
69
+ 1. Download the `python4cpm-platform-*.zip` asset from the [release](https://github.com/gonatienza/python4cpm/releases).
70
+ 2. Import the platform zip file into Privilege Cloud `(Administration -> Platform Management -> Import platform)`.
71
+ 3. Craft your python script and place it within a folder in the Cloud Connector (where the SRS Management Agent runs) (e.g., `C:\python4cpm-scripts`).
72
+ 4. Duplicate the imported platform in Privilege Cloud/PVWA `(Administration -> Platform Management -> Application -> Python for CPM)` and name it after your application (e.g., My App).
73
+ 5. Edit the duplicated platform and specify the path of your script, under `Plugin Settings -> Additional Parameters -> PythonScriptPath` (e.g., `C:\python4cpm-scripts\myapp.py`).
74
+ 6. Also update `Plugin Settings -> Additional Parameters -> PythonExePath` with the custom path for the venv's `python.exe` file (e.g., `c:\venv\Scripts\python.exe`).
75
+ 7. If you want to disable logging, update `Plugin Settings -> Additional Parameters -> PythonLogging` to `no`.
76
+ 8. If you want to change the logging level to `debug`, update `Plugin Settings -> Additional Parameters -> PythonLoggingLevel -> Value` to `debug`.
77
+ 9. For new applications repeat steps from 3 to 8.
66
78
 
67
79
  ## Python Script
68
80
 
File without changes
File without changes