遵循以下最佳实践的项目将能够自愿的自我认证,并显示他们已经实现了核心基础设施计划(OpenSSF)徽章。 显示详细资料
[](https://www.bestpractices.dev/projects/1614)
<a href="https://www.bestpractices.dev/projects/1614"><img src="https://www.bestpractices.dev/projects/1614/badge"></a>
POLICY is the subsystem of ONAP that maintains, distributes, and operates on the set of rules that underlie ONAP’s control, orchestration, and management functions.
POLICY provides a logically centralized environment for the creation and management of policies, including conditional rules. This provides the capability to create and validate policies/rules, identify overlaps, resolve conflicts, and derive additional policies as needed.
Policies are used to control, influence, and help ensure compliance with goals. Policies can support infrastructure, products and services, operation automation, and security. Users, including network and service designers, operations engineers, and security experts, can easily create, change, and manage policy rules from the POLICY Manager in the ONAP Portal.
A policy is defined to create a condition, requirement, constraint, decision, or a need that must be provided, evaluated, maintained, and/or enforced. The policy is validated and corrected for any conflicts, and then placed in the appropriate repository, and made available for use by other subsystems and components. Alternately, some policies are directly distributed to policy decision engines such as Drools or XACML. In this manner, the constraints, decisions and actions to be taken are distributed.
All 5 project committers actively contribute to the codebase. Details on the committers is stored in INFO.yaml files for each repository. For example: https://gerrit.onap.org/r/gitweb?p=policy/parent.git;a=blob;f=INFO.yaml;hb=refs/heads/master
We have key developers contributing to Policy Framework from different organizations are listed below:
https://gerrit.onap.org/r/q/owner:ajinkya-patil%2540t-systems.com https://gerrit.onap.org/r/q/owner:wayne.dunican%2540est.tech https://gerrit.onap.org/r/q/owner:francesco.fiora%2540est.tech https://gerrit.onap.org/r/q/owner:adam.kenihan%2540est.tech https://gerrit.onap.org/r/q/owner:saul.gill%2540est.tech
ONAP requires via their CI/CD process that license/copyright are on every source file, or a single license file may be placed at the top of a directory structure.
ONAP requires this via their CI/CD process that license/copyright are on every source file, or a single license file may be placed at the top of a directory structure. SPDX-License-Identifier is included. https://github.com/onap/policy-clamp/blob/master/common/src/main/java/org/onap/policy/clamp/common/acm/exception/AutomationCompositionException.java https://github.com/onap/policy-api/blob/master/main/src/main/java/org/onap/policy/api/main/service/PdpGroupService.java
Git and Gerrit are used.
https://lf-onap.atlassian.net/jira/software/c/projects/POLICY/issues?jql=project%20%3D%20%22POLICY%22%20ORDER%20BY%20created%20DESC
LF requires a Linux Foundation ID for accessing repos . LF Id requires a 2FA.
2FA for LF id uses authenticator app.
Per https://lf-onap.atlassian.net/wiki/spaces/DW/pages/16230137/Code+Review, the process is outlined.
Per https://lf-onap.atlassian.net/wiki/spaces/DW/pages/16230137/Code+Review, self-commits are not allowed.
https://jenkins.onap.org/view/policy/job/policy-drools-pdp-master-merge-java/ https://jenkins.onap.org/view/policy/job/policy-drools-applications-master-merge-java/ https://jenkins.onap.org/view/policy/job/policy-docker-master-merge-java/ https://jenkins.onap.org/view/policy/job/policy-distribution-master-merge-java/ https://jenkins.onap.org/view/policy/job/policy-common-master-merge-java/ https://jenkins.onap.org/view/policy/job/policy-clamp-master-merge-java/ https://jenkins.onap.org/view/policy/job/policy-api-master-merge-java/ https://jenkins.onap.org/view/policy/job/policy-apex-pdp-master-merge-java/ https://jenkins.onap.org/view/policy/job/policy-pap-master-merge-java/ https://jenkins.onap.org/view/policy/job/policy-parent-master-merge-java/ https://jenkins.onap.org/view/policy/job/policy-models-master-merge-java/ https://jenkins.onap.org/view/policy/job/policy-common-master-merge-java/
Tests can be run, by running the command "mvn test". Our documentation for developers is described here: https://docs.onap.org/projects/onap-policy-parent/en/latest/development/devtools/devtools.html#building-onap-policy-framework-components Robot Framework tests are invoked by standard Robot methodology, also triggered by Jenkins build jobs. https://lf-onap.atlassian.net/wiki/spaces/DW/pages/16230125/Continuous+Integration
For each pull request, the project needs to be built successfully before the Merge option becomes activated. The test will be run automatically during the building process as well. Once build successfully and all tests has passed, the Merge option will be activated. Code inspection must also be passed by reviewers. The Policy Builds are located here: https://jenkins.onap.org/view/policy/
Sonar scans run daily. All the Policy components have statement coverage over 90% in Sonar. https://sonarcloud.io/organizations/onap/projects?sort=maintainability&search=policy-
Sonar scans run daily. All the Policy components have branch coverage over 80% in Sonar. https://sonarcloud.io/organizations/onap/projects?sort=maintainability&search=policy-
The projects supports secure TLS and HTTPS in these applications. HTTP is allowed only through service mesh.
The products support TLS version 1.2
We have got A rating from the securityheaders.com for the project website, repository and download site. Policy is hosted on Git hub which is a protected with hardening headers. Download site https://nexus3.onap.org/ project repository https://github.com/onap?q=policy&type=all&language=&sort= Project website https://lf-onap.atlassian.net/wiki/spaces/DW/pages/16230647/Policy+Framework+Project // One or more of the required security hardening headers is missing.
Policy Framework had the security review done on Sep 2023. https://lf-onap.atlassian.net/wiki/spaces/DW/pages/16519988/PF+-+ONAP+Security+Review+Questionnaire
We had the second review for the new component opa-pdp in May 2025 https://lf-onap.atlassian.net/wiki/spaces/DW/pages/157417605/OPA-PDP+Security+review
The project tries to use hardening mechanisms whenever possible. The application uses Swagger for RESTful API, wherein it is set that Authorization headers are required for accessing API documentation. Policy Framework as a production service must be installed using the OOM helm charts, which are using Service Mesh and following the required user privilege for network and file system access. In these deployments, K8s secrets which are generated and stored as the application is deployed. The user has the option to provide a username/password to the helm chart - in this case a kubernetes secret will be generated by the chart and used for authentication. Any unused functionality, service (as whole or as REST API), credential is reviewed and removed from the base code. https://lf-onap.atlassian.net/wiki/spaces/DW/pages/16519988/PF+-+ONAP+Security+Review+Questionnaire
The project runs sonar against the code on every code reviews. Jmeter is also used for analyzing the performance and application behavior on load conditions. Observability is available with prometheus metrics in the runtime applications.
Ex: https://jenkins.onap.org/job/policy-api-sonar-verify/ Jmeter analysis: https://docs.onap.org/projects/onap-policy-parent/en/latest/development/devtools/testing/s3p/api-s3p.html
The project validates prometheus metrics on the integration tests as runtime assertions. https://jenkins.onap.org/job/policy-api-master-project-csit-api/1829/robot/Api-Test%20&%20Api-Slas/Api-Slas/
后退