Skip to content

Commit bffd912

Browse files
committed
[COR-2386] Make reviewer_stages optional
1 parent 100ca86 commit bffd912

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+966
-79
lines changed

.openapi-generator/FILES

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ docs/AddResourceNhiRequest.md
1111
docs/AddResourceUserRequest.md
1212
docs/App.md
1313
docs/AppTypeEnum.md
14+
docs/AppValidation.md
15+
docs/AppValidationSeverityEnum.md
16+
docs/AppValidationStatusEnum.md
1417
docs/AppsApi.md
1518
docs/AppsList.md
1619
docs/AwsPermissionSetMetadata.md
@@ -84,6 +87,8 @@ docs/PaginatedResourcesList.md
8487
docs/PaginatedTagsList.md
8588
docs/PaginatedUARsList.md
8689
docs/PaginatedUsersList.md
90+
docs/PropagationStatus.md
91+
docs/PropagationStatusEnum.md
8792
docs/Request.md
8893
docs/RequestConfiguration.md
8994
docs/RequestCustomFieldResponse.md
@@ -202,6 +207,9 @@ opal_security/models/add_resource_nhi_request.py
202207
opal_security/models/add_resource_user_request.py
203208
opal_security/models/app.py
204209
opal_security/models/app_type_enum.py
210+
opal_security/models/app_validation.py
211+
opal_security/models/app_validation_severity_enum.py
212+
opal_security/models/app_validation_status_enum.py
205213
opal_security/models/apps_list.py
206214
opal_security/models/aws_permission_set_metadata.py
207215
opal_security/models/aws_permission_set_metadata_aws_permission_set.py
@@ -265,6 +273,8 @@ opal_security/models/paginated_resources_list.py
265273
opal_security/models/paginated_tags_list.py
266274
opal_security/models/paginated_uars_list.py
267275
opal_security/models/paginated_users_list.py
276+
opal_security/models/propagation_status.py
277+
opal_security/models/propagation_status_enum.py
268278
opal_security/models/request.py
269279
opal_security/models/request_configuration.py
270280
opal_security/models/request_custom_field_response.py
@@ -353,6 +363,9 @@ setup.cfg
353363
setup.py
354364
test-requirements.txt
355365
test/__init__.py
356-
test/test_sync_error.py
357-
test/test_sync_error_list.py
366+
test/test_app_validation.py
367+
test/test_app_validation_severity_enum.py
368+
test/test_app_validation_status_enum.py
369+
test/test_propagation_status.py
370+
test/test_propagation_status_enum.py
358371
tox.ini

.openapi-generator/VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
7.10.0
1+
7.11.0

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ This Python package is automatically generated by the [OpenAPI Generator](https:
55

66
- API version: 1.0
77
- [Releases](https://github.com/opalsecurity/opal-python/releases/)
8-
- Generator version: 7.10.0
8+
- Generator version: 7.11.0
99
- Build package: org.openapitools.codegen.languages.PythonClientCodegen
1010

1111
For more information, please visit [https://www.opal.dev/](https://www.opal.dev/)
@@ -247,6 +247,9 @@ Class | Method | HTTP request | Description
247247
- [AddResourceUserRequest](docs/AddResourceUserRequest.md)
248248
- [App](docs/App.md)
249249
- [AppTypeEnum](docs/AppTypeEnum.md)
250+
- [AppValidation](docs/AppValidation.md)
251+
- [AppValidationSeverityEnum](docs/AppValidationSeverityEnum.md)
252+
- [AppValidationStatusEnum](docs/AppValidationStatusEnum.md)
250253
- [AppsList](docs/AppsList.md)
251254
- [AwsPermissionSetMetadata](docs/AwsPermissionSetMetadata.md)
252255
- [AwsPermissionSetMetadataAwsPermissionSet](docs/AwsPermissionSetMetadataAwsPermissionSet.md)
@@ -310,6 +313,8 @@ Class | Method | HTTP request | Description
310313
- [PaginatedTagsList](docs/PaginatedTagsList.md)
311314
- [PaginatedUARsList](docs/PaginatedUARsList.md)
312315
- [PaginatedUsersList](docs/PaginatedUsersList.md)
316+
- [PropagationStatus](docs/PropagationStatus.md)
317+
- [PropagationStatusEnum](docs/PropagationStatusEnum.md)
313318
- [Request](docs/Request.md)
314319
- [RequestConfiguration](docs/RequestConfiguration.md)
315320
- [RequestCustomFieldResponse](docs/RequestCustomFieldResponse.md)

api/openapi.yaml

Lines changed: 120 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,7 @@ paths:
780780
- groups
781781
/groups/{group_id}/reviewer-stages:
782782
get:
783+
deprecated: true
783784
description: Gets the list of reviewer stages for a group.
784785
operationId: get_group_reviewer_stages
785786
parameters:
@@ -808,6 +809,7 @@ paths:
808809
tags:
809810
- groups
810811
put:
812+
deprecated: true
811813
description: Sets the list of reviewer stages for a group.
812814
operationId: set_group_reviewer_stages
813815
parameters:
@@ -1174,6 +1176,8 @@ paths:
11741176
format: uuid
11751177
alias:
11761178
type: string
1179+
hidden_from_end_user:
1180+
type: boolean
11771181
type: object
11781182
required:
11791183
- mappings
@@ -1476,7 +1480,7 @@ paths:
14761480
- requests
14771481
post:
14781482
description: "Create an access request"
1479-
operationId: "createRequest" # TODO amruth confirm naming
1483+
operationId: "createRequest"
14801484
requestBody:
14811485
description: Resources to be updated
14821486
required: true
@@ -3415,6 +3419,11 @@ components:
34153419
type: string
34163420
app_type:
34173421
$ref: "#/components/schemas/AppTypeEnum"
3422+
validations:
3423+
description: Validation checks of an apps' configuration and permissions.
3424+
items:
3425+
$ref: "#/components/schemas/AppValidation"
3426+
type: array
34183427
required:
34193428
- app_id
34203429
- name
@@ -3522,6 +3531,69 @@ components:
35223531
- event_type
35233532
- created_at
35243533
type: object
3534+
AppValidation:
3535+
description: |-
3536+
# App validation object
3537+
### Description
3538+
The `AppValidation` object is used to represent a validation check of an apps' configuration and permissions.
3539+
3540+
### Usage Example
3541+
List from the `GET Apps` endpoint.
3542+
example:
3543+
key: "iam:GetRole"
3544+
name: "Opal's service account is missing the 'iam:GetRole' permission."
3545+
usage_reason: "Opal uses the 'iam:GetRole' permissions to view access to resources."
3546+
details: "403 Google API Error. Service account is not authorized to access role assignments."
3547+
severity: HIGH
3548+
status: FAILED
3549+
updated_at: 2021-01-06T20:00:00Z
3550+
properties:
3551+
key:
3552+
description: The key of the app validation. These are not unique IDs between runs.
3553+
example: "iam:GetUser"
3554+
type: string
3555+
name:
3556+
description: The human-readable description of whether the validation has the permissions.
3557+
example: "Opal's service account is missing the 'iam:GetUser' description."
3558+
usage_reason:
3559+
description: The reason for needing the validation.
3560+
example: Opal uses the 'iam:GetUser' permission to import users.
3561+
type: string
3562+
details:
3563+
description: Extra details regarding the validation. Could be an error message or restrictions on permissions.
3564+
example: 403 Google API Error. Service account is not authorized to access role assignments.
3565+
type: string
3566+
severity:
3567+
$ref: "#/components/schemas/AppValidationSeverityEnum"
3568+
status:
3569+
$ref: "#/components/schemas/AppValidationStatusEnum"
3570+
updated_at:
3571+
description: The date and time the app validation was last run.
3572+
example: 2021-01-06T20:00:00Z
3573+
format: date-time
3574+
type: string
3575+
required:
3576+
- key
3577+
- name
3578+
- status
3579+
- severity
3580+
- updated_at
3581+
AppValidationSeverityEnum:
3582+
description: The severity of an app validation.
3583+
enum:
3584+
- CRITICAL
3585+
- HIGH
3586+
- MEDIUM
3587+
- LOW
3588+
example: CRITICAL
3589+
type: string
3590+
AppValidationStatusEnum:
3591+
description: The status of an app validation.
3592+
enum:
3593+
- SUCCESS
3594+
- FAILED
3595+
example: FAILED
3596+
type: string
35253597
SubEvent:
35263598
description: |-
35273599
# Sub event Object
@@ -3766,6 +3838,8 @@ components:
37663838
example: 3
37673839
format: int32
37683840
type: integer
3841+
propagation_status:
3842+
$ref: "#/components/schemas/PropagationStatus"
37693843
required:
37703844
- email
37713845
- full_name
@@ -4375,12 +4449,48 @@ components:
43754449
format: date-time
43764450
nullable: true
43774451
type: string
4452+
propagation_status:
4453+
$ref: "#/components/schemas/PropagationStatus"
43784454
required:
43794455
- email
43804456
- full_name
43814457
- group_id
43824458
- user_id
43834459
type: object
4460+
PropagationStatus:
4461+
description: The state of whether the push action was propagated to the remote system. If this is null, the access was synced from the remote system.
4462+
properties:
4463+
status:
4464+
$ref: "#/components/schemas/PropagationStatusEnum"
4465+
required:
4466+
- status
4467+
PropagationStatusEnum:
4468+
description: The status of whether the user has been synced to the group or resource in the remote system.
4469+
enum:
4470+
- SUCCESS
4471+
- ERR_REMOTE_INTERNAL_ERROR
4472+
- ERR_REMOTE_USER_NOT_FOUND
4473+
- ERR_REMOTE_USER_NOT_LINKED
4474+
- ERR_REMOTE_RESOURCE_NOT_FOUND
4475+
- ERR_REMOTE_THROTTLE
4476+
- ERR_NOT_AUTHORIZED_TO_QUERY_RESOURCE
4477+
- ERR_REMOTE_PROVISIONING_VIA_IDP_FAILED
4478+
- ERR_IDP_EMAIL_UPDATE_CONFLICT
4479+
- ERR_TIMEOUT
4480+
- ERR_UNKNOWN
4481+
- ERR_OPAL_INTERNAL_ERROR
4482+
- ERR_ORG_READ_ONLY
4483+
- ERR_OPERATION_UNSUPPORTED
4484+
- PENDING
4485+
- PENDING_MANUAL_PROPAGATION
4486+
- PENDING_TICKET_CREATION
4487+
- ERR_TICKET_CREATION_SKIPPED
4488+
- ERR_DRY_RUN_MODE_ENABLED
4489+
- ERR_HR_IDP_PROVIDER_NOT_LINKED
4490+
- ERR_REMOTE_UNRECOVERABLE_ERROR
4491+
example:
4492+
- SUCCESS
4493+
type: string
43844494
UpdateGroupInfoList:
43854495
example:
43864496
groups:
@@ -4562,13 +4672,15 @@ components:
45624672
enum:
45634673
- ACTIVE_DIRECTORY_GROUP
45644674
- AWS_SSO_GROUP
4675+
- DATABRICKS_ACCOUNT_GROUP
45654676
- DUO_GROUP
45664677
- GIT_HUB_TEAM
45674678
- GIT_LAB_GROUP
45684679
- GOOGLE_GROUPS_GROUP
45694680
- GOOGLE_GROUPS_GKE_GROUP
45704681
- LDAP_GROUP
45714682
- OKTA_GROUP
4683+
- OKTA_GROUP_RULE
45724684
- TAILSCALE_GROUP
45734685
- OPAL_GROUP
45744686
- OPAL_ACCESS_RULE
@@ -4606,6 +4718,7 @@ components:
46064718
- AZURE_ENTERPRISE_APP
46074719
- CUSTOM
46084720
- CUSTOM_CONNECTOR
4721+
- DATABRICKS_ACCOUNT_SERVICE_PRINCIPAL
46094722
- GCP_ORGANIZATION
46104723
- GCP_BUCKET
46114724
- GCP_COMPUTE_INSTANCE
@@ -4666,28 +4779,10 @@ components:
46664779
IdpGroupMapping:
46674780
description: Information about a group mapping.
46684781
example:
4669-
id: 7870617d-e72a-47f5-a84c-693817ab4567
4670-
organization_id: 1520617d-e72a-47f5-a84c-693817ab48ad2
4671-
app_resource_id: 6f99639b-7928-4043-8184-47cbc6766145
46724782
group_id: 6f99639b-7928-4043-8184-47cbc6766145
46734783
alias: "finance-team"
46744784
hidden_from_end_user: False
46754785
properties:
4676-
id:
4677-
description: The ID of the idp group mapping.
4678-
example: 7870617d-e72a-47f5-a84c-693817ab4567
4679-
format: uuid
4680-
type: string
4681-
organization_id:
4682-
description: The ID of the organization.
4683-
example: 1520617d-e72a-47f5-a84c-693817ab48ad2
4684-
format: uuid
4685-
type: string
4686-
app_resource_id:
4687-
description: The ID of the idp app resource.
4688-
example: 6f99639b-7928-4043-8184-47cbc6766145
4689-
format: uuid
4690-
type: string
46914786
group_id:
46924787
description: The ID of the group.
46934788
example: 6f99639b-7928-4043-8184-47cbc6766145
@@ -4702,35 +4797,26 @@ components:
47024797
example: False
47034798
type: boolean
47044799
required:
4705-
- id
4706-
- organization_id
4707-
- app_resource_id
47084800
- group_id
47094801
- hidden_from_end_user
47104802
type: object
47114803
IdpGroupMappingList:
47124804
example:
4713-
idp_group_mappings:
4714-
- id: 7870617d-e72a-47f5-a84c-693817ab4567
4715-
organization_id: 1520617d-e72a-47f5-a84c-693817ab48ad2
4716-
app_resource_id: 6f99639b-7928-4043-8184-47cbc6766145
4717-
group_id: 6f99639b-7928-4043-8184-47cbc6766145
4805+
mappings:
4806+
- group_id: 6f99639b-7928-4043-8184-47cbc6766145
47184807
alias: "finance-team"
47194808
hidden_from_end_user: False
4720-
- id: 1520617d-e72a-47f5-a84c-693817ab48ad2
4721-
organization_id: 6f99639b-7928-4043-8184-47cbc6766145
4722-
app_resource_id: 7870617d-e72a-47f5-a84c-693817ab4567
4723-
group_id: 7870617d-e72a-47f5-a84c-693817ab4567
4809+
- group_id: 7870617d-e72a-47f5-a84c-693817ab4567
47244810
alias: "engineering-team"
47254811
hidden_from_end_user: False
47264812
properties:
4727-
idp_group_mappings:
4813+
mappings:
47284814
items:
47294815
$ref: "#/components/schemas/IdpGroupMapping"
47304816
type: array
47314817
type: object
47324818
required:
4733-
- idp_group_mappings
4819+
- mappings
47344820
ResourceWithAccessLevel:
47354821
description: Information about a resource and corresponding access level
47364822
example:
@@ -7145,7 +7231,6 @@ components:
71457231
- auto_approval
71467232
- require_mfa_to_request
71477233
- require_support_ticket
7148-
- reviewer_stages
71497234
- priority
71507235
CreateRequestConfigurationInfoList:
71517236
description: |-
@@ -7675,7 +7760,7 @@ components:
76757760
identifier:
76767761
type: string
76777762
url:
7678-
type: string # TODO amruth Does url format exist?
7763+
type: string
76797764
required:
76807765
- ticketing_provider
76817766
- remote_id

docs/App.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Name | Type | Description | Notes
1111
**description** | **str** | A description of the app. |
1212
**admin_owner_id** | **str** | The ID of the owner of the app. |
1313
**app_type** | [**AppTypeEnum**](AppTypeEnum.md) | |
14+
**validations** | [**List[AppValidation]**](AppValidation.md) | Validation checks of an apps' configuration and permissions. | [optional]
1415

1516
## Example
1617

0 commit comments

Comments
 (0)