Coder Social home page Coder Social logo

qinetiq-cyber-intelligence / opencti-terraform Goto Github PK

View Code? Open in Web Editor NEW
25.0 4.0 5.0 283 KB

A highly available AWS deployment of the Threat Intelligence platform, OpenCTI using Terraform. Native AWS resources are used where feasible.

License: Apache License 2.0

HCL 97.69% Python 2.31%
aws cyber-security opencti opencti-connector terraform threat-intelligence

opencti-terraform's People

Contributors

readyelbow avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

opencti-terraform's Issues

Error creating OpenSearch domain: ValidationException: The StartAt time you provided occurs in the past.

Hello,

I am running into an issue as seen below. It looks like time_static only runs once, so subsequent deployment attempts cause an error.

Error: Error creating OpenSearch domain: ValidationException: The StartAt time you provided occurs in the past. Specify a time in the future.
│ 
│   with module.opensearch.aws_opensearch_domain.this,
│   on modules/opensearch/main.tf line 8, in resource "aws_opensearch_domain" "this":
│    8: resource "aws_opensearch_domain" "this" {

Load balancing - Question

This is really awesome work. The solution looks very slick. I can't use AWS however, I have to stick in Azure.

Can I ask how you are doing your load balancing? Specifically from the connectors to the OpenCTI frontend. I find with my current set up The front-end slows down and the RabbitMQ management portal show's that my consumer capacity is at 0% most of the time. I believe the GraphQL API is what's bottlenecking the system. I think replicating the OpenCTI front end will fix this but I am unsure how to load balance if I replicate the service.

Leaking credentials into terraform state

First of very nice deployment I am sure this will become a great starting point for people wanting to deploy their own instances.
I am aware the below describe issue is very nit picky, but this config is very well made and great contribution to the community so I want to help improve it even if its just a tiny thing.

When I went over your code I noticed that you are leaking credentials into terraform state in some places, most notably the opencti master password. Having the credentials in the terraform state introduces a few additional security risks e.g.,

  • read permissions to the state file/bucket become will give access to all the secrets leaked into the state
  • if used with a CI/CD pipeline anyone who can trigger a terraform plan is able to leak the secrets (see example below)
data "http" "example" {
  url = "http://localhost:8888/${var.test}"
}

variable "test" {
 default = "foobar"
 sensitive = true
}
$ terraform plan

No changes. Your infrastructure matches the configuration.

Terraform has compared your real infrastructure against your configuration and found no
differences, so no changes are needed.
$ python3 -m http.server 8888
Serving HTTP on :: port 8888 (http://[::]:8888/) ...
::1 - - [19/Aug/2022 08:50:19] code 404, message File not found
::1 - - [19/Aug/2022 08:50:19] "GET /foobar HTTP/1.1" 404 -

Since this is not supposed to be a production ready deployment this is not an issue per say, but it might be worth mentioning this in the documentation so that people less familiar with terraform will be aware and modify the code accordingly when preparing for a production configuration.

Failed on terraform apply steps

Steps to produce:

  • clone repo: gh repo clone QinetiQ-Cyber-Intelligence/OpenCTI-Terraform
  • terraform apply -var-file=config/dev/variables.tfvars
╷
│ Error: creating KMS Key: MalformedPolicyDocumentException: Policy contains a statement with one or more invalid principals.
│ 
│   with module.kms.aws_kms_key.this,
│   on modules/kms/main.tf line 87, in resource "aws_kms_key" "this":
│   87: resource "aws_kms_key" "this" {
│ 
╵
╷
│ Error: creating KMS Key: MalformedPolicyDocumentException: Policy contains a statement with one or more invalid principals.
│ 
│   with module.kms.aws_kms_key.connector,
│   on modules/kms/main.tf line 103, in resource "aws_kms_key" "connector":
│  103: resource "aws_kms_key" "connector" {
│ 
╵

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.