oci 2.110.2__py3-none-any.whl → 2.112.0__py3-none-any.whl
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.
- oci/access_governance_cp/access_governance_cp_client.py +8 -8
- oci/adm/application_dependency_management_client.py +18 -18
- oci/ai_anomaly_detection/anomaly_detection_client.py +36 -36
- oci/ai_document/ai_service_document_client.py +22 -22
- oci/ai_language/ai_service_language_client.py +36 -36
- oci/ai_speech/ai_service_speech_client.py +9 -9
- oci/ai_vision/ai_service_vision_client.py +25 -25
- oci/analytics/analytics_client.py +23 -23
- oci/announcements_service/announcement_client.py +4 -4
- oci/announcements_service/announcement_subscription_client.py +9 -9
- oci/announcements_service/announcements_preferences_client.py +4 -4
- oci/apigateway/api_gateway_client.py +21 -21
- oci/apigateway/deployment_client.py +6 -6
- oci/apigateway/gateway_client.py +6 -6
- oci/apigateway/subscribers_client.py +6 -6
- oci/apigateway/usage_plans_client.py +6 -6
- oci/apigateway/work_requests_client.py +5 -5
- oci/apm_config/config_client.py +8 -8
- oci/apm_control_plane/apm_domain_client.py +14 -14
- oci/apm_synthetics/apm_synthetic_client.py +18 -18
- oci/apm_synthetics/models/__init__.py +2 -0
- oci/apm_synthetics/models/browser_monitor_configuration.py +3 -3
- oci/apm_synthetics/models/client_certificate.py +1 -1
- oci/apm_synthetics/models/create_monitor_details.py +9 -3
- oci/apm_synthetics/models/link.py +2 -2
- oci/apm_synthetics/models/monitor.py +9 -3
- oci/apm_synthetics/models/monitor_configuration.py +11 -3
- oci/apm_synthetics/models/monitor_summary.py +9 -3
- oci/apm_synthetics/models/network_monitor_configuration.py +92 -0
- oci/apm_synthetics/models/private_key.py +1 -1
- oci/apm_synthetics/models/rest_monitor_configuration.py +1 -1
- oci/apm_synthetics/models/scripted_browser_monitor_configuration.py +3 -3
- oci/apm_synthetics/models/scripted_rest_monitor_configuration.py +1 -1
- oci/apm_synthetics/models/update_monitor_details.py +2 -0
- oci/apm_traces/query_client.py +2 -2
- oci/apm_traces/trace_client.py +4 -4
- oci/application_migration/application_migration_client.py +19 -19
- oci/appmgmt_control/appmgmt_control_client.py +8 -8
- oci/artifacts/artifacts_client.py +32 -32
- oci/audit/audit_client.py +3 -3
- oci/auth/auth_utils.py +16 -0
- oci/auth/rpt_path_providers.py +54 -4
- oci/auth/security_token_container.py +4 -0
- oci/auth/signers/__init__.py +3 -1
- oci/auth/signers/ephemeral_resource_principals_v21_signer.py +31 -1
- oci/auth/signers/nested_resource_principals_signer.py +200 -0
- oci/auth/signers/oke_workload_identity_resource_principal_signer.py +154 -0
- oci/auth/signers/resource_principals_federation_signer.py +1 -1
- oci/auth/signers/resource_principals_signer.py +149 -5
- oci/autoscaling/auto_scaling_client.py +11 -11
- oci/base_client.py +3 -1
- oci/bastion/bastion_client.py +15 -15
- oci/bds/bds_client.py +47 -47
- oci/blockchain/blockchain_platform_client.py +27 -27
- oci/budget/budget_client.py +10 -10
- oci/certificates/certificates_client.py +5 -5
- oci/certificates_management/certificates_management_client.py +32 -32
- oci/cims/__init__.py +1 -3
- oci/cims/incident_client.py +356 -93
- oci/cims/models/__init__.py +6 -0
- oci/cims/models/account_item.py +85 -0
- oci/cims/models/activity_item.py +112 -14
- oci/cims/models/category.py +5 -5
- oci/cims/models/contact.py +32 -1
- oci/cims/models/contextual_data.py +9 -9
- oci/cims/models/create_account_item_details.py +78 -0
- oci/cims/models/create_category_details.py +2 -4
- oci/cims/models/create_incident.py +13 -9
- oci/cims/models/create_issue_type_details.py +0 -2
- oci/cims/models/create_item_details.py +9 -7
- oci/cims/models/create_limit_item_details.py +3 -3
- oci/cims/models/create_resource_details.py +2 -289
- oci/cims/models/create_sub_category_details.py +3 -5
- oci/cims/models/create_tech_support_item_details.py +1 -3
- oci/cims/models/create_ticket_details.py +11 -13
- oci/cims/models/create_user_details.py +65 -36
- oci/cims/models/incident.py +10 -6
- oci/cims/models/incident_resource_type.py +66 -4
- oci/cims/models/incident_summary.py +9 -5
- oci/cims/models/incident_type.py +1 -1
- oci/cims/models/issue_type.py +33 -2
- oci/cims/models/item.py +8 -4
- oci/cims/models/limit_item.py +7 -7
- oci/cims/models/resource.py +2 -285
- oci/cims/models/service_categories.py +134 -0
- oci/cims/models/service_category.py +1 -1
- oci/cims/models/sub_category.py +5 -5
- oci/cims/models/tenancy_information.py +3 -3
- oci/cims/models/ticket.py +7 -3
- oci/cims/models/update_activity_item_details.py +8 -6
- oci/cims/models/update_incident.py +62 -2
- oci/cims/models/update_item_details.py +3 -5
- oci/cims/models/update_resource_details.py +0 -2
- oci/cims/models/update_ticket_details.py +0 -2
- oci/cims/models/user.py +79 -19
- oci/cims/user_client.py +1 -1
- oci/cloud_bridge/common_client.py +5 -5
- oci/cloud_bridge/discovery_client.py +14 -14
- oci/cloud_bridge/inventory_client.py +16 -16
- oci/cloud_bridge/ocb_agent_svc_client.py +23 -23
- oci/cloud_guard/cloud_guard_client.py +133 -133
- oci/cloud_migrations/migration_client.py +43 -43
- oci/compute_cloud_at_customer/compute_cloud_at_customer_client.py +12 -12
- oci/compute_instance_agent/compute_instance_agent_client.py +6 -6
- oci/compute_instance_agent/plugin_client.py +2 -2
- oci/compute_instance_agent/pluginconfig_client.py +1 -1
- oci/container_engine/container_engine_client.py +44 -44
- oci/container_instances/container_instance_client.py +129 -24
- oci/core/blockstorage_client.py +60 -60
- oci/core/compute_client.py +90 -90
- oci/core/compute_management_client.py +32 -32
- oci/core/models/__init__.py +20 -0
- oci/core/models/amd_milan_bm_gpu_launch_instance_platform_config.py +34 -3
- oci/core/models/amd_milan_bm_gpu_platform_config.py +34 -3
- oci/core/models/amd_milan_bm_launch_instance_platform_config.py +34 -3
- oci/core/models/amd_milan_bm_platform_config.py +34 -3
- oci/core/models/amd_rome_bm_gpu_launch_instance_platform_config.py +34 -3
- oci/core/models/amd_rome_bm_gpu_platform_config.py +34 -3
- oci/core/models/amd_rome_bm_launch_instance_platform_config.py +34 -3
- oci/core/models/amd_rome_bm_platform_config.py +34 -3
- oci/core/models/amd_vm_launch_instance_platform_config.py +1 -1
- oci/core/models/amd_vm_platform_config.py +1 -1
- oci/core/models/capture_filter.py +5 -2
- oci/core/models/change_capture_filter_compartment_details.py +1 -1
- oci/core/models/cluster_network_placement_configuration_details.py +32 -5
- oci/core/models/cpe.py +33 -2
- oci/core/models/create_capture_filter_details.py +1 -1
- oci/core/models/create_cpe_details.py +33 -2
- oci/core/models/create_instance_pool_placement_configuration_details.py +32 -5
- oci/core/models/create_ip_sec_connection_tunnel_details.py +105 -0
- oci/core/models/create_macsec_properties.py +33 -2
- oci/core/models/create_virtual_circuit_details.py +31 -0
- oci/core/models/create_vnic_details.py +76 -0
- oci/core/models/drg_attachment_network_create_details.py +1 -1
- oci/core/models/drg_attachment_network_details.py +5 -1
- oci/core/models/generic_bm_launch_instance_platform_config.py +349 -0
- oci/core/models/generic_bm_platform_config.py +349 -0
- oci/core/models/instance_configuration_amd_milan_bm_gpu_launch_instance_platform_config.py +34 -3
- oci/core/models/instance_configuration_amd_milan_bm_launch_instance_platform_config.py +34 -3
- oci/core/models/instance_configuration_amd_rome_bm_gpu_launch_instance_platform_config.py +34 -3
- oci/core/models/instance_configuration_amd_rome_bm_launch_instance_platform_config.py +34 -3
- oci/core/models/instance_configuration_amd_vm_launch_instance_platform_config.py +1 -1
- oci/core/models/instance_configuration_create_vnic_details.py +76 -0
- oci/core/models/instance_configuration_generic_bm_launch_instance_platform_config.py +349 -0
- oci/core/models/instance_configuration_intel_icelake_bm_launch_instance_platform_config.py +34 -3
- oci/core/models/instance_configuration_intel_skylake_bm_launch_instance_platform_config.py +199 -3
- oci/core/models/instance_configuration_intel_vm_launch_instance_platform_config.py +1 -1
- oci/core/models/instance_configuration_ipv6_address_ipv6_subnet_cidr_pair_details.py +103 -0
- oci/core/models/instance_configuration_launch_instance_platform_config.py +11 -3
- oci/core/models/instance_pool_placement_configuration.py +32 -3
- oci/core/models/instance_pool_placement_ipv6_address_ipv6_subnet_cidr_details.py +72 -0
- oci/core/models/instance_pool_placement_primary_subnet.py +152 -0
- oci/core/models/instance_pool_placement_secondary_vnic_subnet.py +76 -0
- oci/core/models/instance_pool_placement_subnet_details.py +152 -0
- oci/core/models/intel_icelake_bm_launch_instance_platform_config.py +34 -3
- oci/core/models/intel_icelake_bm_platform_config.py +34 -3
- oci/core/models/intel_skylake_bm_launch_instance_platform_config.py +199 -3
- oci/core/models/intel_skylake_bm_platform_config.py +199 -3
- oci/core/models/intel_vm_launch_instance_platform_config.py +1 -1
- oci/core/models/intel_vm_platform_config.py +1 -1
- oci/core/models/ip_sec_connection.py +49 -2
- oci/core/models/ip_sec_connection_tunnel.py +37 -2
- oci/core/models/ipsec_tunnel_drg_attachment_network_details.py +37 -2
- oci/core/models/ipv6_address_ipv6_subnet_cidr_pair_details.py +109 -0
- oci/core/models/launch_instance_platform_config.py +11 -3
- oci/core/models/loop_back_drg_attachment_network_details.py +93 -0
- oci/core/models/macsec_properties.py +33 -2
- oci/core/models/platform_config.py +11 -3
- oci/core/models/shape_platform_config_options.py +7 -3
- oci/core/models/update_capture_filter_details.py +1 -1
- oci/core/models/update_instance_pool_placement_configuration_details.py +34 -7
- oci/core/models/update_macsec_properties.py +33 -2
- oci/core/models/update_virtual_circuit_details.py +31 -0
- oci/core/models/virtual_circuit.py +31 -0
- oci/core/models/virtual_circuit_associated_tunnel_details.py +154 -0
- oci/core/models/virtual_circuit_drg_attachment_network_details.py +37 -2
- oci/core/models/vnic.py +37 -2
- oci/core/virtual_network_client.py +361 -241
- oci/dashboard_service/dashboard_client.py +6 -6
- oci/dashboard_service/dashboard_group_client.py +6 -6
- oci/data_catalog/data_catalog_client.py +424 -154
- oci/data_catalog/models/__init__.py +22 -0
- oci/data_catalog/models/asynchronous_export_glossary_details.py +68 -0
- oci/data_catalog/models/asynchronous_export_glossary_result.py +196 -0
- oci/data_catalog/models/asynchronous_export_request_details.py +68 -0
- oci/data_catalog/models/asynchronous_export_result.py +196 -0
- oci/data_catalog/models/attribute.py +33 -0
- oci/data_catalog/models/attribute_summary.py +33 -0
- oci/data_catalog/models/create_job_definition_details.py +42 -3
- oci/data_catalog/models/create_job_details.py +2 -0
- oci/data_catalog/models/create_job_execution_details.py +11 -3
- oci/data_catalog/models/data_asset.py +33 -0
- oci/data_catalog/models/data_asset_summary.py +35 -2
- oci/data_catalog/models/entity.py +33 -0
- oci/data_catalog/models/entity_lineage.py +222 -0
- oci/data_catalog/models/entity_summary.py +33 -0
- oci/data_catalog/models/faceted_search_date_filter_request.py +2 -2
- oci/data_catalog/models/faceted_search_string_filter_request.py +8 -2
- oci/data_catalog/models/fetch_entity_lineage_details.py +190 -0
- oci/data_catalog/models/folder.py +33 -0
- oci/data_catalog/models/folder_summary.py +35 -2
- oci/data_catalog/models/job.py +44 -3
- oci/data_catalog/models/job_definition.py +42 -3
- oci/data_catalog/models/job_definition_summary.py +44 -5
- oci/data_catalog/models/job_execution.py +11 -3
- oci/data_catalog/models/job_execution_summary.py +11 -3
- oci/data_catalog/models/job_summary.py +44 -3
- oci/data_catalog/models/lineage_object.py +400 -0
- oci/data_catalog/models/lineage_relationship.py +134 -0
- oci/data_catalog/models/object_lineage.py +223 -0
- oci/data_catalog/models/object_lineage_request_details.py +190 -0
- oci/data_catalog/models/object_storage_object_reference.py +134 -0
- oci/data_catalog/models/update_job_definition_details.py +31 -0
- oci/data_catalog/models/update_job_details.py +2 -0
- oci/data_flow/data_flow_client.py +42 -42
- oci/data_integration/data_integration_client.py +163 -163
- oci/data_labeling_service/data_labeling_management_client.py +17 -17
- oci/data_labeling_service_dataplane/data_labeling_client.py +15 -15
- oci/data_safe/data_safe_client.py +214 -214
- oci/data_science/data_science_client.py +85 -85
- oci/database/database_client.py +626 -308
- oci/database/models/__init__.py +10 -0
- oci/database/models/acd_avm_resource_stats.py +241 -0
- oci/database/models/autonomous_container_database.py +107 -38
- oci/database/models/autonomous_container_database_resource_usage.py +437 -0
- oci/database/models/autonomous_container_database_summary.py +107 -38
- oci/database/models/autonomous_database.py +2 -6
- oci/database/models/autonomous_database_connection_strings.py +1 -1
- oci/database/models/autonomous_database_summary.py +2 -6
- oci/database/models/autonomous_vm_cluster.py +6 -18
- oci/database/models/autonomous_vm_cluster_summary.py +6 -18
- oci/database/models/autonomous_vm_resource_usage.py +299 -0
- oci/database/models/avm_acd_resource_stats.py +272 -0
- oci/database/models/cloud_autonomous_vm_cluster.py +287 -20
- oci/database/models/cloud_autonomous_vm_cluster_resource_usage.py +673 -0
- oci/database/models/cloud_autonomous_vm_cluster_summary.py +287 -20
- oci/database/models/create_autonomous_vm_cluster_details.py +4 -12
- oci/database/models/create_cloud_autonomous_vm_cluster_details.py +4 -12
- oci/database/models/update_autonomous_database_details.py +2 -6
- oci/database_management/db_management_client.py +182 -182
- oci/database_management/diagnosability_client.py +4 -4
- oci/database_management/sql_tuning_client.py +10 -10
- oci/database_migration/database_migration_client.py +41 -41
- oci/database_migration/models/__init__.py +10 -0
- oci/database_migration/models/connection.py +27 -0
- oci/database_migration/models/create_connection_details.py +27 -0
- oci/database_migration/models/create_golden_gate_hub.py +4 -4
- oci/database_migration/models/create_golden_gate_service_details.py +149 -0
- oci/database_migration/models/create_migration_details.py +27 -0
- oci/database_migration/models/database_credentials.py +103 -0
- oci/database_migration/models/ggs_deployment.py +103 -0
- oci/database_migration/models/golden_gate_service_details.py +95 -0
- oci/database_migration/models/migration.py +38 -3
- oci/database_migration/models/migration_job_progress_resource.py +11 -3
- oci/database_migration/models/migration_job_progress_summary.py +11 -3
- oci/database_migration/models/migration_phase_summary.py +11 -3
- oci/database_migration/models/phase_status.py +11 -3
- oci/database_migration/models/resume_job_details.py +11 -3
- oci/database_migration/models/start_migration_details.py +11 -3
- oci/database_migration/models/update_connection_details.py +27 -0
- oci/database_migration/models/update_golden_gate_service_details.py +149 -0
- oci/database_migration/models/update_migration_details.py +27 -0
- oci/database_tools/database_tools_client.py +19 -19
- oci/devops/devops_client.py +89 -89
- oci/disaster_recovery/disaster_recovery_client.py +29 -29
- oci/dns/dns_client.py +52 -52
- oci/dts/appliance_export_job_client.py +6 -6
- oci/dts/shipping_vendors_client.py +1 -1
- oci/dts/transfer_appliance_client.py +8 -8
- oci/dts/transfer_appliance_entitlement_client.py +3 -3
- oci/dts/transfer_device_client.py +5 -5
- oci/dts/transfer_job_client.py +6 -6
- oci/dts/transfer_package_client.py +7 -7
- oci/em_warehouse/em_data_lake_client.py +13 -13
- oci/em_warehouse/em_warehouse_client.py +13 -13
- oci/email/email_client.py +25 -25
- oci/events/events_client.py +6 -6
- oci/file_storage/file_storage_client.py +50 -50
- oci/fleet_software_update/fleet_software_update_client.py +44 -44
- oci/functions/functions_invoke_client.py +1 -1
- oci/functions/functions_management_client.py +16 -16
- oci/fusion_apps/data_masking_activity_client.py +3 -3
- oci/fusion_apps/fusion_applications_client.py +39 -39
- oci/fusion_apps/fusion_environment_client.py +15 -15
- oci/fusion_apps/fusion_environment_family_client.py +8 -8
- oci/fusion_apps/refresh_activity_client.py +4 -4
- oci/fusion_apps/scheduled_activity_client.py +2 -2
- oci/fusion_apps/service_attachment_client.py +2 -2
- oci/generic_artifacts_content/generic_artifacts_content_client.py +3 -3
- oci/golden_gate/golden_gate_client.py +57 -57
- oci/governance_rules_control_plane/governance_rule_client.py +15 -15
- oci/governance_rules_control_plane/work_request_client.py +5 -5
- oci/healthchecks/health_checks_client.py +17 -17
- oci/identity/identity_client.py +145 -145
- oci/identity_data_plane/dataplane_client.py +2 -2
- oci/identity_domains/identity_domains_client.py +190 -190
- oci/integration/integration_instance_client.py +15 -15
- oci/jms/java_management_service_client.py +56 -56
- oci/key_management/kms_crypto_client.py +6 -6
- oci/key_management/kms_management_client.py +21 -21
- oci/key_management/kms_vault_client.py +14 -14
- oci/license_manager/license_manager_client.py +18 -18
- oci/limits/limits_client.py +4 -4
- oci/limits/quotas_client.py +7 -7
- oci/load_balancer/load_balancer_client.py +61 -61
- oci/lockbox/lockbox_client.py +22 -22
- oci/log_analytics/log_analytics_client.py +192 -192
- oci/logging/logging_management_client.py +30 -30
- oci/loggingingestion/logging_client.py +1 -1
- oci/loggingsearch/log_search_client.py +1 -1
- oci/management_agent/management_agent_client.py +23 -23
- oci/management_dashboard/dashx_apis_client.py +14 -14
- oci/marketplace/account_client.py +2 -2
- oci/marketplace/marketplace_client.py +25 -25
- oci/media_services/media_services_client.py +48 -48
- oci/media_services/media_stream_client.py +2 -2
- oci/monitoring/monitoring_client.py +13 -13
- oci/mysql/channels_client.py +7 -7
- oci/mysql/db_backups_client.py +6 -6
- oci/mysql/db_system_client.py +273 -1328
- oci/mysql/db_system_client_composite_operations.py +0 -294
- oci/mysql/models/__init__.py +0 -16
- oci/mysql/models/db_system.py +0 -60
- oci/mysql/models/db_system_summary.py +0 -60
- oci/mysql/models/shape_summary.py +3 -7
- oci/mysql/models/work_request.py +3 -31
- oci/mysql/models/work_request_summary.py +3 -31
- oci/mysql/mysqlaas_client.py +9 -9
- oci/mysql/replicas_client.py +5 -5
- oci/mysql/work_requests_client.py +4 -4
- oci/network_firewall/network_firewall_client.py +17 -17
- oci/network_load_balancer/network_load_balancer_client.py +34 -34
- oci/nosql/nosql_client.py +22 -22
- oci/object_storage/object_storage_client.py +50 -50
- oci/oce/oce_instance_client.py +10 -10
- oci/oci_control_center/occ_metrics_client.py +3 -3
- oci/ocvp/esxi_host_client.py +6 -6
- oci/ocvp/sddc_client.py +13 -13
- oci/ocvp/work_request_client.py +4 -4
- oci/oda/management_client.py +56 -56
- oci/oda/oda_client.py +17 -17
- oci/oda/odapackage_client.py +7 -7
- oci/onesubscription/billing_schedule_client.py +1 -1
- oci/onesubscription/commitment_client.py +2 -2
- oci/onesubscription/computed_usage_client.py +3 -3
- oci/onesubscription/invoice_summary_client.py +2 -2
- oci/onesubscription/organization_subscription_client.py +1 -1
- oci/onesubscription/ratecard_client.py +1 -1
- oci/onesubscription/subscribed_service_client.py +2 -2
- oci/onesubscription/subscription_client.py +1 -1
- oci/ons/notification_control_plane_client.py +6 -6
- oci/ons/notification_data_plane_client.py +10 -10
- oci/opa/opa_instance_client.py +11 -11
- oci/opensearch/opensearch_cluster_backup_client.py +4 -4
- oci/opensearch/opensearch_cluster_client.py +14 -14
- oci/operator_access_control/access_requests_client.py +9 -9
- oci/operator_access_control/operator_actions_client.py +2 -2
- oci/operator_access_control/operator_control_assignment_client.py +6 -6
- oci/operator_access_control/operator_control_client.py +6 -6
- oci/opsi/operations_insights_client.py +159 -159
- oci/optimizer/optimizer_client.py +26 -26
- oci/os_management/event_client.py +8 -8
- oci/os_management/os_management_client.py +69 -69
- oci/os_management_hub/lifecycle_environment_client.py +11 -11
- oci/os_management_hub/managed_instance_client.py +22 -22
- oci/os_management_hub/managed_instance_group_client.py +22 -22
- oci/os_management_hub/management_station_client.py +8 -8
- oci/os_management_hub/onboarding_client.py +5 -5
- oci/os_management_hub/reporting_managed_instance_client.py +3 -3
- oci/os_management_hub/scheduled_job_client.py +6 -6
- oci/os_management_hub/software_source_client.py +22 -22
- oci/os_management_hub/work_request_client.py +4 -4
- oci/osp_gateway/address_rule_service_client.py +1 -1
- oci/osp_gateway/address_service_client.py +2 -2
- oci/osp_gateway/invoice_service_client.py +5 -5
- oci/osp_gateway/subscription_service_client.py +5 -5
- oci/osub_billing_schedule/billing_schedule_client.py +1 -1
- oci/osub_organization_subscription/organization_subscription_client.py +1 -1
- oci/osub_subscription/commitment_client.py +2 -2
- oci/osub_subscription/ratecard_client.py +1 -1
- oci/osub_subscription/subscription_client.py +1 -1
- oci/osub_usage/computed_usage_client.py +3 -3
- oci/queue/models/__init__.py +4 -0
- oci/queue/models/channel_collection.py +72 -0
- oci/queue/models/create_queue_details.py +50 -11
- oci/queue/models/delete_messages_details_entry.py +2 -2
- oci/queue/models/get_message.py +55 -12
- oci/queue/models/message_metadata.py +103 -0
- oci/queue/models/purge_queue_details.py +43 -8
- oci/queue/models/put_message.py +44 -5
- oci/queue/models/put_messages.py +3 -3
- oci/queue/models/put_messages_details_entry.py +29 -2
- oci/queue/models/queue.py +76 -21
- oci/queue/models/queue_stats.py +34 -3
- oci/queue/models/queue_summary.py +37 -17
- oci/queue/models/stats.py +2 -2
- oci/queue/models/update_messages_details.py +1 -1
- oci/queue/models/update_messages_details_entry.py +2 -2
- oci/queue/models/update_messages_result.py +2 -2
- oci/queue/models/update_messages_result_entry.py +12 -4
- oci/queue/models/update_queue_details.py +47 -8
- oci/queue/models/updated_message.py +12 -4
- oci/queue/models/work_request.py +6 -2
- oci/queue/models/work_request_error.py +6 -2
- oci/queue/models/work_request_log_entry.py +6 -2
- oci/queue/models/work_request_summary.py +8 -4
- oci/queue/queue_admin_client.py +67 -46
- oci/queue/queue_admin_client_composite_operations.py +4 -4
- oci/queue/queue_client.py +209 -36
- oci/recovery/database_recovery_client.py +23 -23
- oci/resource_manager/resource_manager_client.py +52 -52
- oci/resource_search/resource_search_client.py +3 -3
- oci/rover/rover_bundle_client.py +8 -8
- oci/rover/rover_cluster_client.py +8 -8
- oci/rover/rover_entitlement_client.py +6 -6
- oci/rover/rover_node_client.py +15 -15
- oci/rover/shape_client.py +1 -1
- oci/rover/work_requests_client.py +5 -5
- oci/sch/service_connector_client.py +12 -12
- oci/secrets/secrets_client.py +3 -3
- oci/service_catalog/service_catalog_client.py +26 -26
- oci/service_manager_proxy/service_manager_proxy_client.py +2 -2
- oci/service_mesh/service_mesh_client.py +48 -48
- oci/stack_monitoring/stack_monitoring_client.py +22 -22
- oci/streaming/stream_admin_client.py +18 -18
- oci/streaming/stream_client.py +8 -8
- oci/tenant_manager_control_plane/domain_client.py +5 -5
- oci/tenant_manager_control_plane/domain_governance_client.py +5 -5
- oci/tenant_manager_control_plane/governance_client.py +2 -2
- oci/tenant_manager_control_plane/link_client.py +3 -3
- oci/tenant_manager_control_plane/orders_client.py +2 -2
- oci/tenant_manager_control_plane/organization_client.py +10 -10
- oci/tenant_manager_control_plane/recipient_invitation_client.py +5 -5
- oci/tenant_manager_control_plane/sender_invitation_client.py +5 -5
- oci/tenant_manager_control_plane/subscription_client.py +11 -11
- oci/tenant_manager_control_plane/work_request_client.py +4 -4
- oci/threat_intelligence/threatintel_client.py +5 -5
- oci/usage/resources_client.py +2 -2
- oci/usage/rewards_client.py +6 -6
- oci/usage/usagelimits_client.py +1 -1
- oci/usage_api/usageapi_client.py +19 -19
- oci/vault/vaults_client.py +11 -11
- oci/vbs_inst/vbs_instance_client.py +10 -10
- oci/version.py +1 -1
- oci/visual_builder/vb_instance_client.py +13 -13
- oci/vn_monitoring/models/__init__.py +4 -0
- oci/vn_monitoring/models/cpe.py +33 -2
- oci/vn_monitoring/models/create_cpe_details.py +33 -2
- oci/vn_monitoring/models/create_ip_sec_connection_details.py +35 -2
- oci/vn_monitoring/models/create_ip_sec_connection_tunnel_details.py +105 -0
- oci/vn_monitoring/models/create_virtual_circuit_details.py +31 -0
- oci/vn_monitoring/models/drg_attachment_network_create_details.py +1 -1
- oci/vn_monitoring/models/drg_attachment_network_details.py +5 -1
- oci/vn_monitoring/models/ip_sec_connection.py +50 -2
- oci/vn_monitoring/models/ip_sec_connection_tunnel.py +37 -2
- oci/vn_monitoring/models/ipsec_tunnel_drg_attachment_network_details.py +37 -2
- oci/vn_monitoring/models/loop_back_drg_attachment_network_details.py +93 -0
- oci/vn_monitoring/models/update_virtual_circuit_details.py +31 -0
- oci/vn_monitoring/models/virtual_circuit.py +31 -0
- oci/vn_monitoring/models/virtual_circuit_associated_tunnel_details.py +155 -0
- oci/vn_monitoring/models/virtual_circuit_drg_attachment_network_details.py +37 -2
- oci/vn_monitoring/vn_monitoring_client.py +12 -12
- oci/vulnerability_scanning/vulnerability_scanning_client.py +58 -58
- oci/waa/waa_client.py +13 -13
- oci/waa/work_request_client.py +4 -4
- oci/waas/redirect_client.py +6 -6
- oci/waas/waas_client.py +66 -66
- oci/waf/waf_client.py +24 -24
- oci/work_requests/work_request_client.py +4 -4
- {oci-2.110.2.dist-info → oci-2.112.0.dist-info}/METADATA +1 -1
- {oci-2.110.2.dist-info → oci-2.112.0.dist-info}/RECORD +475 -434
- {oci-2.110.2.dist-info → oci-2.112.0.dist-info}/LICENSE.txt +0 -0
- {oci-2.110.2.dist-info → oci-2.112.0.dist-info}/THIRD_PARTY_LICENSES.txt +0 -0
- {oci-2.110.2.dist-info → oci-2.112.0.dist-info}/WHEEL +0 -0
- {oci-2.110.2.dist-info → oci-2.112.0.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,200 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
# Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
|
3
|
+
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
4
|
+
|
5
|
+
import json
|
6
|
+
import threading
|
7
|
+
|
8
|
+
from cryptography.hazmat.primitives.serialization import Encoding, PublicFormat
|
9
|
+
|
10
|
+
import oci
|
11
|
+
import oci.signer
|
12
|
+
|
13
|
+
from .security_token_signer import SecurityTokenSigner, SECURITY_TOKEN_FORMAT_STRING
|
14
|
+
from .. import auth_utils
|
15
|
+
from ..security_token_container import SecurityTokenContainer
|
16
|
+
|
17
|
+
OPTIONAL_NESTED_PARENT_HEADER = "opc-parent-rpt-url"
|
18
|
+
|
19
|
+
|
20
|
+
class NestedResourcePrincipals(SecurityTokenSigner):
|
21
|
+
|
22
|
+
def __init__(self, resource_principal_rpt_url=None, resource_principal_session_token_endpoint=None,
|
23
|
+
sub_resource_rp_signer=None, retry_strategy=None, log_requests=None, generic_headers=None,
|
24
|
+
current_parent_depth=0, **kwargs):
|
25
|
+
|
26
|
+
if not sub_resource_rp_signer:
|
27
|
+
raise ValueError("Could not initiate sub-resource principals signers please check your environment!")
|
28
|
+
else:
|
29
|
+
self.sub_resource_rp_signer = sub_resource_rp_signer
|
30
|
+
|
31
|
+
# set region from sub_resource_rp_signer
|
32
|
+
if hasattr(sub_resource_rp_signer, 'region'):
|
33
|
+
self.region = sub_resource_rp_signer.region
|
34
|
+
|
35
|
+
if resource_principal_session_token_endpoint:
|
36
|
+
self.resource_principal_session_token_endpoint = resource_principal_session_token_endpoint
|
37
|
+
else:
|
38
|
+
raise ValueError("resource_principal_session_token_endpoint must be provided")
|
39
|
+
|
40
|
+
if resource_principal_rpt_url is None:
|
41
|
+
raise ValueError("resource_principal_rpt_url should be present!")
|
42
|
+
|
43
|
+
self.resource_principal_token_endpoint = resource_principal_rpt_url
|
44
|
+
self.resource_principal_token_path = ""
|
45
|
+
self.current_parent_depth = current_parent_depth
|
46
|
+
|
47
|
+
self._reset_signers_lock = threading.Lock()
|
48
|
+
|
49
|
+
if retry_strategy:
|
50
|
+
self.retry_strategy = retry_strategy
|
51
|
+
else:
|
52
|
+
self.retry_strategy = oci.retry.DEFAULT_RETRY_STRATEGY
|
53
|
+
|
54
|
+
# Holders for the tokens needed.
|
55
|
+
self.rpt = None
|
56
|
+
self.spst = None
|
57
|
+
|
58
|
+
# Set up base_client for calls to Service to get Resource Principal Token and Service Principal Session Token
|
59
|
+
# The config is not needed but request logging could be enabled.
|
60
|
+
config = {}
|
61
|
+
if log_requests:
|
62
|
+
config["log_requests"] = log_requests
|
63
|
+
|
64
|
+
self.base_client = oci.BaseClient("", # No service
|
65
|
+
config,
|
66
|
+
sub_resource_rp_signer, # Signer composed for sub-resource
|
67
|
+
{}, # No type mapping
|
68
|
+
region_client=False,
|
69
|
+
service_endpoint=self.resource_principal_token_endpoint)
|
70
|
+
|
71
|
+
# Set Key Supplier
|
72
|
+
self.session_key_supplier = self.sub_resource_rp_signer.session_key_supplier
|
73
|
+
|
74
|
+
# Get the Resource Principal Session Token and use it to set up the signer
|
75
|
+
self.rpst = self.get_security_token()
|
76
|
+
|
77
|
+
if generic_headers:
|
78
|
+
super(NestedResourcePrincipals, self).__init__(self.security_token.security_token,
|
79
|
+
self.session_key_supplier.get_key_pair()['private'],
|
80
|
+
generic_headers=generic_headers)
|
81
|
+
else:
|
82
|
+
super(NestedResourcePrincipals, self).__init__(self.security_token.security_token,
|
83
|
+
self.session_key_supplier.get_key_pair()['private'])
|
84
|
+
|
85
|
+
def get_security_token(self):
|
86
|
+
"""
|
87
|
+
Returns the security token. If it is expired, refresh the token.
|
88
|
+
"""
|
89
|
+
if hasattr(self, 'security_token'):
|
90
|
+
if self.security_token.valid_with_jitter():
|
91
|
+
return self.security_token.security_token
|
92
|
+
|
93
|
+
return self._refresh_security_token_inner()
|
94
|
+
|
95
|
+
def refresh_security_token(self):
|
96
|
+
"""
|
97
|
+
Refresh the security token
|
98
|
+
"""
|
99
|
+
return self._refresh_security_token_inner()
|
100
|
+
|
101
|
+
def _refresh_security_token_inner(self):
|
102
|
+
self._reset_signers_lock.acquire()
|
103
|
+
try:
|
104
|
+
self.sub_resource_rp_signer.refresh_security_token()
|
105
|
+
|
106
|
+
# Get RPT blob, Service Principal Session Token from service, Steps A.1 and B.1
|
107
|
+
self.rpt, self.spst = self._get_resource_principal_token_and_service_principal_session_token()
|
108
|
+
|
109
|
+
# Get RPST token from identity, steps A.2 and B.2
|
110
|
+
self.security_token = SecurityTokenContainer(self.session_key_supplier,
|
111
|
+
self._get_resource_principal_session_token())
|
112
|
+
self._reset_signers()
|
113
|
+
|
114
|
+
return self.security_token.security_token
|
115
|
+
finally:
|
116
|
+
self._reset_signers_lock.release()
|
117
|
+
|
118
|
+
def _reset_signers(self):
|
119
|
+
self.api_key = SECURITY_TOKEN_FORMAT_STRING.format(self.security_token.security_token)
|
120
|
+
self.private_key = self.session_key_supplier.get_key_pair()['private']
|
121
|
+
|
122
|
+
if hasattr(self, '_basic_signer'):
|
123
|
+
self._basic_signer.reset_signer(self.api_key, self.private_key)
|
124
|
+
if hasattr(self, '_body_signer'):
|
125
|
+
self._body_signer.reset_signer(self.api_key, self.private_key)
|
126
|
+
|
127
|
+
def _get_resource_principal_token_and_service_principal_session_token(self):
|
128
|
+
"""
|
129
|
+
Get the Resource Principal Token and the Service Principal Session Token
|
130
|
+
|
131
|
+
This makes a call to the resource_principal_token_endpoint which is
|
132
|
+
defined by the service.
|
133
|
+
"""
|
134
|
+
method = "get"
|
135
|
+
self.base_client.endpoint = self.resource_principal_token_endpoint
|
136
|
+
|
137
|
+
response = self.make_call(method, self.resource_principal_token_path)
|
138
|
+
if response.headers and OPTIONAL_NESTED_PARENT_HEADER in response.headers:
|
139
|
+
self.nested_parent_rpt_url = response.headers.get(OPTIONAL_NESTED_PARENT_HEADER)
|
140
|
+
else:
|
141
|
+
# setting this as None to mark missing header for terminal parent.
|
142
|
+
self.nested_parent_rpt_url = None
|
143
|
+
|
144
|
+
parsed_response = json.loads(response.data.decode('UTF-8'))
|
145
|
+
return parsed_response['resourcePrincipalToken'], parsed_response['servicePrincipalSessionToken']
|
146
|
+
|
147
|
+
def _get_resource_principal_session_token(self):
|
148
|
+
"""
|
149
|
+
Get the Resource Principal Session Token
|
150
|
+
"""
|
151
|
+
method = "post"
|
152
|
+
resource_path = "/v1/resourcePrincipalSessionToken"
|
153
|
+
|
154
|
+
self.base_client.endpoint = self.resource_principal_session_token_endpoint
|
155
|
+
|
156
|
+
public_key = self.session_key_supplier.get_key_pair()['public']
|
157
|
+
sanitized_public_key = auth_utils.sanitize_certificate_string(
|
158
|
+
public_key.public_bytes(Encoding.PEM, PublicFormat.SubjectPublicKeyInfo))
|
159
|
+
|
160
|
+
request_payload = {
|
161
|
+
'resourcePrincipalToken': self.rpt,
|
162
|
+
'servicePrincipalSessionToken': self.spst,
|
163
|
+
'sessionPublicKey': sanitized_public_key
|
164
|
+
}
|
165
|
+
|
166
|
+
# The base client will convert the payload to JSON, but won't update the content length, so we need to
|
167
|
+
# it here.
|
168
|
+
json_request_payload = json.dumps(request_payload)
|
169
|
+
header_params = {'content-type': 'application/json',
|
170
|
+
'Content-Length': str(len(json_request_payload))}
|
171
|
+
response = self.make_call(method, resource_path, header_params=header_params, body=request_payload)
|
172
|
+
parsed_response = json.loads(response.data.decode('UTF-8'))
|
173
|
+
|
174
|
+
return parsed_response['token']
|
175
|
+
|
176
|
+
def make_call(self, method, resource_path, path_params=None, header_params=None, body=None):
|
177
|
+
"""
|
178
|
+
make_call
|
179
|
+
|
180
|
+
Normally this would be part of the generated client. In this case the endpoint for the
|
181
|
+
Resource Principal Token is not part of the generated client, so we need the same
|
182
|
+
behavior here.
|
183
|
+
"""
|
184
|
+
if self.retry_strategy:
|
185
|
+
return self.retry_strategy.make_retrying_call(
|
186
|
+
self.base_client.call_api,
|
187
|
+
resource_path=resource_path,
|
188
|
+
method=method,
|
189
|
+
path_params=path_params,
|
190
|
+
header_params=header_params,
|
191
|
+
body=body,
|
192
|
+
response_type=oci.base_client.BYTES_RESPONSE_TYPE)
|
193
|
+
else:
|
194
|
+
return self.base_client.call_api(
|
195
|
+
resource_path=resource_path,
|
196
|
+
method=method,
|
197
|
+
path_params=path_params,
|
198
|
+
header_params=header_params,
|
199
|
+
body=body,
|
200
|
+
response_type=oci.base_client.BYTES_RESPONSE_TYPE)
|
@@ -0,0 +1,154 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
# Copyright (c) 2016, 2023, Oracle and/or its affiliates. All rights reserved.
|
3
|
+
# This software is dual-licensed to you under the Universal Permissive License (UPL) 1.0 as shown at https://oss.oracle.com/licenses/upl or Apache License 2.0 as shown at http://www.apache.org/licenses/LICENSE-2.0. You may choose either license.
|
4
|
+
|
5
|
+
import threading
|
6
|
+
import logging
|
7
|
+
import pprint
|
8
|
+
from cryptography.hazmat.primitives.serialization import Encoding, PublicFormat
|
9
|
+
|
10
|
+
import base64
|
11
|
+
import json
|
12
|
+
import oci
|
13
|
+
from oci._vendor import requests
|
14
|
+
from .. import auth_utils
|
15
|
+
from ..certificate_retriever import FileBasedCertificateRetriever
|
16
|
+
from ..session_key_supplier import SessionKeySupplier
|
17
|
+
from ..security_token_container import SecurityTokenContainer
|
18
|
+
from .security_token_signer import SecurityTokenSigner, SECURITY_TOKEN_FORMAT_STRING
|
19
|
+
|
20
|
+
|
21
|
+
class OkeWorkloadIdentityResourcePrincipalSigner(SecurityTokenSigner):
|
22
|
+
|
23
|
+
def __init__(self, sa_token_provider, sa_cert_path, service_host, service_port, region=None, **kwargs):
|
24
|
+
self.sa_token_provider = sa_token_provider
|
25
|
+
self.sa_cert_path = sa_cert_path
|
26
|
+
self.service_host = service_host
|
27
|
+
if self.service_host is None:
|
28
|
+
raise ValueError("Kubernetes service host was not provided.")
|
29
|
+
self.service_port = service_port
|
30
|
+
self.region = self._initialize_and_return_region(region)
|
31
|
+
self._reset_signers_lock = threading.Lock()
|
32
|
+
|
33
|
+
self.logger = logging.getLogger("{}.{}".format(__name__, id(self)))
|
34
|
+
self.logger.addHandler(logging.NullHandler())
|
35
|
+
if kwargs.get('log_requests'):
|
36
|
+
self.logger.disabled = False
|
37
|
+
self.logger.setLevel(logging.DEBUG)
|
38
|
+
else:
|
39
|
+
self.logger.disabled = True
|
40
|
+
self.requests_session = requests.Session()
|
41
|
+
|
42
|
+
retry_strategy = kwargs.get('retry_strategy', None)
|
43
|
+
if retry_strategy:
|
44
|
+
self.retry_strategy = retry_strategy
|
45
|
+
else:
|
46
|
+
self.retry_strategy = oci.retry.DEFAULT_RETRY_STRATEGY
|
47
|
+
|
48
|
+
self.proxymux_endpoint = "https://{}:{}/resourcePrincipalSessionTokens".format(self.service_host, self.service_port)
|
49
|
+
self.logger.debug("Proxymux endpoint is set to : {} ".format(self.proxymux_endpoint))
|
50
|
+
cert_retriever_kwargs = {"certificate_file_path": self.sa_cert_path}
|
51
|
+
self.logger.debug("Certificate file path is set to : {} ".format(self.sa_cert_path))
|
52
|
+
self.cert_retriever = FileBasedCertificateRetriever(**cert_retriever_kwargs)
|
53
|
+
|
54
|
+
self.session_key_supplier = SessionKeySupplier()
|
55
|
+
self.rpst = self.get_security_token()
|
56
|
+
|
57
|
+
if 'generic_headers' in kwargs:
|
58
|
+
generic_headers = kwargs['generic_headers']
|
59
|
+
super(OkeWorkloadIdentityResourcePrincipalSigner, self).__init__(self.security_token.security_token,
|
60
|
+
self.session_key_supplier.get_key_pair()['private'],
|
61
|
+
generic_headers=generic_headers)
|
62
|
+
else:
|
63
|
+
super(OkeWorkloadIdentityResourcePrincipalSigner, self).__init__(self.security_token.security_token,
|
64
|
+
self.session_key_supplier.get_key_pair()['private'])
|
65
|
+
|
66
|
+
def _initialize_and_return_region(self, region_raw=None):
|
67
|
+
if hasattr(self, 'region'):
|
68
|
+
return self.region
|
69
|
+
|
70
|
+
if region_raw is None:
|
71
|
+
return None
|
72
|
+
|
73
|
+
# The region should be something like "us-phoenix-1" but if we get "phx" then convert it.
|
74
|
+
if region_raw in oci.regions.REGIONS_SHORT_NAMES:
|
75
|
+
self.region = oci.regions.REGIONS_SHORT_NAMES[region_raw]
|
76
|
+
else:
|
77
|
+
self.region = region_raw
|
78
|
+
|
79
|
+
return self.region
|
80
|
+
|
81
|
+
def get_security_token(self):
|
82
|
+
"""
|
83
|
+
Returns the security token. If it is expired, refresh the token.
|
84
|
+
"""
|
85
|
+
if hasattr(self, 'security_token'):
|
86
|
+
if self.security_token.valid_with_half_expiration_time():
|
87
|
+
return self.security_token.security_token
|
88
|
+
|
89
|
+
return self._refresh_security_token_inner()
|
90
|
+
|
91
|
+
def refresh_security_token(self):
|
92
|
+
"""
|
93
|
+
Refresh the security token
|
94
|
+
"""
|
95
|
+
return self._refresh_security_token_inner()
|
96
|
+
|
97
|
+
def _refresh_security_token_inner(self):
|
98
|
+
self._reset_signers_lock.acquire()
|
99
|
+
try:
|
100
|
+
self.session_key_supplier.refresh()
|
101
|
+
self.cert_retriever.refresh()
|
102
|
+
self.retry_strategy.make_retrying_call(self._get_resource_principal_session_token)
|
103
|
+
self._reset_signers()
|
104
|
+
return self.security_token.security_token
|
105
|
+
finally:
|
106
|
+
self._reset_signers_lock.release()
|
107
|
+
|
108
|
+
def _reset_signers(self):
|
109
|
+
self.api_key = SECURITY_TOKEN_FORMAT_STRING.format(self.security_token.security_token)
|
110
|
+
self.private_key = self.session_key_supplier.get_key_pair()['private']
|
111
|
+
|
112
|
+
if hasattr(self, '_basic_signer'):
|
113
|
+
self._basic_signer.reset_signer(self.api_key, self.private_key)
|
114
|
+
if hasattr(self, '_body_signer'):
|
115
|
+
self._body_signer.reset_signer(self.api_key, self.private_key)
|
116
|
+
|
117
|
+
def _get_resource_principal_session_token(self):
|
118
|
+
request_payload = {
|
119
|
+
"podKey": auth_utils.sanitize_certificate_string(self.session_key_supplier.get_key_pair()['public'].public_bytes(Encoding.PEM, PublicFormat.SubjectPublicKeyInfo))
|
120
|
+
}
|
121
|
+
|
122
|
+
opc_request_id = auth_utils.generate_opc_request_id()
|
123
|
+
sa_token = self.sa_token_provider.get_sa_token()
|
124
|
+
headers = {
|
125
|
+
"Authorization": "Bearer " + sa_token,
|
126
|
+
"Content-type": "application/json",
|
127
|
+
"opc-request-id": opc_request_id
|
128
|
+
}
|
129
|
+
|
130
|
+
self.logger.debug("Requesting token from : {} ".format(self.proxymux_endpoint))
|
131
|
+
response = self.requests_session.post(self.proxymux_endpoint, json=request_payload, headers=headers, verify=self.sa_cert_path, timeout=(10, 60))
|
132
|
+
self.logger.debug("Receiving token response......\n{}\n".format(pprint.pformat(
|
133
|
+
{"status_code": response.status_code, "url": response.url, "header": dict(response.headers.items()),
|
134
|
+
"reason": response.reason}, indent=2)))
|
135
|
+
|
136
|
+
if not response.ok:
|
137
|
+
raise oci.exceptions.ServiceError(
|
138
|
+
response.status_code,
|
139
|
+
response.reason,
|
140
|
+
response.headers,
|
141
|
+
"Failed to get RPST token from proxymux")
|
142
|
+
|
143
|
+
try:
|
144
|
+
decoded_response = base64.b64decode(response.content).decode("UTF-8")
|
145
|
+
except ValueError:
|
146
|
+
error_text = "Unable to decode the response from auth service ({}): {}. Please contact OKE team for help.".format(self.proxymux_endpoint, response.text)
|
147
|
+
raise RuntimeError(error_text)
|
148
|
+
|
149
|
+
if 'token' in decoded_response:
|
150
|
+
response_json = json.loads(decoded_response)
|
151
|
+
self.security_token = SecurityTokenContainer(self.session_key_supplier, response_json['token'][3:])
|
152
|
+
else:
|
153
|
+
error_text = "Could not find token in the decoded response from auth service ({}): {}.".format(self.proxymux_endpoint, decoded_response)
|
154
|
+
raise RuntimeError(error_text)
|
@@ -29,7 +29,7 @@ class ResourcePrincipalsFederationSigner(SecurityTokenSigner):
|
|
29
29
|
path for resource principal token. If not set, use
|
30
30
|
DefaultRptPathProvider to determine the path
|
31
31
|
"""
|
32
|
-
self.resource_principal_token_path_provider = resource_principal_token_path_provider or DefaultRptPathProvider()
|
32
|
+
self.resource_principal_token_path_provider = resource_principal_token_path_provider or DefaultRptPathProvider(**kwargs)
|
33
33
|
self.resource_principal_token_path = self.resource_principal_token_path_provider.get_path()
|
34
34
|
|
35
35
|
self._reset_signers_lock = threading.Lock()
|
@@ -8,6 +8,9 @@ from .resource_principals_delegation_token_signer import ResourcePrincipalsDeleg
|
|
8
8
|
from .ephemeral_resource_principals_signer import EphemeralResourcePrincipalSigner
|
9
9
|
from .ephemeral_resource_principals_delegation_token_signer import EphemeralResourcePrincipalsDelegationTokenSigner
|
10
10
|
from .ephemeral_resource_principals_v21_signer import EphemeralResourcePrincipalV21Signer
|
11
|
+
from .oke_workload_identity_resource_principal_signer import OkeWorkloadIdentityResourcePrincipalSigner
|
12
|
+
from ..rpt_path_providers import DefaultServiceAccountTokenProvider, SuppliedServiceAccountTokenProvider
|
13
|
+
from .nested_resource_principals_signer import NestedResourcePrincipals
|
11
14
|
|
12
15
|
OCI_RESOURCE_PRINCIPAL_VERSION = "OCI_RESOURCE_PRINCIPAL_VERSION"
|
13
16
|
OCI_RESOURCE_PRINCIPAL_RPST = "OCI_RESOURCE_PRINCIPAL_RPST"
|
@@ -19,6 +22,33 @@ OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT = "OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT"
|
|
19
22
|
OCI_RESOURCE_PRINCIPAL_RESOURCE_ID = "OCI_RESOURCE_PRINCIPAL_RESOURCE_ID"
|
20
23
|
OCI_RESOURCE_PRINCIPAL_TENANCY_ID = "OCI_RESOURCE_PRINCIPAL_TENANCY_ID"
|
21
24
|
|
25
|
+
# Resource Principal v3.0
|
26
|
+
OCI_RESOURCE_PRINCIPAL_VERSION_FOR_LEAF_RESOURCE = "OCI_RESOURCE_PRINCIPAL_VERSION_FOR_LEAF_RESOURCE"
|
27
|
+
# For 1.1 LEAF-resource
|
28
|
+
OCI_RESOURCE_PRINCIPAL_RPT_ENDPOINT_FOR_LEAF_RESOURCE = "OCI_RESOURCE_PRINCIPAL_RPT_ENDPOINT_FOR_LEAF_RESOURCE"
|
29
|
+
OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT_FOR_LEAF_RESOURCE = "OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT_FOR_LEAF_RESOURCE"
|
30
|
+
# For 2.2 LEAF-resource
|
31
|
+
OCI_RESOURCE_PRINCIPAL_RPST_FOR_LEAF_RESOURCE = "OCI_RESOURCE_PRINCIPAL_RPST_FOR_LEAF_RESOURCE"
|
32
|
+
OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_FOR_LEAF_RESOURCE = "OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_FOR_LEAF_RESOURCE"
|
33
|
+
OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_PASSPHRASE_FOR_LEAF_RESOURCE = "OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_PASSPHRASE_FOR_LEAF_RESOURCE"
|
34
|
+
OCI_RESOURCE_PRINCIPAL_REGION_FOR_LEAF_RESOURCE = "OCI_RESOURCE_PRINCIPAL_REGION_FOR_LEAF_RESOURCE"
|
35
|
+
# For 2.1/2.1.1 LEAF-resource
|
36
|
+
OCI_RESOURCE_PRINCIPAL_RESOURCE_ID_FOR_LEAF_RESOURCE = "OCI_RESOURCE_PRINCIPAL_RESOURCE_ID_FOR_LEAF_RESOURCE"
|
37
|
+
OCI_RESOURCE_PRINCIPAL_TENANCY_ID_FOR_LEAF_RESOURCE = "OCI_RESOURCE_PRINCIPAL_TENANCY_ID_FOR_LEAF_RESOURCE"
|
38
|
+
# For Parent Resource
|
39
|
+
OCI_RESOURCE_PRINCIPAL_RPT_URL_FOR_PARENT_RESOURCE = "OCI_RESOURCE_PRINCIPAL_RPT_URL_FOR_PARENT_RESOURCE"
|
40
|
+
OCI_RESOURCE_PRINCIPAL_RPT_ENDPOINT_FOR_PARENT_RESOURCE = "OCI_RESOURCE_PRINCIPAL_RPT_ENDPOINT_FOR_PARENT_RESOURCE"
|
41
|
+
OCI_RESOURCE_PRINCIPAL_RPT_PATH_FOR_PARENT_RESOURCE = "OCI_RESOURCE_PRINCIPAL_RPT_PATH_FOR_PARENT_RESOURCE"
|
42
|
+
OCI_RESOURCE_PRINCIPAL_RPT_ID_FOR_PARENT_RESOURCE = "OCI_RESOURCE_PRINCIPAL_RPT_ID_FOR_PARENT_RESOURCE"
|
43
|
+
OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT_FOR_PARENT_RESOURCE = "OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT_FOR_PARENT_RESOURCE"
|
44
|
+
MAX_NESTED_PARENT_DEPTH = 10
|
45
|
+
|
46
|
+
OCI_KUBERNETES_SERVICE_ACCOUNT_TOKEN_PATH = "/var/run/secrets/kubernetes.io/serviceaccount/token"
|
47
|
+
DEFAULT_OCI_KUBERNETES_SERVICE_ACCOUNT_CERT_PATH = "/var/run/secrets/kubernetes.io/serviceaccount/ca.crt"
|
48
|
+
OCI_KUBERNETES_SERVICE_ACCOUNT_CERT_PATH = "OCI_KUBERNETES_SERVICE_ACCOUNT_CERT_PATH"
|
49
|
+
OCI_KUBERNETES_PROXYMUX_SERVICE_PORT = "12250"
|
50
|
+
KUBERNETES_SERVICE_HOST = "KUBERNETES_SERVICE_HOST"
|
51
|
+
|
22
52
|
|
23
53
|
def get_resource_principals_signer(resource_principal_token_path_provider=None):
|
24
54
|
"""
|
@@ -30,6 +60,95 @@ def get_resource_principals_signer(resource_principal_token_path_provider=None):
|
|
30
60
|
"""
|
31
61
|
|
32
62
|
rp_version = os.environ.get(OCI_RESOURCE_PRINCIPAL_VERSION, "UNDEFINED")
|
63
|
+
if rp_version == "3.0":
|
64
|
+
"""
|
65
|
+
This signer utilizes a resource principals signer for the LEAF-resource, via the following environment variable:-
|
66
|
+
- OCI_RESOURCE_PRINCIPAL_VERSION_FOR_LEAF_RESOURCE
|
67
|
+
Based on the value of this variable we need different environment variable set.
|
68
|
+
|
69
|
+
For 1.1 it needs:
|
70
|
+
- OCI_RESOURCE_PRINCIPAL_RPT_ENDPOINT_FOR_LEAF_RESOURCE The endpoint for retrieving the Resource Principal Token for LEAF-resource
|
71
|
+
- OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT_FOR_LEAF_RESOURCE The endpoint for retrieving the Resource Principal Session Token for LEAF-resource
|
72
|
+
|
73
|
+
For 2.1/2.1.1 it needs:
|
74
|
+
- OCI_RESOURCE_PRINCIPAL_RPT_ENDPOINT_FOR_LEAF_RESOURCE: The endpoint for retrieving the Resource Principal Token
|
75
|
+
- OCI_RESOURCE_PRINCIPAL_RESOURCE_ID_FOR_LEAF_RESOURCE: The RPv2.1/Rpv2.1.1 resource id
|
76
|
+
- OCI_RESOURCE_PRINCIPAL_TENANCY_ID_FOR_LEAF_RESOURCE: The RPv2.1.1 tenancy id
|
77
|
+
- OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_FOR_LEAF_RESOURCE: The private key in PEM format
|
78
|
+
- OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_PASSPHRASE_FOR_LEAF_RESOURCE: The (optional) passphrase for the private key
|
79
|
+
- OCI_RESOURCE_PRINCIPAL_REGION_FOR_LEAF_RESOURCE: the canonical region name
|
80
|
+
|
81
|
+
For 2.2 it needs:
|
82
|
+
- OCI_RESOURCE_PRINCIPAL_RPST_FOR_LEAF_RESOURCE: the Resource Principals Session Token
|
83
|
+
- OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_FOR_LEAF_RESOURCE: the private key in PEM format
|
84
|
+
- OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_PASSPHRASE_FOR_LEAF_RESOURCE: the (optional) passphrase for the private key
|
85
|
+
- OCI_RESOURCE_PRINCIPAL_REGION_FOR_LEAF_RESOURCE: the canonical region name
|
86
|
+
|
87
|
+
For the Parent resource the following environment variables need to be set:-
|
88
|
+
- OCI_RESOURCE_PRINCIPAL_RPT_URL_FOR_PARENT_RESOURCE: The complete URL including API and resource if any to retrieve Resource Principal Token for the parent resource.
|
89
|
+
- OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT_FOR_PARENT_RESOURCE: The endpoint for retrieving the Resource Principal Session Token for parent resource
|
90
|
+
"""
|
91
|
+
# Step 1: Get the Resource Principals signer for the sub resource.
|
92
|
+
resource_principal_version_for_leaf_resource = os.environ.get(OCI_RESOURCE_PRINCIPAL_VERSION_FOR_LEAF_RESOURCE)
|
93
|
+
if resource_principal_version_for_leaf_resource == "2.2":
|
94
|
+
resource_session_token_for_leaf_resource = os.environ.get(OCI_RESOURCE_PRINCIPAL_RPST_FOR_LEAF_RESOURCE)
|
95
|
+
private_key_for_leaf_resource = os.environ.get(OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_FOR_LEAF_RESOURCE)
|
96
|
+
private_key_passphrase_for_leaf_resource = os.environ.get(OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_PASSPHRASE_FOR_LEAF_RESOURCE)
|
97
|
+
region_for_leaf_resource = os.environ.get(OCI_RESOURCE_PRINCIPAL_REGION_FOR_LEAF_RESOURCE)
|
98
|
+
|
99
|
+
leaf_resource_rp_signer = EphemeralResourcePrincipalSigner(session_token=resource_session_token_for_leaf_resource,
|
100
|
+
private_key=private_key_for_leaf_resource,
|
101
|
+
private_key_passphrase=private_key_passphrase_for_leaf_resource,
|
102
|
+
region=region_for_leaf_resource)
|
103
|
+
elif resource_principal_version_for_leaf_resource in ["2.1", "2.1.1"]:
|
104
|
+
resource_principal_token_endpoint_for_leaf_resource = os.environ.get(OCI_RESOURCE_PRINCIPAL_RPT_ENDPOINT_FOR_LEAF_RESOURCE)
|
105
|
+
resource_principal_session_token_endpoint_for_leaf_resource = os.environ.get(OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT_FOR_LEAF_RESOURCE)
|
106
|
+
resource_id_for_leaf_resource = os.environ.get(OCI_RESOURCE_PRINCIPAL_RESOURCE_ID_FOR_LEAF_RESOURCE)
|
107
|
+
tenancy_id_for_leaf_resource = os.environ.get(OCI_RESOURCE_PRINCIPAL_TENANCY_ID_FOR_LEAF_RESOURCE)
|
108
|
+
private_key_for_leaf_resource = os.environ.get(OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_FOR_LEAF_RESOURCE)
|
109
|
+
private_key_passphrase_for_leaf_resource = os.environ.get(OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_PASSPHRASE_FOR_LEAF_RESOURCE)
|
110
|
+
region_for_leaf_resource = os.environ.get(OCI_RESOURCE_PRINCIPAL_REGION_FOR_LEAF_RESOURCE)
|
111
|
+
|
112
|
+
leaf_resource_rp_signer = EphemeralResourcePrincipalV21Signer(resource_principal_token_endpoint=resource_principal_token_endpoint_for_leaf_resource,
|
113
|
+
resource_principal_session_token_endpoint=resource_principal_session_token_endpoint_for_leaf_resource,
|
114
|
+
resource_id=resource_id_for_leaf_resource,
|
115
|
+
tenancy_id=tenancy_id_for_leaf_resource,
|
116
|
+
private_key=private_key_for_leaf_resource,
|
117
|
+
private_key_passphrase=private_key_passphrase_for_leaf_resource,
|
118
|
+
rp_version=rp_version,
|
119
|
+
region=region_for_leaf_resource)
|
120
|
+
elif resource_principal_version_for_leaf_resource == "1.1":
|
121
|
+
resource_principal_token_endpoint_for_leaf_resource = os.environ.get(OCI_RESOURCE_PRINCIPAL_RPT_ENDPOINT_FOR_LEAF_RESOURCE)
|
122
|
+
resource_principal_session_token_endpoint_for_leaf_resource = os.environ.get(OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT_FOR_LEAF_RESOURCE)
|
123
|
+
leaf_resource_rp_signer = ResourcePrincipalsFederationSigner(resource_principal_token_endpoint=resource_principal_token_endpoint_for_leaf_resource,
|
124
|
+
resource_principal_session_token_endpoint=resource_principal_session_token_endpoint_for_leaf_resource,
|
125
|
+
resource_principal_token_path_provider=resource_principal_token_path_provider,
|
126
|
+
child_resource=True)
|
127
|
+
else:
|
128
|
+
raise EnvironmentError("Unsupported {}: {}".format(OCI_RESOURCE_PRINCIPAL_VERSION_FOR_LEAF_RESOURCE, resource_principal_version_for_leaf_resource))
|
129
|
+
|
130
|
+
# Get values for First Parent Resource
|
131
|
+
resource_principal_rpt_url = os.environ.get(OCI_RESOURCE_PRINCIPAL_RPT_URL_FOR_PARENT_RESOURCE)
|
132
|
+
resource_principal_session_token_endpoint = os.environ.get(OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT_FOR_PARENT_RESOURCE)
|
133
|
+
nested_resource_principal = NestedResourcePrincipals(resource_principal_rpt_url=resource_principal_rpt_url,
|
134
|
+
resource_principal_session_token_endpoint=resource_principal_session_token_endpoint,
|
135
|
+
sub_resource_rp_signer=leaf_resource_rp_signer)
|
136
|
+
|
137
|
+
# Terminal case when we reach terminal parent.
|
138
|
+
if nested_resource_principal.nested_parent_rpt_url is None:
|
139
|
+
return nested_resource_principal
|
140
|
+
# If the recursion level for N level parent reaches MAX_NESTED_PARENT_DEPTH or the response HEADER contains
|
141
|
+
# the same endpoint as the one it already has we will treat it as the terminal condition for recursion end
|
142
|
+
elif nested_resource_principal.current_parent_depth >= MAX_NESTED_PARENT_DEPTH \
|
143
|
+
or nested_resource_principal.nested_parent_rpt_url == nested_resource_principal.resource_principal_token_endpoint:
|
144
|
+
raise AttributeError("The nested resource principals went over the max allowed recursion {}, or detected a cycle!".format(MAX_NESTED_PARENT_DEPTH))
|
145
|
+
# We have another parent, so we create a new signer based off that
|
146
|
+
else:
|
147
|
+
return NestedResourcePrincipals(resource_principal_rpt_url=nested_resource_principal.nested_parent_rpt_url,
|
148
|
+
resource_principal_session_token_endpoint=resource_principal_session_token_endpoint,
|
149
|
+
sub_resource_rp_signer=nested_resource_principal,
|
150
|
+
current_parent_depth=nested_resource_principal.current_parent_depth + 1)
|
151
|
+
|
33
152
|
if rp_version == "2.2":
|
34
153
|
"""
|
35
154
|
This signer takes its configuration from the following environment variables.
|
@@ -49,7 +168,7 @@ def get_resource_principals_signer(resource_principal_token_path_provider=None):
|
|
49
168
|
|
50
169
|
- OCI_RESOURCE_PRINCIPAL_REGION: the canonical region name
|
51
170
|
|
52
|
-
This is
|
171
|
+
This is utilized in locating the "local" endpoints of services.
|
53
172
|
"""
|
54
173
|
session_token = os.environ.get(OCI_RESOURCE_PRINCIPAL_RPST)
|
55
174
|
private_key = os.environ.get(OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM)
|
@@ -70,6 +189,7 @@ def get_resource_principals_signer(resource_principal_token_path_provider=None):
|
|
70
189
|
- OCI_RESOURCE_PRINCIPAL_TENANCY_ID: The RPv2.1.1 tenancy id
|
71
190
|
- OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM: The private key in PEM format
|
72
191
|
- OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_PASSPHRASE: The (optional) passphrase for the private key
|
192
|
+
- OCI_RESOURCE_PRINCIPAL_REGION: The (optional) canonical region name
|
73
193
|
"""
|
74
194
|
resource_principal_token_endpoint = os.environ.get(OCI_RESOURCE_PRINCIPAL_RPT_ENDPOINT)
|
75
195
|
resource_principal_session_token_endpoint = os.environ.get(OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT)
|
@@ -77,6 +197,7 @@ def get_resource_principals_signer(resource_principal_token_path_provider=None):
|
|
77
197
|
tenancy_id = os.environ.get(OCI_RESOURCE_PRINCIPAL_TENANCY_ID)
|
78
198
|
private_key = os.environ.get(OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM)
|
79
199
|
private_key_passphrase = os.environ.get(OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM_PASSPHRASE)
|
200
|
+
region = os.environ.get(OCI_RESOURCE_PRINCIPAL_REGION)
|
80
201
|
|
81
202
|
return EphemeralResourcePrincipalV21Signer(resource_principal_token_endpoint=resource_principal_token_endpoint,
|
82
203
|
resource_principal_session_token_endpoint=resource_principal_session_token_endpoint,
|
@@ -84,13 +205,14 @@ def get_resource_principals_signer(resource_principal_token_path_provider=None):
|
|
84
205
|
tenancy_id=tenancy_id,
|
85
206
|
private_key=private_key,
|
86
207
|
private_key_passphrase=private_key_passphrase,
|
87
|
-
rp_version=rp_version
|
208
|
+
rp_version=rp_version,
|
209
|
+
region=region)
|
88
210
|
|
89
211
|
elif rp_version == "1.1":
|
90
212
|
"""
|
91
|
-
This signer takes its configuration from the following
|
213
|
+
This signer takes its configuration from the following environment variables
|
92
214
|
- OCI_RESOURCE_PRINCIPAL_RPT_ENDPOINT
|
93
|
-
The endpoint for
|
215
|
+
The endpoint for retrieving the Resource Principal Token
|
94
216
|
- OCI_RESOURCE_PRINCIPAL_RPST_ENDPOINT
|
95
217
|
The endpoint for retrieving the Resource Principal Session Token
|
96
218
|
"""
|
@@ -135,7 +257,7 @@ def get_resource_principal_delegation_token_signer(delegation_token, resource_pr
|
|
135
257
|
|
136
258
|
- OCI_RESOURCE_PRINCIPAL_REGION: the canonical region name
|
137
259
|
|
138
|
-
This is
|
260
|
+
This is utilized in locating the "local" endpoints of services.
|
139
261
|
"""
|
140
262
|
session_token = os.environ.get(OCI_RESOURCE_PRINCIPAL_RPST)
|
141
263
|
private_key = os.environ.get(OCI_RESOURCE_PRINCIPAL_PRIVATE_PEM)
|
@@ -160,3 +282,25 @@ def get_resource_principal_delegation_token_signer(delegation_token, resource_pr
|
|
160
282
|
raise EnvironmentError("{} is not defined".format(OCI_RESOURCE_PRINCIPAL_VERSION))
|
161
283
|
else:
|
162
284
|
raise EnvironmentError("Unsupported {}: {}".format(OCI_RESOURCE_PRINCIPAL_VERSION, rp_version))
|
285
|
+
|
286
|
+
|
287
|
+
def get_oke_workload_identity_resource_principal_signer(service_account_token_path=None, service_account_token=None, **kwargs):
|
288
|
+
sa_cert_path = os.environ.get(OCI_KUBERNETES_SERVICE_ACCOUNT_CERT_PATH, None)
|
289
|
+
if sa_cert_path is None:
|
290
|
+
sa_cert_path = DEFAULT_OCI_KUBERNETES_SERVICE_ACCOUNT_CERT_PATH
|
291
|
+
|
292
|
+
if service_account_token is None:
|
293
|
+
sa_token_provider = DefaultServiceAccountTokenProvider()
|
294
|
+
if service_account_token_path is not None:
|
295
|
+
sa_token_provider.override_sa_token_path(service_account_token_path)
|
296
|
+
else:
|
297
|
+
sa_token_provider = SuppliedServiceAccountTokenProvider(token_string=service_account_token)
|
298
|
+
service_host = os.environ.get(KUBERNETES_SERVICE_HOST)
|
299
|
+
region = os.environ.get(OCI_RESOURCE_PRINCIPAL_REGION)
|
300
|
+
|
301
|
+
return OkeWorkloadIdentityResourcePrincipalSigner(sa_token_provider=sa_token_provider,
|
302
|
+
sa_cert_path=sa_cert_path,
|
303
|
+
service_host=service_host,
|
304
|
+
service_port=OCI_KUBERNETES_PROXYMUX_SERVICE_PORT,
|
305
|
+
region=region,
|
306
|
+
**kwargs)
|