Compare commits

...
Author SHA1 Message Date
Marcos Rodrigues 576fdecf89 FIX: ci to oracle github worker 2025-11-25 11:27:04 -03:00
Marcos Rodrigues 5e90950660 FIX: restore whitelist annotation 2025-11-25 10:59:06 -03:00
Marcos Rodrigues 3ed26e648f FIX: ci 2025-11-25 10:48:06 -03:00
Marcos Rodrigues 19e4daeea4 FIX: private ingress annotations 2025-11-25 10:35:08 -03:00
Marcos Rodrigues Silva 7f58dc7090 Merge pull request #385 from dadosfera/hotfix/import-files
FIX: permissions
2025-10-22 18:35:35 -03:00
Marcos Rodrigues 43aa379c06 FIX: permissions 2025-10-22 18:29:43 -03:00
4 changed files with 19 additions and 27 deletions
+3 -3
View File
@@ -56,9 +56,9 @@ jobs:
- name: Install Helmfile - name: Install Helmfile
run: | run: |
wget https://github.com/helmfile/helmfile/releases/download/v0.148.0/helmfile_0.148.0_linux_amd64.tar.gz curl -fsSLO https://github.com/helmfile/helmfile/releases/download/v0.148.0/helmfile_0.148.0_linux_amd64.tar.gz
tar -xzf helmfile_0.148.0_linux_amd64.tar.gz tar -xzf helmfile_0.148.0_linux_amd64.tar.gz
mv helmfile /usr/local/bin/ sudo mv helmfile /usr/local/bin/
helmfile --version helmfile --version
- name: Install Helm Diff Plugin - name: Install Helm Diff Plugin
@@ -105,7 +105,7 @@ jobs:
- name: Install Helmfile - name: Install Helmfile
run: | run: |
wget https://github.com/helmfile/helmfile/releases/download/v0.148.0/helmfile_0.148.0_linux_amd64.tar.gz curl -fsSLO https://github.com/helmfile/helmfile/releases/download/v0.148.0/helmfile_0.148.0_linux_amd64.tar.gz
tar -xzf helmfile_0.148.0_linux_amd64.tar.gz tar -xzf helmfile_0.148.0_linux_amd64.tar.gz
sudo mv helmfile /usr/local/bin/ sudo mv helmfile /usr/local/bin/
helmfile --version helmfile --version
@@ -4,9 +4,18 @@ metadata:
annotations: annotations:
nginx.ingress.kubernetes.io/whitelist-source-range: "69.49.241.121/32" # hostgator ip nginx.ingress.kubernetes.io/whitelist-source-range: "69.49.241.121/32" # hostgator ip
nginx.ingress.kubernetes.io/proxy-body-size: "0" nginx.ingress.kubernetes.io/proxy-body-size: "0"
nginx.ingress.kubernetes.io/proxy-read-timeout: "300"
nginx.ingress.kubernetes.io/proxy-connect-timeout: "300"
nginx.ingress.kubernetes.io/proxy-send-timeout: "300"
nginx.ingress.kubernetes.io/server-snippet: | nginx.ingress.kubernetes.io/server-snippet: |
underscores_in_headers on; underscores_in_headers on;
ignore_invalid_headers on; ignore_invalid_headers on;
nginx.ingress.kubernetes.io/proxy-buffer-size: "16k"
nginx.ingress.kubernetes.io/proxy-buffers-number: "8"
nginx.ingress.kubernetes.io/proxy-busy-buffers-size: "64k"
{{- if .Values.maestro.restricted_ip}}
nginx.ingress.kubernetes.io/whitelist-source-range: {{ .Values.maestro.restricted_ip }}
{{- end }}
generation: 1 generation: 1
labels: labels:
+3 -20
View File
@@ -3,6 +3,7 @@ import { ApiOperation, ApiTags } from '@nestjs/swagger';
import { import {
AuthenticateCondition, AuthenticateCondition,
Authenticated, Authenticated,
RequireSomePermission,
} from 'src/decorators/authentication.decorator'; } from 'src/decorators/authentication.decorator';
import { PERMISSIONS_GROUPS } from '../../authentication/permissions.enum'; import { PERMISSIONS_GROUPS } from '../../authentication/permissions.enum';
import { PipelinesService } from './pipelines.service'; import { PipelinesService } from './pipelines.service';
@@ -13,26 +14,6 @@ import { ApiInternalOnlyController } from 'src/decorators/swagger.decorator';
@ApiTags('Pipelines') @ApiTags('Pipelines')
@Controller('pipelines') @Controller('pipelines')
@Authenticated() @Authenticated()
@AuthenticateCondition((req, user) => {
let action;
switch (req.method) {
case 'POST':
action = 'CREATE';
break;
case 'PUT':
action = 'UPDATE';
break;
default:
action = req.method;
}
return user.permissions.includes(
PERMISSIONS_GROUPS.PIPELINE.permissions[action].seqid,
);
})
export class PipelinesController { export class PipelinesController {
logger: DadosferaLogger; logger: DadosferaLogger;
constructor( constructor(
@@ -44,6 +25,7 @@ export class PipelinesController {
} }
@Post('start/:id') @Post('start/:id')
@RequireSomePermission(PERMISSIONS_GROUPS.PIPELINE.permissions.CREATE)
@ApiOperation({ @ApiOperation({
deprecated: true, deprecated: true,
description: description:
@@ -71,6 +53,7 @@ export class PipelinesController {
description: description:
'This method is deprecated. Please use route /pipelinesV2/:id/status instead', 'This method is deprecated. Please use route /pipelinesV2/:id/status instead',
}) })
@RequireSomePermission(PERMISSIONS_GROUPS.IMPORT_FILES.permissions.VIEW, PERMISSIONS_GROUPS.PIPELINE.permissions.GET)
async getPipelineStatus(@Body() body, @Param('id') id: string) { async getPipelineStatus(@Body() body, @Param('id') id: string) {
body.id = id; body.id = id;
@@ -161,7 +161,7 @@ export class PipelinesController {
} }
@Get(':id/config') @Get(':id/config')
@RequireSomePermission(PERMISSIONS_GROUPS.PIPELINE.permissions.GET) @RequireSomePermission(PERMISSIONS_GROUPS.IMPORT_FILES.permissions.VIEW,PERMISSIONS_GROUPS.PIPELINE.permissions.GET)
async getPipelineproperties( async getPipelineproperties(
@Language() language: LanguageEnum, @Language() language: LanguageEnum,
@User() user: RequestUser, @User() user: RequestUser,
@@ -185,7 +185,7 @@ export class PipelinesController {
} }
@Get(':id/status') @Get(':id/status')
@RequireSomePermission(PERMISSIONS_GROUPS.PIPELINE.permissions.GET) @RequireSomePermission(PERMISSIONS_GROUPS.IMPORT_FILES.permissions.VIEW, PERMISSIONS_GROUPS.PIPELINE.permissions.GET)
async getPipelineStatus(@Body() body, @Param('id') id: string) { async getPipelineStatus(@Body() body, @Param('id') id: string) {
body.id = id; body.id = id;
@@ -200,7 +200,7 @@ export class PipelinesController {
} }
@Get('/:id') @Get('/:id')
@RequireSomePermission(PERMISSIONS_GROUPS.PIPELINE.permissions.GET) @RequireSomePermission(PERMISSIONS_GROUPS.IMPORT_FILES.permissions.VIEW, PERMISSIONS_GROUPS.PIPELINE.permissions.GET)
async findOne( async findOne(
@Language() language: LanguageEnum, @Language() language: LanguageEnum,
@User() user: RequestUser, @User() user: RequestUser,
@@ -283,7 +283,7 @@ export class PipelinesController {
deprecated: true, deprecated: true,
description: 'This method is deprecated. Please use PATCH instead', description: 'This method is deprecated. Please use PATCH instead',
}) })
@RequireSomePermission(PERMISSIONS_GROUPS.PIPELINE.permissions.UPDATE) @RequireSomePermission(PERMISSIONS_GROUPS.IMPORT_FILES.permissions.VIEW, PERMISSIONS_GROUPS.PIPELINE.permissions.UPDATE)
async updateDeprecated( async updateDeprecated(
@Language() language: LanguageEnum, @Language() language: LanguageEnum,
@Body() updatePipelineDto, @Body() updatePipelineDto,