Skip to content

Commit

Permalink
Merge branch 'develop' into feature/3966-database-access-layer-refact…
Browse files Browse the repository at this point in the history
…oring
  • Loading branch information
ihar-tsykala authored Aug 26, 2024
2 parents d6e8ad7 + b72c8dc commit e47c42d
Show file tree
Hide file tree
Showing 39 changed files with 225 additions and 66 deletions.
49 changes: 49 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
###################################
##### Global Protection Rule ######
###################################
# NOTE: This rule is overriden by the more specific rules below. This is the catch-all rule for all files not covered by the more specific rules below.
* @hashgraph/developer-advocates

############################
##### Project Files ######
############################

/src/** @hashgraph/developer-advocates
/__tests__/** @hashgraph/developer-advocates


#########################
##### Core Files ######
#########################

# NOTE: Must be placed last to ensure enforcement over all other rules

# Protection Rules for Github Configuration Files and Actions Workflows
/.github/ @hashgraph/devops-ci @hashgraph/devops-ci-committers @hashgraph/release-engineering-managers
/.github/workflows/ @hashgraph/devops-ci @hashgraph/devops-ci-committers

# NodeJS project files
package.json @hashgraph/devops-ci @hashgraph/devops-ci-committers @hashgraph/developer-advocates
package-lock.json @hashgraph/devops-ci @hashgraph/devops-ci-committers @hashgraph/developer-advocates
jest.config.mjs @hashgraph/devops-ci @hashgraph/devops-ci-committers @hashgraph/developer-advocates

# Codacy Tool Configurations
/config/ @hashgraph/devops-ci @hashgraph/devops-ci-committers @hashgraph/developer-advocates
.remarkrc @hashgraph/devops-ci @hashgraph/devops-ci-committers @hashgraph/developer-advocates

# Semantic Release Configuration
.releaserc @hashgraph/devops-ci @hashgraph/devops-ci-committers

# Self-protection for root CODEOWNERS files (this file should not exist and should definitely require approval)
/CODEOWNERS @hashgraph/release-engineering-managers

# Protect the repository root files
/README.md @hashgraph/devops-ci @hashgraph/devops-ci-committers @hashgraph/release-engineering-managers
**/LICENSE @hashgraph/release-engineering-managers

# CodeCov configuration
**/codecov.yml @hashgraph/devops-ci @hashgraph/devops-ci-committers

# Git Ignore definitions
**/.gitignore @hashgraph/devops-ci @hashgraph/devops-ci-committers @hashgraph/release-engineering-managers
**/.gitignore.* @hashgraph/devops-ci @hashgraph/devops-ci-committers @hashgraph/release-engineering-managers
6 changes: 3 additions & 3 deletions .github/workflows/add-documentation-to-repo.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ on:
jobs:
runService:
name: Run Service
runs-on: [self-hosted, Linux, medium, ephemeral]
runs-on: guardian-linux-medium
strategy:
matrix:
node-version: [ 20.x ]
Expand Down Expand Up @@ -38,9 +38,9 @@ jobs:
run: yarn install

- name: Start NatsMQ
uses: onichandame/nats-action@a8144f9009c5f67c39edd6a50f9de659c44bd135 # v0.0.0
uses: step-security/nats-action@0306fc1c4e4f49dbe4db5865a3135ab1516a5aee # v0.1.0
with:
port: "4222"
port: '4222'

- name: Config Repo
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/api-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,9 @@ jobs:
popd
- name: Start NatsMQ
uses: onichandame/nats-action@a8144f9009c5f67c39edd6a50f9de659c44bd135 # v0.0.0
uses: step-security/nats-action@0306fc1c4e4f49dbe4db5865a3135ab1516a5aee # v0.1.0
with:
port: "4222"
port: '4222'

- name: Start MongoDB
uses: supercharge/mongodb-github-action@5a87bd81f88e2a8b195f8b7b656f5cda1350815a # v1.11.0
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,9 @@ jobs:
popd
- name: Start NatsMQ
uses: onichandame/nats-action@a8144f9009c5f67c39edd6a50f9de659c44bd135 # v0.0.0
uses: step-security/nats-action@0306fc1c4e4f49dbe4db5865a3135ab1516a5aee # v0.1.0
with:
port: "4222"
port: '4222'

- name: Start MongoDB
uses: supercharge/mongodb-github-action@5a87bd81f88e2a8b195f8b7b656f5cda1350815a # v1.11.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:
buildAndTest:
name: Build and Test (Manual - Main)
runs-on: [self-hosted, Linux, medium, ephemeral]
runs-on: guardian-linux-medium
strategy:
matrix:
node-version: [ 20.10.0 ]
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ permissions:
jobs:
docker:
name: Publish to Docker
runs-on: [self-hosted, Linux, medium, ephemeral]
runs-on: guardian-linux-medium
permissions:
id-token: write
contents: read
Expand All @@ -22,12 +22,12 @@ jobs:
egress-policy: audit

- name: Conditional values for Github Action
uses: haya14busa/action-cond@94f77f7a80cd666cb3155084e428254fea4281fd # v1.2.1
uses: step-security/action-cond@667d0aa72b2bd9513536eb0ca8acd5549757bd3d # v1.2.1
id: latestTag
with:
cond: ${{ github.event.release.target_commitish == 'main' }}
if_true: "latest"
if_false: "hotfix"
if_true: 'latest'
if_false: 'hotfix'

- name: Checkout
uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
8 changes: 8 additions & 0 deletions Methodology Library/Hackathon/UNFCCC_ACM0007/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,14 @@ User Page:

15) Finally the TrustChain contains all the important transaction data.
![image](https://github.com/ankurgupta007/guardian/assets/98680735/68322998-b1ef-4608-83e9-cad62a860402)

## Comparison with a existing policy:
1) ACM0007 already exists, this was created by Envision BlockChain.
2) This is a improved version of the same, the differences are enlisted below:
3) This enhanced version has a more complete documentation & a video presentation too.
4) This enhanced version has more suggestive example fillouts.
5) This enhanced version has a new role "Token Manager" which simplies the process of viewing and managing tokens.
6) This enhanced version has a new token called CCPT (Combined Cycle Power Token).

## Epilogue:
This project and documentation made by a contestant during the DLT Climate Hackathon. Therefore contains a few bugs. A few changes can be done to improve the system:
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
{\rtf1\ansi\ansicpg1252\cocoartf2639
\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\froman\fcharset0 Times-Roman;\f1\fswiss\fcharset0 ArialMT;}
{\colortbl;\red255\green255\blue255;\red0\green0\blue0;}
{\*\expandedcolortbl;;\cssrgb\c0\c0\c0;}
\margl1440\margr1440\vieww11520\viewh8400\viewkind0
\deftab720
\pard\pardeftab720\partightenfactor0

\f0\fs24 \cf0 \expnd0\expndtw0\kerning0
\outl0\strokewidth0 \strokec2 \
\pard\pardeftab720\partightenfactor0

\f1\fs29\fsmilli14667 \cf0 Verification Report - Tesla's Electric Vehicle Production
\f0\fs24 \
\

\f1\fs29\fsmilli14667 Project Title: Tesla Electric Vehicle Production Initiative
\f0\fs24 \
\

\f1\fs29\fsmilli14667 Project ID: ZEV-2024-TESLA-001
\f0\fs24 \
\

\f1\fs29\fsmilli14667 Reporting Period: January 2024 - March 2024
\f0\fs24 \
\

\f1\fs29\fsmilli14667 Verified By: [Name of Verification Body]
\f0\fs24 \
\

\f1\fs29\fsmilli14667 Date of Verification: April 30, 2024
\f0\fs24 \
\

\f1\fs29\fsmilli14667 Executive Summary:
\f0\fs24 \

\f1\fs29\fsmilli14667 This Verification Report validates the information provided in Tesla's Monitoring Report (MR) for the reporting period of January 2024 to March 2024. The report assesses the accuracy and completeness of Tesla's electric vehicle production data and compliance with regulatory guidelines.
\f0\fs24 \
\

\f1\fs29\fsmilli14667 Key Findings:
\f0\fs24 \

\f1\fs29\fsmilli14667 1. Data Accuracy: The production data provided by Tesla in the MR aligns with the records and documentation reviewed during the verification process. The total number of electric vehicles produced and the distribution across different models are consistent with the reported figures.
\f0\fs24 \

\f1\fs29\fsmilli14667 2. Compliance with Regulatory Standards: Tesla's electric vehicle production activities comply with the regulatory guidelines outlined in the ZEV Ledger framework. The company has demonstrated adherence to emission standards and other environmental requirements applicable to electric vehicle manufacturers.
\f0\fs24 \

\f1\fs29\fsmilli14667 3. Documentation Review: The verification body has reviewed the supporting documentation, including production records, quality control reports, and regulatory certifications. The documentation corroborates the accuracy of the reported data and the implementation of sustainable practices in Tesla's manufacturing processes.
\f0\fs24 \

\f1\fs29\fsmilli14667 4. Transparency and Accountability: Tesla has exhibited transparency and accountability in reporting its electric vehicle production metrics. The company has provided comprehensive information in the MR, facilitating the verification process and ensuring the integrity of the ZEV Ledger.
\f0\fs24 \
\

\f1\fs29\fsmilli14667 Conclusion:
\f0\fs24 \

\f1\fs29\fsmilli14667 Based on the findings of the verification process, it is confirmed that Tesla has accurately reported its electric vehicle production activities for the reporting period of January 2024 to March 2024. The company's commitment to sustainability and regulatory compliance is evident in its operations, contributing to the advancement of clean transportation solutions.
\f0\fs24 \
\

\f1\fs29\fsmilli14667 Verified By:
\f0\fs24 \

\f1\fs29\fsmilli14667 [Name of Verification Body]
\f0\fs24 \

\f1\fs29\fsmilli14667 [Title/Position]
\f0\fs24 \

\f1\fs29\fsmilli14667 [Contact Information]
\f0\fs24 \
\

\f1\fs29\fsmilli14667 Contact Information:
\f0\fs24 \

\f1\fs29\fsmilli14667 For inquiries regarding this verification report, please contact:
\f0\fs24 \

\f1\fs29\fsmilli14667 [Name]
\f0\fs24 \

\f1\fs29\fsmilli14667 [Title]
\f0\fs24 \

\f1\fs29\fsmilli14667 [Verification Body]
\f0\fs24 \

\f1\fs29\fsmilli14667 Email: [Email Address]
\f0\fs24 \

\f1\fs29\fsmilli14667 Phone: [Phone Number]
\f0\fs24 \
}
1 change: 1 addition & 0 deletions Methodology Library/Work In Progress/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

6 changes: 3 additions & 3 deletions ai-service/package.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"name": "ai-service",
"version": "2.27.0",
"version": "2.27.1",
"main": "dist/app.js",
"license": "Apache-2.0",
"dependencies": {
"@guardian/common": "^2.27.0",
"@guardian/interfaces": "^2.27.0",
"@guardian/common": "^2.27.1",
"@guardian/interfaces": "^2.27.1",
"@mikro-orm/core": "6.2.2",
"@mikro-orm/mongodb": "6.2.2",
"@nestjs/common": "^9.4.1",
Expand Down
6 changes: 3 additions & 3 deletions analytics-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@
},
"author": "Envision Blockchain Solutions <[email protected]>",
"dependencies": {
"@guardian/common": "^2.27.0",
"@guardian/interfaces": "^2.27.0",
"@guardian/common": "^2.27.1",
"@guardian/interfaces": "^2.27.1",
"@nestjs/common": "^9.4.1",
"@nestjs/core": "^9.4.1",
"@nestjs/jwt": "^10.0.3",
Expand Down Expand Up @@ -82,5 +82,5 @@
"test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ui-service.xml"
},
"type": "module",
"version": "2.27.0"
"version": "2.27.1"
}
6 changes: 3 additions & 3 deletions api-gateway/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
"@fastify/formbody": "^7.4.0",
"@fastify/multipart": "^8.2.0",
"@fastify/static": "^7.0.0",
"@guardian/common": "^2.27.0",
"@guardian/interfaces": "^2.27.0",
"@guardian/common": "^2.27.1",
"@guardian/interfaces": "^2.27.1",
"@nestjs/common": "^9.4.1",
"@nestjs/core": "^9.4.1",
"@nestjs/jwt": "^10.0.3",
Expand Down Expand Up @@ -88,5 +88,5 @@
"test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ui-service.xml"
},
"type": "module",
"version": "2.27.0"
"version": "2.27.1"
}
2 changes: 1 addition & 1 deletion api-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "api-tests",
"version": "2.27.0",
"version": "2.27.1",
"description": "API Tests",
"main": "index.js",
"type": "module",
Expand Down
6 changes: 3 additions & 3 deletions auth-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
"image-size": "1.0.2"
},
"dependencies": {
"@guardian/common": "^2.27.0",
"@guardian/interfaces": "^2.27.0",
"@guardian/common": "^2.27.1",
"@guardian/interfaces": "^2.27.1",
"@meeco/cryppo": "^2.0.2",
"@mikro-orm/core": "6.2.2",
"@mikro-orm/mongodb": "6.2.2",
Expand Down Expand Up @@ -79,5 +79,5 @@
"test": "mocha tests/**/*.test.js --reporter mocha-junit-reporter --reporter-options mochaFile=../test_results/ui-service.xml"
},
"type": "module",
"version": "2.27.0"
"version": "2.27.1"
}
4 changes: 2 additions & 2 deletions auth-service/src/utils/user-access-token.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export class UserAccessTokenService {
expireAt: number
}> {
return await util.promisify<string, any, Object, any>(verify)(refreshToken, this.JWT_PUBLIC_KEY, {
algorithm: 'RS256'
algorithms: ['RS256']
});
}

Expand Down Expand Up @@ -92,7 +92,7 @@ export class UserAccessTokenService {
expireAt?: number
}> {
return await util.promisify<string, any, Object, any>(verify)(accessToken, this.JWT_PUBLIC_KEY, {
algorithm: 'RS256'
algorithms: ['RS256']
});
}
}
4 changes: 2 additions & 2 deletions common/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"@azure/identity": "^3.2.2",
"@azure/keyvault-secrets": "^4.7.0",
"@google-cloud/secret-manager": "^4.2.2",
"@guardian/interfaces": "^2.27.0",
"@guardian/interfaces": "^2.27.1",
"@hashgraph/sdk": "2.46.0",
"@mattrglobal/jsonld-signatures-bbs": "^1.1.2",
"@meeco/cryppo": "^2.0.2",
Expand Down Expand Up @@ -87,5 +87,5 @@
"test:stability": "mocha tests/stability.test.js"
},
"type": "module",
"version": "2.27.0"
"version": "2.27.1"
}
1 change: 1 addition & 0 deletions exclude-secrets.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ youraccesstokensecret
tls/vault/client/tls.key
YOUR_ACCESS_TOKEN_SECRET_GOES_HERE
YOUR_STORAGE_API_KEY_GOES_HERE
YOUR_JWT_PRIVATE_KEY_GOES_HERE
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,5 @@
"test": "ng test",
"watch": "ng build --watch --configuration development --output-path ../www-data"
},
"version": "2.27.0"
"version": "2.27.1"
}
6 changes: 3 additions & 3 deletions guardian-service/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@
"image-size": "1.0.2"
},
"dependencies": {
"@guardian/common": "^2.27.0",
"@guardian/interfaces": "^2.27.0",
"@guardian/common": "^2.27.1",
"@guardian/interfaces": "^2.27.1",
"@hashgraph/sdk": "2.46.0",
"@mattrglobal/jsonld-signatures-bbs": "^1.1.2",
"@meeco/cryppo": "^2.0.2",
Expand Down Expand Up @@ -99,5 +99,5 @@
"test:stability": "mocha tests/stability.test.mjs"
},
"type": "module",
"version": "2.27.0"
"version": "2.27.1"
}
Loading

0 comments on commit e47c42d

Please sign in to comment.