mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-27 22:00:05 +00:00
Compare commits
23
Commits
@@ -50,4 +50,4 @@ charts:
|
|||||||
- name: replicaCount
|
- name: replicaCount
|
||||||
value: 1
|
value: 1
|
||||||
- name: maestro.restricted_ip
|
- name: maestro.restricted_ip
|
||||||
value: "177.52.172.0/24,57.151.113.140/30"
|
value: "177.52.172.0/24,189.84.160.157/32,186.237.171.146/32,57.151.113.140/30"
|
||||||
|
|||||||
Vendored
-8
@@ -1,8 +0,0 @@
|
|||||||
import 'express-session';
|
|
||||||
|
|
||||||
declare module 'express-session' {
|
|
||||||
interface SessionData {
|
|
||||||
state: string | undefined;
|
|
||||||
code_verifier: string | undefined;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -99,6 +99,7 @@ describe('authentication.guard', () => {
|
|||||||
customer_id: '9d18e8ae-24b9-41a3-9e8f-a25ce57555b11',
|
customer_id: '9d18e8ae-24b9-41a3-9e8f-a25ce57555b11',
|
||||||
customer_name: 'dadosfera',
|
customer_name: 'dadosfera',
|
||||||
customer_tier: 'BASIC',
|
customer_tier: 'BASIC',
|
||||||
|
customer_modules: []
|
||||||
};
|
};
|
||||||
|
|
||||||
beforeAll(async () => {
|
beforeAll(async () => {
|
||||||
|
|||||||
@@ -143,10 +143,10 @@ export class AuthenticationGuard
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Bloquear o customer de acesso o maestro publico
|
// Bloquear o customer de acesso o maestro publico
|
||||||
// const hasNetworkPolicyModule = accessTokenPayload.customer_modules.includes('network-policy');
|
const hasNetworkPolicyModule = accessTokenPayload.customer_modules.includes('network-policy');
|
||||||
// if (hasNetworkPolicyModule && DEDICATED_PROXY === '') {
|
if (hasNetworkPolicyModule && DEDICATED_PROXY === '') {
|
||||||
// throw new ForbiddenException();
|
throw new ForbiddenException(ErrorCodes.AUTH.FORBIDDEN);
|
||||||
// }
|
}
|
||||||
|
|
||||||
request.accessTokenPayload = accessTokenPayload;
|
request.accessTokenPayload = accessTokenPayload;
|
||||||
request.user = {
|
request.user = {
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ describe('user.decorator', () => {
|
|||||||
customer_id: '9d18e8ae-24b9-41a3-9e8f-a25ce57555b11',
|
customer_id: '9d18e8ae-24b9-41a3-9e8f-a25ce57555b11',
|
||||||
customer_name: 'dadosfera',
|
customer_name: 'dadosfera',
|
||||||
customer_tier: 'BASIC',
|
customer_tier: 'BASIC',
|
||||||
|
customer_modules: [],
|
||||||
access_token: '',
|
access_token: '',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -9,7 +9,7 @@ import { AppModule } from './app.module';
|
|||||||
import { writeFileSync } from 'fs';
|
import { writeFileSync } from 'fs';
|
||||||
import { execSync } from 'child_process';
|
import { execSync } from 'child_process';
|
||||||
import { INestApplication } from '@nestjs/common';
|
import { INestApplication } from '@nestjs/common';
|
||||||
import session from 'express-session';
|
|
||||||
async function bootstrap() {
|
async function bootstrap() {
|
||||||
DadosferaLogger.setupLogger({
|
DadosferaLogger.setupLogger({
|
||||||
serviceName: 'maestro',
|
serviceName: 'maestro',
|
||||||
@@ -28,7 +28,7 @@ async function bootstrap() {
|
|||||||
});
|
});
|
||||||
app.use(helmet());
|
app.use(helmet());
|
||||||
|
|
||||||
if (process.env.ENV !== 'local') {
|
if (process.env.ENV === 'prd') {
|
||||||
app.use('/catalog/register-dataset', json({ limit: '10mb' }));
|
app.use('/catalog/register-dataset', json({ limit: '10mb' }));
|
||||||
app.use('/catalog/register-dataset', urlencoded({ extended: true, limit: '10mb' }));
|
app.use('/catalog/register-dataset', urlencoded({ extended: true, limit: '10mb' }));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,6 +8,17 @@ import { RolesModule } from '../roles/roles.module';
|
|||||||
import { PermissionsModule } from '../permissions/permissions.module';
|
import { PermissionsModule } from '../permissions/permissions.module';
|
||||||
|
|
||||||
// const client = new DucClient();
|
// const client = new DucClient();
|
||||||
|
jest.mock('puppeteer', () => ({
|
||||||
|
launch: jest.fn().mockResolvedValue({
|
||||||
|
newPage: jest.fn().mockResolvedValue({
|
||||||
|
goto: jest.fn(),
|
||||||
|
evaluate: jest.fn(),
|
||||||
|
close: jest.fn()
|
||||||
|
}),
|
||||||
|
close: jest.fn()
|
||||||
|
})
|
||||||
|
}));
|
||||||
|
|
||||||
|
|
||||||
const logger = {
|
const logger = {
|
||||||
info: (...args) => args,
|
info: (...args) => args,
|
||||||
|
|||||||
@@ -9,6 +9,17 @@ import { PermissionsModule } from '../permissions/permissions.module';
|
|||||||
|
|
||||||
// const client = new DucClient();
|
// const client = new DucClient();
|
||||||
|
|
||||||
|
jest.mock('puppeteer', () => ({
|
||||||
|
launch: jest.fn().mockResolvedValue({
|
||||||
|
newPage: jest.fn().mockResolvedValue({
|
||||||
|
goto: jest.fn(),
|
||||||
|
evaluate: jest.fn(),
|
||||||
|
close: jest.fn()
|
||||||
|
}),
|
||||||
|
close: jest.fn()
|
||||||
|
})
|
||||||
|
}));
|
||||||
|
|
||||||
const logger = {
|
const logger = {
|
||||||
info: (...args) => args,
|
info: (...args) => args,
|
||||||
error: (...args) => args,
|
error: (...args) => args,
|
||||||
|
|||||||
Reference in New Issue
Block a user