Loading services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/internal_service_ops.py +4 −2 Original line number Diff line number Diff line Loading @@ -29,11 +29,13 @@ class InternalServiceOps(Resource): allowed_total_invocations = settings.get("allowed_total_invocations", 100) allowed_invocations_per_second = settings.get("allowed_invocations_per_second", 10) time_range_days = settings.get("allowed_invocation_time_range_days", 365) net_slice_info = settings.get("net_slice_info", []) else: current_app.logger.error("CAPIF Configuration not found, applying all values to 0.") allowed_total_invocations = 0 allowed_invocations_per_second = 0 time_range_days = 0 net_slice_info = [] res = mycol.find_one( {"service_id": service_id, "aef_id": aef_id}, {"_id": 0}) Loading @@ -44,7 +46,7 @@ class InternalServiceOps(Resource): range_list = [TimeRangeList( datetime.utcnow(), datetime.utcnow()+timedelta(days=time_range_days))] invoker_acl = ApiInvokerPolicy( invoker_id, allowed_total_invocations, allowed_invocations_per_second, range_list) invoker_id, allowed_total_invocations, allowed_invocations_per_second, range_list, net_slice_info) r = mycol.find_one({"service_id": service_id, "aef_id": aef_id, "api_invoker_policies.api_invoker_id": invoker_id}, {"_id": 0}) if r is None: Loading Loading @@ -72,7 +74,7 @@ class InternalServiceOps(Resource): range_list = [TimeRangeList( datetime.utcnow(), datetime.utcnow()+timedelta(days=time_range_days))] invoker_acl = ApiInvokerPolicy( invoker_id, allowed_total_invocations, allowed_invocations_per_second, range_list) invoker_id, allowed_total_invocations, allowed_invocations_per_second, range_list, net_slice_info) service_acls = { "service_id": service_id, Loading services/helper/config.yaml +11 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,17 @@ capif_configuration: allowed_invocation_time_range_days: 365 allowed_invocations_per_second: 10 allowed_total_invocations: 5 net_slice_info: - snssai: sst: 1 sd: "000001" nsiId: "string" ensi: "string" - snssai: sst: 2 sd: "000001" nsiId: "string" ensi: "string" certificates_expiry: ttl_invoker_cert: 4300h ttl_provider_cert: 4300h Loading Loading
services/TS29222_CAPIF_Access_Control_Policy_API/capif_acl/core/internal_service_ops.py +4 −2 Original line number Diff line number Diff line Loading @@ -29,11 +29,13 @@ class InternalServiceOps(Resource): allowed_total_invocations = settings.get("allowed_total_invocations", 100) allowed_invocations_per_second = settings.get("allowed_invocations_per_second", 10) time_range_days = settings.get("allowed_invocation_time_range_days", 365) net_slice_info = settings.get("net_slice_info", []) else: current_app.logger.error("CAPIF Configuration not found, applying all values to 0.") allowed_total_invocations = 0 allowed_invocations_per_second = 0 time_range_days = 0 net_slice_info = [] res = mycol.find_one( {"service_id": service_id, "aef_id": aef_id}, {"_id": 0}) Loading @@ -44,7 +46,7 @@ class InternalServiceOps(Resource): range_list = [TimeRangeList( datetime.utcnow(), datetime.utcnow()+timedelta(days=time_range_days))] invoker_acl = ApiInvokerPolicy( invoker_id, allowed_total_invocations, allowed_invocations_per_second, range_list) invoker_id, allowed_total_invocations, allowed_invocations_per_second, range_list, net_slice_info) r = mycol.find_one({"service_id": service_id, "aef_id": aef_id, "api_invoker_policies.api_invoker_id": invoker_id}, {"_id": 0}) if r is None: Loading Loading @@ -72,7 +74,7 @@ class InternalServiceOps(Resource): range_list = [TimeRangeList( datetime.utcnow(), datetime.utcnow()+timedelta(days=time_range_days))] invoker_acl = ApiInvokerPolicy( invoker_id, allowed_total_invocations, allowed_invocations_per_second, range_list) invoker_id, allowed_total_invocations, allowed_invocations_per_second, range_list, net_slice_info) service_acls = { "service_id": service_id, Loading
services/helper/config.yaml +11 −0 Original line number Diff line number Diff line Loading @@ -28,6 +28,17 @@ capif_configuration: allowed_invocation_time_range_days: 365 allowed_invocations_per_second: 10 allowed_total_invocations: 5 net_slice_info: - snssai: sst: 1 sd: "000001" nsiId: "string" ensi: "string" - snssai: sst: 2 sd: "000001" nsiId: "string" ensi: "string" certificates_expiry: ttl_invoker_cert: 4300h ttl_provider_cert: 4300h Loading