Skip to content

Commit

Permalink
Fix for the 2.25.0 release (#3727)
Browse files Browse the repository at this point in the history
* update status code for tests

* fix bottom margin for tools changing [skip ci]

Signed-off-by: artembuslaev <[email protected]>

* Dockerfiles revised

Signed-off-by: Alexander Pyatakov <[email protected]>

* node image replaced with the slim version

Signed-off-by: Alexander Pyatakov <[email protected]>

* node version moved to arg

Signed-off-by: Alexander Pyatakov <[email protected]>

* Dockerfiles has been revamped to reduce the size of the final images

Signed-off-by: Alexander Pyatakov <[email protected]>

* Added/Modified .dockerignore files

Signed-off-by: Alexander Pyatakov <[email protected]>

* Optimize caching with "COPY --link"

Signed-off-by: Alexander Pyatakov <[email protected]>

* Run applications as a non-root user and use init:true for containers

Signed-off-by: Alexander Pyatakov <[email protected]>

* Yarn cache directory defined as an argument

Signed-off-by: Alexander Pyatakov <[email protected]>

* Yarn cache fix

Signed-off-by: Alexander Pyatakov <[email protected]>

* Permissions changes

Signed-off-by: Alexander Pyatakov <[email protected]>

* Base node image is changed to alpine

Signed-off-by: Alexander Pyatakov <[email protected]>

* GITBOOK-136: Added Filebase docs

* added bad_request const for status code

* added publishing contract file script

Signed-off-by: artembuslaev <[email protected]>

* fix: migrate to redict cache store

* Revert "Merge branch 'develop' into feat/move-to-es-modules-develop"

This reverts commit 6da2788, reversing
changes made to 0c8b832.

* Revert "fix: merge with develop"

This reverts commit 0c8b832, reversing
changes made to 0fec16a.

* Revert "Revert "fix: merge with develop""

This reverts commit 5610fa5.

* Revert "Revert "Merge branch 'develop' into feat/move-to-es-modules-develop""

This reverts commit c48aa0f.

* added nfts limit in contracts

Signed-off-by: Artem Buslaev <[email protected]>

* upd contracts [skip ci]

Signed-off-by: Artem Buslaev <[email protected]>

* fix script [skip ci]

Signed-off-by: Artem Buslaev <[email protected]>

* GITBOOK-137: Updated Changing Tools in UI section

* Update readme.md of ML readme

* remove output [skip ci]

Signed-off-by: Artem Buslaev <[email protected]>

* fix

Signed-off-by: Artem Buslaev <[email protected]>

* GITBOOK-139: Added section on how to deploy contracts using your own account

* Update readme.md

* GITBOOK-140: Added Atma Scope 3 policy demo

* GITBOOK-142: Added Dovu MMCM

* update iii.f [skip ci]

Signed-off-by: Artem Buslaev <[email protected]>

* feat: performance interceptor

* cache-endpoints
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* update policies [skip ci]

Signed-off-by: Artem Buslaev <[email protected]>

* fix: extentions gulp files in description dockerfiles

* update policies [skip ci]

Signed-off-by: Artem Buslaev <[email protected]>

* feat: wrap endpoinds in cache

* GITBOOK-143: added ExternalDataBlock details

* feat: use cache with apply decorators

* fix: file name import

* fix: get user only if auth token exist

* feat: add perf hooks in performance interceptor

* fix: add express flag for projects/properties route

* setup user profile
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* sign with fireblocks
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* user fireblocks config
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix serials column

Signed-off-by: Artem Buslaev <[email protected]>

* remove res where it possible and add res.locals.data

* GITBOOK-144: Added Changing of Tools during Policy import APIs added

* fix fireblocks sign bug
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* add ui validators, add exception
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* temp fix validators
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* GITBOOK-145: Added youtube demo video for PWRM0002

* GITBOOK-146: Updated Guardian Introduction

* fix: remove cache from policies/:policyId/groups

* fix
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* Policy Preview/Import performance optimisations

Signed-off-by: Alexander Pyatakov <[email protected]>

* fixed fields parsing for compare

Signed-off-by: Alexander Pyatakov <[email protected]>

* parseConditions function improvements

Signed-off-by: Alexander Pyatakov <[email protected]>

* fix generate xlsx

Signed-off-by: Stepan Kiryakov <[email protected]>

* GITBOOK-147: Made some minor corrections

* test
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* added policy data migration

Signed-off-by: Artem Buslaev <[email protected]>

* [skip ci] Add swagger.yaml

* fix

Signed-off-by: Artem Buslaev <[email protected]>

* fix

Signed-off-by: Artem Buslaev <[email protected]>

* fix lint

Signed-off-by: Artem Buslaev <[email protected]>

* remove types/mime resolution
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* Add files via upload

* fix signing
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix linting
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix autocomplete
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* remove singleton from fireblocks-helper.ts
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* docs: add instruction for launch cache container in readme file

* bump version
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* [skip ci] Add swagger.yaml

* GITBOOK-148: Added Live Project Data Migration UI

* GITBOOK-149: Fireblocks Docs added

* added migrating retire pools and dynamic tokens

Signed-off-by: Artem Buslaev <[email protected]>

* [skip ci] Add swagger.yaml

* fix

Signed-off-by: Artem Buslaev <[email protected]>

* GITBOOK-150: ACM0001 guide added

* fix lint

Signed-off-by: Artem Buslaev <[email protected]>

* Update readme.md of ACM0001

* fix

Signed-off-by: Artem Buslaev <[email protected]>

* GITBOOK-151: Added migration policy data APIs

* hotfix: remove cache for contract routes

* GITBOOK-152: Added redict in Prerequisites

* GITBOOK-153: Added Prerequisites

* GITBOOK-154: Added Token template to migration

* GITBOOK-155: Added fireblocks note

* hotfix/remove-cache-from-tags-schemas

* GITBOOK-156: Updated roadmap

* GITBOOK-157: Updated roadmap

* fix: remove cache from navigation

* GITBOOK-158: Made some changes in SD

* feat:basic fastify solution

* feat: add body parser for json and binary/octet-stream and send method

* feat: implement interceptor for multipart formdata

* refactor: put same names as base nest

* fix cache document id

Signed-off-by: Stepan Kiryakov <[email protected]>

* fix cache document id

Signed-off-by: Stepan Kiryakov <[email protected]>

* fix cache document id

Signed-off-by: Stepan Kiryakov <[email protected]>

* GITBOOK-159: made some minor corrections

* GITBOOK-160: updated extractdatablock

* fix: error status if token is not correct

* bump version
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* [skip ci] Add swagger.yaml

* fix: size of limit json to 1gb

* GITBOOK-161: Updated Live Project Data UI

* update mamual tests flow
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix: auth accross decorator in get account

* feat: add option ignoreTrailingSlash in fastify adapter

* [skip ci] Add swagger.yaml

* fix: remove local data for cache from contracts

* fix: remove local data for cache from tags schemas

* GITBOOK-162: Added note in Topics Architecture

* fix: export strime for schema file

* update api workflows (#3640)

Signed-off-by: simvalery <[email protected]>

* fix: setHeader to header for fastify

* fix: linter errors

* fix: req body is undefined for logger

* gzip compression enabled for web-proxy

Signed-off-by: Alexander Pyatakov <[email protected]>

* fix: multipart intercepter for artifats

* GITBOOK-163: Updated Fireblocks UI screens

* GITBOOK-164: Removed Fireblocks note

* fix: sypress 500 error instead 400 in artifact

* remove port sharing from cache container
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* GITBOOK-165: Updated tools for AMS-II.G

* GITBOOK-166: Corrected gold Standard policy

* GITBOOK-167: Updated Verra titles

* GITBOOK-168: updated VM0017 title

* GITBOOK-169: updated Verra

* GITBOOK-171: updated grid spelling

* GITBOOK-172: correcting grid spelling

* GITBOOK-173: Updated High level architecture

* data comparation
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix 3449
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* GITBOOK-174: fireblocks diagram updated

* add api-version
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* [skip ci] Add swagger.yaml

* fix swagger generated files
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* [skip ci] Add swagger.yaml

* fix 3449
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* GITBOOK-174: fireblocks diagram updated

* fix swagger generated files
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix swagger
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* [skip ci] Add swagger.yaml

* fix labels
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix labels
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix irec7 comparation
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix irec5 comparison
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix crash
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix ui
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix sizing
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix schema title
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* status code added

* fix lint
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* GITBOOK-175: Added VP Document Comparison for projects

* GITBOOK-176: Added VP Compare in Projects docs

* GITBOOK-177: Added Methane Emission GS demo guide

* GITBOOK-178: Added operations section for Fireblocks

* Revamp Guardian user/roles and permissions model (#3717)

Revamp Guardian user/roles and permissions model 

---------

Signed-off-by: Stepan Kiryakov <[email protected]>
Co-authored-by: envision-ci-agent <[email protected]>

* fix: issue-3447-redundant-fields-in-session-api (#3664)

Signed-off-by: Ihar Tsykala <[email protected]>
Co-authored-by: Ihar <[email protected]>

* fix connection refused error
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix application-events service
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix ipfs get file
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* [skip ci] Add swagger.yaml

* fix upload in ipfs from dryRun mode
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix download in ipfs from dryRun mode
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix gridfs bug
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix gridfs bug
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* Feature/2629 upd (#3720)

* add indexer

Signed-off-by: Stepan Kiryakov <[email protected]>

* update

Signed-off-by: Stepan Kiryakov <[email protected]>

* fix

Signed-off-by: Stepan Kiryakov <[email protected]>

* add services

Signed-off-by: Stepan Kiryakov <[email protected]>

* update

Signed-off-by: Stepan Kiryakov <[email protected]>

* update

Signed-off-by: Stepan Kiryakov <[email protected]>

* update

Signed-off-by: Stepan Kiryakov <[email protected]>

* update

Signed-off-by: Stepan Kiryakov <[email protected]>

* update

Signed-off-by: Stepan Kiryakov <[email protected]>

* update

Signed-off-by: Stepan Kiryakov <[email protected]>

* update elastic

Signed-off-by: Stepan Kiryakov <[email protected]>

* add page templates

Signed-off-by: Stepan Kiryakov <[email protected]>

* update

Signed-off-by: Stepan Kiryakov <[email protected]>

* update

Signed-off-by: Stepan Kiryakov <[email protected]>

* update

Signed-off-by: Stepan Kiryakov <[email protected]>

* update

Signed-off-by: Stepan Kiryakov <[email protected]>

* update

Signed-off-by: Stepan Kiryakov <[email protected]>

* update

Signed-off-by: Stepan Kiryakov <[email protected]>

* update

Signed-off-by: Stepan Kiryakov <[email protected]>

* update indexer [skip ci]

Signed-off-by: Artem Buslaev <[email protected]>

* update yarn lock [skip ci]

Signed-off-by: Artem Buslaev <[email protected]>

* fix [skip ci]

Signed-off-by: Artem Buslaev <[email protected]>

* fix [skip ci]

Signed-off-by: Artem Buslaev <[email protected]>

* fix [skip ci]

Signed-off-by: Artem Buslaev <[email protected]>

* fix swagger [skip ci]

Signed-off-by: Artem Buslaev <[email protected]>

---------

Signed-off-by: Stepan Kiryakov <[email protected]>
Signed-off-by: Artem Buslaev <[email protected]>
Co-authored-by: Stepan Kiryakov <[email protected]>

* bump version
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* [skip ci] Add swagger.yaml

* update default masks [skip ci]

Signed-off-by: Artem Buslaev <[email protected]>

* Revamp Guardian user/roles and permissions model (#3722)

Add messages

* GITBOOK-179: Added Step by step to GS methodology

* Create readme.md of Methane Emission Reduction by Adjusted Water Management Practice in Rice Cultivation

Signed-off-by: prernaadev01 <[email protected]>

* bump version
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* add gs policy
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* Add files via upload

Signed-off-by: prernaadev01 <[email protected]>

* Update readme.md of Rice Cultivation

Signed-off-by: prernaadev01 <[email protected]>

* GITBOOK-180: Indexer User Guide added

* GITBOOK-181: Added Roles & Permissions section

* GITBOOK-182: corrected docs

* fix session response
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* fix session response
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* remove unnesessary cache
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

* remove unnesessary cache
Signed-off-by: simvalery <[email protected]>

Signed-off-by: simvalery <[email protected]>

---------

Signed-off-by: artembuslaev <[email protected]>
Signed-off-by: Alexander Pyatakov <[email protected]>
Signed-off-by: Artem Buslaev <[email protected]>
Signed-off-by: simvalery <[email protected]>
Signed-off-by: Stepan Kiryakov <[email protected]>
Signed-off-by: Ihar Tsykala <[email protected]>
Signed-off-by: prernaadev01 <[email protected]>
Co-authored-by: Celiant <[email protected]>
Co-authored-by: artembuslaev <[email protected]>
Co-authored-by: Alexander Pyatakov <[email protected]>
Co-authored-by: prernaa.agarwal <[email protected]>
Co-authored-by: Ihar <[email protected]>
Co-authored-by: Stepan Kiryakov <[email protected]>
Co-authored-by: envision-ci-agent <[email protected]>
Co-authored-by: Ihar Tsykala <[email protected]>
  • Loading branch information
9 people authored May 31, 2024
1 parent e686639 commit 5f03f0c
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
10 changes: 5 additions & 5 deletions api-gateway/src/api/service/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ import { Permissions, PolicyType, SchemaEntity, UserRole } from '@guardian/inter
import { ClientProxy } from '@nestjs/microservices';
import { Body, Controller, Get, Headers, HttpCode, HttpException, HttpStatus, Inject, Post, Req } from '@nestjs/common';
import { ApiBearerAuth, ApiExtraModels, ApiInternalServerErrorResponse, ApiOkResponse, ApiOperation, ApiTags } from '@nestjs/swagger';
import { AccountsResponseDTO, AccountsSessionResponseDTO, AggregatedDTOItem, BalanceResponseDTO, LoginUserDTO, RegisterUserDTO, InternalServerErrorDTO } from '#middlewares';
import { AuthUser, checkPermission, Auth } from '#auth';
import { Users, PolicyEngine, Guardians, UseCache, InternalException, EntityOwner } from '#helpers';
import { AccountsResponseDTO, AccountsSessionResponseDTO, AggregatedDTOItem, BalanceResponseDTO, InternalServerErrorDTO, LoginUserDTO, RegisterUserDTO } from '#middlewares';
import { Auth, AuthUser, checkPermission } from '#auth';
import { EntityOwner, Guardians, InternalException, PolicyEngine, UseCache, Users } from '#helpers';
import { PolicyListResponse } from '../../entities/policy.js';
import { StandardRegistryAccountResponse } from '../../entities/account.js';
import { ApplicationEnvironment } from '../../environment.js';
Expand Down Expand Up @@ -231,7 +231,7 @@ export class AccountApi {
type: InternalServerErrorDTO,
})
@ApiExtraModels(AccountsResponseDTO, InternalServerErrorDTO)
@UseCache()
// @UseCache()
@HttpCode(HttpStatus.OK)
async getStandardRegistries(): Promise<any> {
try {
Expand Down Expand Up @@ -265,7 +265,7 @@ export class AccountApi {
type: InternalServerErrorDTO,
})
@ApiExtraModels(AggregatedDTOItem, InternalServerErrorDTO)
@UseCache()
// @UseCache()
@HttpCode(HttpStatus.OK)
async getAggregatedStandardRegistries(): Promise<any> {
const engineService = new PolicyEngine();
Expand Down
6 changes: 3 additions & 3 deletions api-gateway/src/api/service/demo.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { Controller, Get, HttpCode, HttpStatus } from '@nestjs/common';
import { ApiExtraModels, ApiInternalServerErrorResponse, ApiOkResponse, ApiOperation, ApiTags } from '@nestjs/swagger';
import { Permissions, TaskAction } from '@guardian/interfaces';
import { InternalServerErrorDTO, RegisteredUsersDTO, TaskDTO } from '#middlewares';
import { AuthUser, Auth } from '#auth';
import { ServiceError, NewTask, TaskManager, Users, Guardians, UseCache, InternalException } from '#helpers';
import { Auth, AuthUser } from '#auth';
import { Guardians, InternalException, NewTask, ServiceError, TaskManager, Users } from '#helpers';

@Controller('demo')
@ApiTags('demo')
Expand All @@ -26,7 +26,7 @@ export class DemoApi {
type: InternalServerErrorDTO
})
@ApiExtraModels(RegisteredUsersDTO, InternalServerErrorDTO)
@UseCache()
// @UseCache()
@HttpCode(HttpStatus.OK)
async registeredUsers(): Promise<RegisteredUsersDTO> {
const users = new Users();
Expand Down
7 changes: 4 additions & 3 deletions auth-service/src/api/account-service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { DataBaseHelper, Logger, MessageError, MessageResponse, NatsService, Pro
import {
AuditDefaultPermission,
AuthEvents,
OldRoles,
GenerateUUIDv4,
IGenerateTokenMessage,
IGenerateTokenResponse,
Expand All @@ -26,6 +25,7 @@ import {
IStandardRegistryUserResponse,
IUpdateUserMessage,
IUser,
OldRoles,
SRDefaultPermission,
UserDefaultPermission,
UserRole
Expand Down Expand Up @@ -125,14 +125,15 @@ export class AccountService extends NatsService {
}

const user = await new DataBaseHelper(User).findOne({ username: decryptedToken.username });
const puser = setDefaultPermissions(user)

const userRequiredProps = {}

for (const prop of Object.values(USER_REQUIRED_PROPS)) {
userRequiredProps[prop] = user[prop];
userRequiredProps[prop] = puser[prop];
}

return new MessageResponse(setDefaultPermissions(user));
return new MessageResponse(userRequiredProps);
} catch (error) {
return new MessageError(error);
}
Expand Down
2 changes: 2 additions & 0 deletions auth-service/src/constants/user.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@ export const REQUIRED_PROPS = {
HEDERA_ACCOUNT_ID: 'hederaAccountId',
ROLE: 'role',
ID: 'id',
PERMISSIONS: 'permissions',
PERMISSION_GROUP: 'permissionsGroup'
};

0 comments on commit 5f03f0c

Please sign in to comment.