Skip to content

Commit

Permalink
Add whoisxml api key variable
Browse files Browse the repository at this point in the history
  • Loading branch information
aloftus23 committed Nov 7, 2024
1 parent 62c99ef commit 89a8d9a
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 5 deletions.
4 changes: 2 additions & 2 deletions backend/serverless.yml
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ resources:
VisibilityTimeout: 18000 # 5 hours
MaximumMessageSize: 262144 # 256 KB
MessageRetentionPeriod: 604800 # 7 days
ASMQueue:
ASMSyncQueue:
Type: AWS::SQS::Queue
Properties:
QueueName: ${self:provider.stage}-asm-queue
QueueName: ${self:provider.stage}-asmSync-queue
VisibilityTimeout: 18000 # 5 hours
MaximumMessageSize: 262144 # 256 KB
MessageRetentionPeriod: 604800 # 7 days
Expand Down
3 changes: 2 additions & 1 deletion backend/src/tasks/scanExecution.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,8 @@ async function startLocalContainers(
`SERVICE_TYPE=${scanType}`,
`PE_API_URL=${process.env.PE_API_URL}`,
`PE_API_KEY=${process.env.PE_API_KEY}`,
`CF_API_KEY=${process.env.CF_API_KEY}`
`CF_API_KEY=${process.env.CF_API_KEY}`,
`WHOIS_XML_KEY=${process.env.WHOIS_XML_KEY}`
]
} as any);
await container.start();
Expand Down
2 changes: 1 addition & 1 deletion backend/worker/generate_config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ client_id=${SIXGILL_CLIENT_ID}
client_secret=${SIXGILL_CLIENT_SECRET}
[whoisxml]
key=
key=${WHOIS_XML_KEY}
[intelx]
api_key=${INTELX_API_KEY}
Expand Down
2 changes: 2 additions & 0 deletions dev.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,5 @@ PE_SHODAN_API_KEYS=

PE_FARGATE_CLUSTER_NAME=pe-staging-worker
PE_FARGATE_TASK_DEFINITION_NAME=pe-staging-worker

WHOIS_XML_KEY=change_me
6 changes: 5 additions & 1 deletion infrastructure/pe_worker.tf
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,11 @@ resource "aws_ecs_task_definition" "pe_worker" {
{
"name": "ELASTICSEARCH_ENDPOINT",
"valueFrom": "${aws_ssm_parameter.es_endpoint.arn}"
}
},
{
"name": "WHOIS_XML_KEY",
"valueFrom": "${aws_ssm_parameter.whoisxml_api_key.arn}"
},
]
}
]
Expand Down
1 change: 1 addition & 0 deletions infrastructure/stage.tfvars
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ ssm_lg_api_key = "/crossfeed/staging/LG_API_KEY"
ssm_lg_workspace_name = "/crossfeed/staging/LG_WORKSPACE_NAME"
ssm_pe_api_key = "/crossfeed/staging/PE_API_KEY"
ssm_cf_api_key = "/crossfeed/staging/CF_API_KEY"
ssm_whoisxml_api_key = "/crossfeed/staging/WHOIS_XML_KEY"
db_group_name = "crossfeed-staging-db-group"
worker_ecs_repository_name = "crossfeed-staging-worker"
worker_ecs_cluster_name = "crossfeed-staging-worker"
Expand Down
6 changes: 6 additions & 0 deletions infrastructure/vars.tf
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,12 @@ variable "ssm_xpanse_api_key" {
default = "/crossfeed/staging/XPANSE_API_KEY"
}

variable "ssm_whoisxml_api_key" {
description = "ssm_whoisxml_api_key"
type = string
default = "/crossfeed/staging/WHOIS_XML_KEY"
}

variable "ssm_xpanse_auth_id" {
description = "ssm_xpanse_auth_id"
type = string
Expand Down
3 changes: 3 additions & 0 deletions infrastructure/worker.tf
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,7 @@ resource "aws_iam_role_policy" "worker_task_execution_role_policy" {
"${data.aws_ssm_parameter.intelx_api_key.arn}",
"${data.aws_ssm_parameter.xpanse_api_key.arn}",
"${data.aws_ssm_parameter.xpanse_auth_id.arn}",
"${data.aws_ssm_parameter.whoisxml_api_key.arn}",
"${data.aws_ssm_parameter.sixgill_client_secret.arn}",
"${data.aws_ssm_parameter.lg_api_key.arn}",
"${data.aws_ssm_parameter.lg_workspace_name.arn}",
Expand Down Expand Up @@ -386,6 +387,8 @@ data "aws_ssm_parameter" "intelx_api_key" { name = var.ssm_intelx_api_key }

data "aws_ssm_parameter" "xpanse_api_key" { name = var.ssm_xpanse_api_key }

data "aws_ssm_parameter" "whoisxml_api_key" { name = var.ssm_whoisxml_api_key }

data "aws_ssm_parameter" "xpanse_auth_id" { name = var.ssm_xpanse_auth_id }

data "aws_ssm_parameter" "sixgill_client_secret" { name = var.ssm_sixgill_client_secret }
Expand Down

0 comments on commit 89a8d9a

Please sign in to comment.