illumio-py-open 1.2.0__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.
Files changed (77) hide show
  1. illumio_py_open-1.2.0/LICENSE +176 -0
  2. illumio_py_open-1.2.0/MANIFEST.in +18 -0
  3. illumio_py_open-1.2.0/NOTICE +9 -0
  4. illumio_py_open-1.2.0/PKG-INFO +111 -0
  5. illumio_py_open-1.2.0/README.md +84 -0
  6. illumio_py_open-1.2.0/illumio/__init__.py +36 -0
  7. illumio_py_open-1.2.0/illumio/_version.py +24 -0
  8. illumio_py_open-1.2.0/illumio/accessmanagement/__init__.py +16 -0
  9. illumio_py_open-1.2.0/illumio/accessmanagement/accessrestriction.py +30 -0
  10. illumio_py_open-1.2.0/illumio/accessmanagement/authsecurityprincipal.py +32 -0
  11. illumio_py_open-1.2.0/illumio/accessmanagement/permission.py +32 -0
  12. illumio_py_open-1.2.0/illumio/accessmanagement/role.py +30 -0
  13. illumio_py_open-1.2.0/illumio/accessmanagement/serviceaccount.py +32 -0
  14. illumio_py_open-1.2.0/illumio/accessmanagement/user.py +36 -0
  15. illumio_py_open-1.2.0/illumio/appgroups/__init__.py +1 -0
  16. illumio_py_open-1.2.0/illumio/appgroups/appgroupsummary.py +71 -0
  17. illumio_py_open-1.2.0/illumio/authentication/__init__.py +11 -0
  18. illumio_py_open-1.2.0/illumio/authentication/authsettings.py +70 -0
  19. illumio_py_open-1.2.0/illumio/events.py +120 -0
  20. illumio_py_open-1.2.0/illumio/exceptions.py +33 -0
  21. illumio_py_open-1.2.0/illumio/explorer/__init__.py +11 -0
  22. illumio_py_open-1.2.0/illumio/explorer/trafficanalysis.py +316 -0
  23. illumio_py_open-1.2.0/illumio/infrastructure/__init__.py +16 -0
  24. illumio_py_open-1.2.0/illumio/infrastructure/containercluster.py +184 -0
  25. illumio_py_open-1.2.0/illumio/infrastructure/discoveredvirtualserver.py +35 -0
  26. illumio_py_open-1.2.0/illumio/infrastructure/kubernetesworkload.py +35 -0
  27. illumio_py_open-1.2.0/illumio/infrastructure/networkdevice.py +42 -0
  28. illumio_py_open-1.2.0/illumio/infrastructure/networkenforcementnode.py +33 -0
  29. illumio_py_open-1.2.0/illumio/infrastructure/slb.py +28 -0
  30. illumio_py_open-1.2.0/illumio/labelmapping/__init__.py +11 -0
  31. illumio_py_open-1.2.0/illumio/labelmapping/labelmappingrule.py +33 -0
  32. illumio_py_open-1.2.0/illumio/pce.py +1834 -0
  33. illumio_py_open-1.2.0/illumio/pce.pyi +160 -0
  34. illumio_py_open-1.2.0/illumio/policyobjects/__init__.py +16 -0
  35. illumio_py_open-1.2.0/illumio/policyobjects/iplist.py +106 -0
  36. illumio_py_open-1.2.0/illumio/policyobjects/label.py +229 -0
  37. illumio_py_open-1.2.0/illumio/policyobjects/securityprincipal.py +24 -0
  38. illumio_py_open-1.2.0/illumio/policyobjects/service.py +118 -0
  39. illumio_py_open-1.2.0/illumio/policyobjects/virtualserver.py +48 -0
  40. illumio_py_open-1.2.0/illumio/policyobjects/virtualservice.py +261 -0
  41. illumio_py_open-1.2.0/illumio/py.typed +0 -0
  42. illumio_py_open-1.2.0/illumio/reporting/__init__.py +15 -0
  43. illumio_py_open-1.2.0/illumio/reporting/coreservice.py +41 -0
  44. illumio_py_open-1.2.0/illumio/reporting/job.py +35 -0
  45. illumio_py_open-1.2.0/illumio/reporting/report.py +59 -0
  46. illumio_py_open-1.2.0/illumio/reporting/supportbundle.py +31 -0
  47. illumio_py_open-1.2.0/illumio/reporting/systemevent.py +36 -0
  48. illumio_py_open-1.2.0/illumio/rules/__init__.py +15 -0
  49. illumio_py_open-1.2.0/illumio/rules/actor.py +47 -0
  50. illumio_py_open-1.2.0/illumio/rules/enforcementboundary.py +83 -0
  51. illumio_py_open-1.2.0/illumio/rules/iptablesrule.py +37 -0
  52. illumio_py_open-1.2.0/illumio/rules/rule.py +274 -0
  53. illumio_py_open-1.2.0/illumio/rules/ruleset.py +82 -0
  54. illumio_py_open-1.2.0/illumio/secpolicy.py +134 -0
  55. illumio_py_open-1.2.0/illumio/settings/__init__.py +11 -0
  56. illumio_py_open-1.2.0/illumio/settings/orgsettings.py +116 -0
  57. illumio_py_open-1.2.0/illumio/util/__init__.py +13 -0
  58. illumio_py_open-1.2.0/illumio/util/constants.py +226 -0
  59. illumio_py_open-1.2.0/illumio/util/functions.py +256 -0
  60. illumio_py_open-1.2.0/illumio/util/jsonutils.py +312 -0
  61. illumio_py_open-1.2.0/illumio/vulnerabilities/__init__.py +12 -0
  62. illumio_py_open-1.2.0/illumio/vulnerabilities/vulnerability.py +44 -0
  63. illumio_py_open-1.2.0/illumio/vulnerabilities/vulnerabilityreport.py +34 -0
  64. illumio_py_open-1.2.0/illumio/workloads/__init__.py +13 -0
  65. illumio_py_open-1.2.0/illumio/workloads/pairingprofile.py +100 -0
  66. illumio_py_open-1.2.0/illumio/workloads/ven.py +230 -0
  67. illumio_py_open-1.2.0/illumio/workloads/workload.py +224 -0
  68. illumio_py_open-1.2.0/illumio_py_open.egg-info/PKG-INFO +111 -0
  69. illumio_py_open-1.2.0/illumio_py_open.egg-info/SOURCES.txt +76 -0
  70. illumio_py_open-1.2.0/illumio_py_open.egg-info/dependency_links.txt +1 -0
  71. illumio_py_open-1.2.0/illumio_py_open.egg-info/requires.txt +4 -0
  72. illumio_py_open-1.2.0/illumio_py_open.egg-info/scm_file_list.json +194 -0
  73. illumio_py_open-1.2.0/illumio_py_open.egg-info/scm_version.json +8 -0
  74. illumio_py_open-1.2.0/illumio_py_open.egg-info/top_level.txt +1 -0
  75. illumio_py_open-1.2.0/pyproject.toml +14 -0
  76. illumio_py_open-1.2.0/requirements.txt +7 -0
  77. illumio_py_open-1.2.0/setup.cfg +43 -0
@@ -0,0 +1,176 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
@@ -0,0 +1,18 @@
1
+ # Keep LICENSE / NOTICE / README in the sdist.
2
+ include LICENSE NOTICE README.md
3
+ include illumio/py.typed
4
+
5
+ # Exclude repo/dev/reference material from the distribution.
6
+ # (setuptools_scm otherwise includes every git-tracked file in the sdist.)
7
+ exclude .gitignore .coveragerc .readthedocs.yaml tox.ini Makefile CHANGELOG.rst UPDATE_REPORT.md CLAUDE.md
8
+ prune .github
9
+ prune tasks
10
+ prune docs
11
+ prune tests
12
+ prune tools
13
+
14
+ # Illumio API reference material — never shipped
15
+ prune webservices-v2-experimental-26.3.0
16
+ exclude illumio-v2-openapi-experimental-25.2.10.json
17
+ exclude illumio-core-26.3-openapi.json
18
+ recursive-exclude . *.schema.json
@@ -0,0 +1,9 @@
1
+ illumio-py
2
+ Copyright 2022 Illumio
3
+
4
+ This product includes software developed at Illumio (https://www.illumio.com/).
5
+
6
+ illumio-py-open is a community-maintained fork of illumio/illumio-py
7
+ (https://github.com/illumio/illumio-py), modified to track current Illumio Core
8
+ REST APIs. Changes are made under the terms of the Apache License 2.0. This fork
9
+ is not an official Illumio product and is not endorsed by Illumio.
@@ -0,0 +1,111 @@
1
+ Metadata-Version: 2.4
2
+ Name: illumio-py-open
3
+ Version: 1.2.0
4
+ Summary: Community-maintained REST API client for the Illumio Core Policy Compute Engine (fork of illumio/illumio-py)
5
+ Home-page: https://github.com/alexgoller/illumio-py
6
+ Author: Illumio
7
+ Author-email: app-integrations@illumio.com
8
+ Maintainer: Alex Goller
9
+ Maintainer-email: alex@ryte.de
10
+ Project-URL: Source, https://github.com/alexgoller/illumio-py
11
+ Project-URL: Upstream, https://github.com/illumio/illumio-py
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: License :: OSI Approved :: Apache Software License
14
+ Classifier: Programming Language :: Python :: 3 :: Only
15
+ Classifier: Programming Language :: Python :: 3.6
16
+ Classifier: Programming Language :: Python :: 3.7
17
+ Classifier: Programming Language :: Python :: 3.8
18
+ Classifier: Programming Language :: Python :: 3.9
19
+ Classifier: Programming Language :: Python :: 3.10
20
+ Classifier: Programming Language :: Python :: 3.11
21
+ Classifier: Programming Language :: Python :: 3.12
22
+ Description-Content-Type: text/markdown
23
+ License-File: LICENSE
24
+ Requires-Dist: requests>=2.26.0
25
+ Requires-Dist: dataclasses>=0.8; python_version == "3.6"
26
+ Dynamic: license-file
27
+
28
+ # illumio-py-open
29
+
30
+ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg?color=orange)](https://opensource.org/licenses/Apache-2.0)
31
+
32
+ > **Community fork.** `illumio-py-open` is a community-maintained fork of
33
+ > [illumio/illumio-py](https://github.com/illumio/illumio-py), updated to track current
34
+ > Illumio Core REST APIs. It is **not an official Illumio product and is not endorsed by
35
+ > Illumio.** It is distributed under the Apache License 2.0 (see [NOTICE](NOTICE) and
36
+ > [LICENSE](LICENSE)). The import package is still `illumio`, so existing code keeps working:
37
+ > `from illumio import PolicyComputeEngine`.
38
+
39
+ Illumio Policy Compute Engine REST client for python 3. Provides full API coverage of the Illumio PCE REST API with 56 registered CRUD endpoints and 67 custom methods for specialized operations.
40
+
41
+ Covers security policy, workloads, VENs, infrastructure, access management, authentication, reporting, settings, label mapping, vulnerability management, and traffic analysis.
42
+
43
+ Compatible with Illumio Core PCE version 21.2+.
44
+
45
+ The main entrypoint for the client is the `PolicyComputeEngine` class:
46
+
47
+ ```python
48
+ >>> from illumio import PolicyComputeEngine
49
+ >>> pce = PolicyComputeEngine('pce.company.com', port='8443', org_id='12')
50
+ >>> pce.set_credentials('api_key', 'api_secret')
51
+ >>> workloads = pce.workloads.get(
52
+ ... params={
53
+ ... 'managed': True,
54
+ ... 'enforcement_mode': 'visibility_only'
55
+ ... }
56
+ ... )
57
+ >>> workloads
58
+ [
59
+ Workload(href='/orgs/12/workloads/c754a713-2bde-4427-af1f-bff145be509b', ...),
60
+ ...
61
+ ]
62
+ ```
63
+
64
+ For more information on the Illumio APIs, see the [REST API guide](https://docs.illumio.com/core/21.5/Content/LandingPages/Guides/rest-api.htm) and the [API reference](https://docs.illumio.com/core/21.5/API-Reference/index.html) for your version of Illumio Core.
65
+
66
+ ## [Read the Docs](https://illumio-py.readthedocs.io/en/latest/)
67
+
68
+ You can find API documentation, code examples, and usage guides on our [readthedocs page](https://illumio-py.readthedocs.io/en/latest/)!
69
+
70
+ ## Installation
71
+
72
+ Once published, the fork will be available on PyPI as `illumio-py-open` (the import name
73
+ remains `illumio`):
74
+
75
+ ```sh
76
+ $ python -m pip install illumio-py-open
77
+ ```
78
+
79
+ To build and install from source
80
+
81
+ ```sh
82
+ $ git clone git@github.com:alexgoller/illumio-py.git
83
+ $ cd illumio-py
84
+ $ make
85
+ ```
86
+
87
+ ## Support
88
+
89
+ The `illumio` package is released and distributed as open source software subject to the included [LICENSE](https://github.com/illumio/illumio-py/blob/main/LICENSE). Illumio has no obligation or responsibility related to the package with respect to support, maintenance, availability, security or otherwise. Please read the entire [LICENSE](https://github.com/illumio/illumio-py/blob/main/LICENSE) for additional information regarding the permissions and limitations. Support is offered on a best-effort basis through the [Illumio app integrations team](mailto:app-integrations@illumio.com) and project contributors.
90
+
91
+ ## Contributing
92
+
93
+ See the project's [CONTRIBUTING](https://github.com/illumio/illumio-py/blob/main/.github/CONTRIBUTING.md) document for details.
94
+
95
+ ## License
96
+
97
+ Copyright 2022 Illumio
98
+
99
+ ```
100
+ Licensed under the Apache License, Version 2.0 (the "License");
101
+ you may not use this file except in compliance with the License.
102
+ You may obtain a copy of the License at
103
+
104
+ http://www.apache.org/licenses/LICENSE-2.0
105
+
106
+ Unless required by applicable law or agreed to in writing, software
107
+ distributed under the License is distributed on an "AS IS" BASIS,
108
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
109
+ See the License for the specific language governing permissions and
110
+ limitations under the License.
111
+ ```
@@ -0,0 +1,84 @@
1
+ # illumio-py-open
2
+
3
+ [![License](https://img.shields.io/badge/License-Apache_2.0-blue.svg?color=orange)](https://opensource.org/licenses/Apache-2.0)
4
+
5
+ > **Community fork.** `illumio-py-open` is a community-maintained fork of
6
+ > [illumio/illumio-py](https://github.com/illumio/illumio-py), updated to track current
7
+ > Illumio Core REST APIs. It is **not an official Illumio product and is not endorsed by
8
+ > Illumio.** It is distributed under the Apache License 2.0 (see [NOTICE](NOTICE) and
9
+ > [LICENSE](LICENSE)). The import package is still `illumio`, so existing code keeps working:
10
+ > `from illumio import PolicyComputeEngine`.
11
+
12
+ Illumio Policy Compute Engine REST client for python 3. Provides full API coverage of the Illumio PCE REST API with 56 registered CRUD endpoints and 67 custom methods for specialized operations.
13
+
14
+ Covers security policy, workloads, VENs, infrastructure, access management, authentication, reporting, settings, label mapping, vulnerability management, and traffic analysis.
15
+
16
+ Compatible with Illumio Core PCE version 21.2+.
17
+
18
+ The main entrypoint for the client is the `PolicyComputeEngine` class:
19
+
20
+ ```python
21
+ >>> from illumio import PolicyComputeEngine
22
+ >>> pce = PolicyComputeEngine('pce.company.com', port='8443', org_id='12')
23
+ >>> pce.set_credentials('api_key', 'api_secret')
24
+ >>> workloads = pce.workloads.get(
25
+ ... params={
26
+ ... 'managed': True,
27
+ ... 'enforcement_mode': 'visibility_only'
28
+ ... }
29
+ ... )
30
+ >>> workloads
31
+ [
32
+ Workload(href='/orgs/12/workloads/c754a713-2bde-4427-af1f-bff145be509b', ...),
33
+ ...
34
+ ]
35
+ ```
36
+
37
+ For more information on the Illumio APIs, see the [REST API guide](https://docs.illumio.com/core/21.5/Content/LandingPages/Guides/rest-api.htm) and the [API reference](https://docs.illumio.com/core/21.5/API-Reference/index.html) for your version of Illumio Core.
38
+
39
+ ## [Read the Docs](https://illumio-py.readthedocs.io/en/latest/)
40
+
41
+ You can find API documentation, code examples, and usage guides on our [readthedocs page](https://illumio-py.readthedocs.io/en/latest/)!
42
+
43
+ ## Installation
44
+
45
+ Once published, the fork will be available on PyPI as `illumio-py-open` (the import name
46
+ remains `illumio`):
47
+
48
+ ```sh
49
+ $ python -m pip install illumio-py-open
50
+ ```
51
+
52
+ To build and install from source
53
+
54
+ ```sh
55
+ $ git clone git@github.com:alexgoller/illumio-py.git
56
+ $ cd illumio-py
57
+ $ make
58
+ ```
59
+
60
+ ## Support
61
+
62
+ The `illumio` package is released and distributed as open source software subject to the included [LICENSE](https://github.com/illumio/illumio-py/blob/main/LICENSE). Illumio has no obligation or responsibility related to the package with respect to support, maintenance, availability, security or otherwise. Please read the entire [LICENSE](https://github.com/illumio/illumio-py/blob/main/LICENSE) for additional information regarding the permissions and limitations. Support is offered on a best-effort basis through the [Illumio app integrations team](mailto:app-integrations@illumio.com) and project contributors.
63
+
64
+ ## Contributing
65
+
66
+ See the project's [CONTRIBUTING](https://github.com/illumio/illumio-py/blob/main/.github/CONTRIBUTING.md) document for details.
67
+
68
+ ## License
69
+
70
+ Copyright 2022 Illumio
71
+
72
+ ```
73
+ Licensed under the Apache License, Version 2.0 (the "License");
74
+ you may not use this file except in compliance with the License.
75
+ You may obtain a copy of the License at
76
+
77
+ http://www.apache.org/licenses/LICENSE-2.0
78
+
79
+ Unless required by applicable law or agreed to in writing, software
80
+ distributed under the License is distributed on an "AS IS" BASIS,
81
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
82
+ See the License for the specific language governing permissions and
83
+ limitations under the License.
84
+ ```
@@ -0,0 +1,36 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ """The illumio library provides a simple interface for interacting with PCE APIs.
4
+
5
+ Copyright:
6
+ © 2022 Illumio
7
+
8
+ License:
9
+ Apache2, see LICENSE for more details.
10
+ """
11
+ from .events import *
12
+ from .exceptions import *
13
+ from .secpolicy import *
14
+ from .util import *
15
+ from .accessmanagement import *
16
+ from .authentication import *
17
+ from .policyobjects import *
18
+ from .infrastructure import *
19
+ from .vulnerabilities import *
20
+ from .workloads import *
21
+ from .rules import *
22
+ from .explorer import *
23
+ from .reporting import *
24
+ from .settings import *
25
+ from .labelmapping import *
26
+ from .pce import *
27
+ from .appgroups import *
28
+
29
+ from types import ModuleType
30
+
31
+ # avoid name conflicts with package modules when using
32
+ # `from illumio import *` by excluding them here
33
+ __all__ = [
34
+ export for export, o in globals().items()
35
+ if not (export.startswith('_') or isinstance(o, ModuleType))
36
+ ]
@@ -0,0 +1,24 @@
1
+ # file generated by vcs-versioning
2
+ # don't change, don't track in version control
3
+ from __future__ import annotations
4
+
5
+ __all__ = [
6
+ "__version__",
7
+ "__version_tuple__",
8
+ "version",
9
+ "version_tuple",
10
+ "__commit_id__",
11
+ "commit_id",
12
+ ]
13
+
14
+ version: str
15
+ __version__: str
16
+ __version_tuple__: tuple[int | str, ...]
17
+ version_tuple: tuple[int | str, ...]
18
+ commit_id: str | None
19
+ __commit_id__: str | None
20
+
21
+ __version__ = version = '1.2.0'
22
+ __version_tuple__ = version_tuple = (1, 2, 0)
23
+
24
+ __commit_id__ = commit_id = 'g73b4e85ec'
@@ -0,0 +1,16 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ """This module provides classes related to users, RBAC, and IAM.
4
+
5
+ Copyright:
6
+ © 2022 Illumio
7
+
8
+ License:
9
+ Apache2, see LICENSE for more details.
10
+ """
11
+ from .user import *
12
+ from .accessrestriction import *
13
+ from .authsecurityprincipal import *
14
+ from .permission import *
15
+ from .role import *
16
+ from .serviceaccount import *
@@ -0,0 +1,30 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ """This module provides classes related to access restrictions.
4
+
5
+ Copyright:
6
+ © 2022 Illumio
7
+
8
+ License:
9
+ Apache2, see LICENSE for more details.
10
+ """
11
+ from dataclasses import dataclass
12
+ from typing import List
13
+
14
+ from illumio.util import Reference, MutableObject, pce_api
15
+
16
+
17
+ @dataclass
18
+ @pce_api('access_restrictions')
19
+ class AccessRestriction(MutableObject):
20
+ """Represents an access restriction in the PCE.
21
+
22
+ Access restrictions limit what IP ranges can access the PCE management API.
23
+ """
24
+ ips: List[str] = None
25
+ type: str = None
26
+
27
+
28
+ __all__ = [
29
+ 'AccessRestriction',
30
+ ]
@@ -0,0 +1,32 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ """This module provides classes related to auth security principals.
4
+
5
+ Copyright:
6
+ © 2022 Illumio
7
+
8
+ License:
9
+ Apache2, see LICENSE for more details.
10
+ """
11
+ from dataclasses import dataclass
12
+ from typing import List
13
+
14
+ from illumio.util import Reference, MutableObject, pce_api
15
+
16
+
17
+ @dataclass
18
+ @pce_api('auth_security_principals')
19
+ class AuthSecurityPrincipal(MutableObject):
20
+ """Represents an auth security principal in the PCE.
21
+
22
+ Auth security principals map external identity provider groups
23
+ to PCE permissions.
24
+ """
25
+ display_name: str = None
26
+ sid: str = None
27
+ type: str = None
28
+
29
+
30
+ __all__ = [
31
+ 'AuthSecurityPrincipal',
32
+ ]
@@ -0,0 +1,32 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ """This module provides classes related to RBAC permissions.
4
+
5
+ Copyright:
6
+ © 2022 Illumio
7
+
8
+ License:
9
+ Apache2, see LICENSE for more details.
10
+ """
11
+ from dataclasses import dataclass
12
+ from typing import List
13
+
14
+ from illumio.util import Reference, MutableObject, pce_api
15
+
16
+
17
+ @dataclass
18
+ @pce_api('permissions')
19
+ class Permission(MutableObject):
20
+ """Represents an RBAC permission in the PCE.
21
+
22
+ Permissions define access control bindings between auth security principals,
23
+ roles, and scopes.
24
+ """
25
+ role: Reference = None
26
+ scope: List[Reference] = None
27
+ auth_security_principal: Reference = None
28
+
29
+
30
+ __all__ = [
31
+ 'Permission',
32
+ ]
@@ -0,0 +1,30 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ """This module provides classes related to RBAC roles.
4
+
5
+ Copyright:
6
+ © 2022 Illumio
7
+
8
+ License:
9
+ Apache2, see LICENSE for more details.
10
+ """
11
+ from dataclasses import dataclass
12
+ from typing import List
13
+
14
+ from illumio.util import Reference, JsonObject, pce_api
15
+
16
+
17
+ @dataclass
18
+ @pce_api('roles')
19
+ class Role(Reference):
20
+ """Represents a role in the PCE.
21
+
22
+ Roles are read-only and define sets of capabilities.
23
+ """
24
+ display_name: str = None
25
+ access_level: str = None
26
+
27
+
28
+ __all__ = [
29
+ 'Role',
30
+ ]
@@ -0,0 +1,32 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ """This module provides classes related to service accounts.
4
+
5
+ Copyright:
6
+ © 2022 Illumio
7
+
8
+ License:
9
+ Apache2, see LICENSE for more details.
10
+ """
11
+ from dataclasses import dataclass
12
+ from typing import List
13
+
14
+ from illumio.util import Reference, MutableObject, pce_api
15
+
16
+
17
+ @dataclass
18
+ @pce_api('service_accounts')
19
+ class ServiceAccount(MutableObject):
20
+ """Represents a service account in the PCE.
21
+
22
+ Service accounts provide API access credentials for automated systems.
23
+ """
24
+ permissions: List[Reference] = None
25
+ api_key_id: str = None
26
+ api_key_secret: str = None
27
+ last_login: str = None
28
+
29
+
30
+ __all__ = [
31
+ 'ServiceAccount',
32
+ ]
@@ -0,0 +1,36 @@
1
+ # -*- coding: utf-8 -*-
2
+
3
+ """This module provides classes related to RBAC users in the PCE.
4
+
5
+ Copyright:
6
+ © 2022 Illumio
7
+
8
+ License:
9
+ Apache2, see LICENSE for more details.
10
+ """
11
+ from dataclasses import dataclass
12
+ from typing import List
13
+
14
+ from illumio.util import IllumioObject, pce_api
15
+
16
+
17
+ @dataclass
18
+ @pce_api('users', is_global=True)
19
+ class User(IllumioObject):
20
+ """Represents a user object in the PCE."""
21
+ username: str = None
22
+ last_login_on: str = None
23
+ last_login_ip_address: str = None
24
+ login_count: int = None
25
+ full_name: str = None
26
+ time_zone: str = None
27
+ locked: bool = None
28
+ effective_groups: List[str] = None
29
+ local_profile: dict = None
30
+ type: str = None
31
+ presence_status: str = None
32
+
33
+
34
+ __all__ = [
35
+ 'User',
36
+ ]