GithubHelp home page GithubHelp logo

terraform-ibm-modules / terraform-ibm-cbr Goto Github PK

View Code? Open in Web Editor NEW
0.0 0.0 2.0 774 KB

This module can be used to provision and configure Context Based Restrictions.

License: Apache License 2.0

HCL 82.56% Go 17.44%
cbr context-based-restrictions core-team graduated ibm-cloud supported terraform terraform-module

terraform-ibm-cbr's People

Contributors

aashiq-j avatar aayush-abhyarthi avatar ak-sky avatar akocbek avatar daniel-butler-irl avatar iamar7 avatar jojustin avatar jor2 avatar khuzaima05 avatar kierramarie avatar marifse avatar mounika-nalla avatar ocofaigh avatar rajatagarwal-ibm avatar shemau avatar sirspidey avatar terraform-ibm-modules-ops avatar vburckhardt avatar

Watchers

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

terraform-ibm-cbr's Issues

Update the cbr submodules with the latest serviceRefs and serviceRefs which now supports regionality.

CBR has recently been supporting the existing serviceRef with regions which is currently being omitted here -

validate_location_and_service_name = ((contains(["compliance", "directlink", "iam-groups", "containers-kubernetes", "user-management"], var.zone_service_ref_list)) && var.location != null) ? tobool("Error: The services 'compliance','directlink','iam-groups','containers-kubernetes','user-management' does not support location") : true

and
location = (service_ref == "compliance" || service_ref == "directlink" || service_ref == "iam-groups" || service_ref == "user-management" || service_ref == "containers-kubernetes") ? null : var.location

As per this API List available service reference targets response, now compliance and containers-kubernetes also supports regionality.

Need to Update these serviceRef in location condtion- Total CBR serviceRef NOT supporting locations count: 4 values: ["directlink","globalcatalog-collection","iam-groups","user-management"]

Adjust multi-service-profile example

Description

Couple of issues with this example:

  • The README.md is not fully accurate. It refers to "the module's default variable values" which is not fully accurate. Also it actually demonstrates the submodule https://github.com/terraform-ibm-modules/terraform-ibm-cbr/tree/main/cbr-service-profile
  • The CBR topology that is creates, which working, does not really makes sense in a real world scenario.
    • The current topology creates 3 rules (object storage, message hub, kms) and for each of those rules, it adds as a zone a VPC + 2 services (direct link and intrastructure services). I do not think of any real world scenario where direct link would need to be able to access to object storage, message hub or kms in this account.
  • I'd suggest aligning the example on the actual flow that exists in landing zone / fscloud topology - eg:
    image

New or affected modules


By submitting this issue, you agree to follow our Code of Conduct

How to manage locations for each serivceRef while creating zone.

  • Now the location feature is also added in the CBR UI while creating zones for each serviceRef.
  • As the option to set location for each serviceRef is at more granular level like geo/country/metro locations, how are we going to handle this in a module for each service?
  • As we have only one location variable to set for each service and there now might be the case where this location value may not support for every service.
  • Below is the list of services and total supporting locations-
Total locations supporting for each ServiceRef:   {
  "apprapp": 12,
  "cloud-object-storage": 32,
  "cloudantnosqldb": 33,
  "codeengine": 25,
  "compliance": 17,
  "containers-kubernetes": 25,
  "databases-for-cassandra": 27,
  "databases-for-elasticsearch": 27,
  "databases-for-enterprisedb": 27,
  "databases-for-etcd": 27,
  "databases-for-mongodb": 27,
  "databases-for-mysql": 27,
  "databases-for-postgresql": 27,
  "databases-for-redis": 27,
  "event-notifications": 16,
  "is": 24,
  "logdna": 27,
  "logdnaat": 27,
  "messagehub": 25,
  "messages-for-rabbitmq": 27,
  "schematics": 12,
  "secrets-manager": 25,
  "server-protect": 24,
  "sysdig-monitor": 25,
  "sysdig-secure": 25,
  "toolchain": 25
}

Dynamic Blocks In Rules Are Hardcoded to The First Value

Affected modules

*terraform-ibm-cbr

Expected behavior

If multiple contexts, resources or operations are provided they should all be added to the rule

Actual behavior

If multiple contexts, resources or operations are provided only the first value is added to the rule

Steps to reproduce (including links and screen captures)

  1. Run terraform apply

Anything else


By submitting this issue, you agree to follow our Code of Conduct

cbr profile is only applied to private end-point

By default, this should apply to all endpoint, not only private one.

The current configuration would results in public access not being subject to CBR rule. (update: there is an implicit deny all by default on the endpoints that do not have any zone assigned when another endpoint is assigned a zone. Exception today is with the ICD service but this was confirmed as a bug)

Remove public default context set to 1.1.1.1

Description

This should not longer be needed to force the implicit deny all on an interface. All Cloud services now have this implicit deny.
This context is also being flagged up by SCC in recent release, creating some noise in audit reports.

fscloud module: create global 'deny' rule when more narrow scoped rules are created by the module

Description

2 related aspects in this ticket:

  1. Add the ability to scope a rule per region (in addition to the existing instance_id, resourcegroup, tags)
  2. When a scope is specified in a rule, get the fscloud module to also create a global 'deny' all rule for the service (using the 1.1.1.1 context). In other words, create 2 rules, a global one and a scoped one. There should be a flag to opt out of this behavior by service (or more exactly by pseudo service to take account of the 2 pseudo services management and cluster for kube)

Context:


By submitting this issue, you agree to follow our Code of Conduct

Add support for hpcs

Description

HPCS now supports CBRs, so support should be added.

In the fscloud module, there should be an extra variable kms allowing the consumer to specify whether to add pre wired rules for hpcs, key protect or both. This approach reduces the number of extra boolean variables.

pre-wired rule for cos (private endpoint)

Currently:

"cloud-object-storage" : [{
  endpointType : "direct",
  networkZoneIds : flatten([
    var.allow_vpcs_to_cos ? [local.cbr_zone_vpcs.zone_id] : [],
    var.allow_at_to_cos ? [local.logdnaat_cbr_zone_id] : [],
    var.allow_is_to_cos ? [local.is_cbr_zone_id] : []
  ])

However, AT and IS would access COS through the private endpoint - so there should be an update to have the private endpoint for at and is. direct should only be for VPC.

Adjust cardinality of zone creation cbr-service-profile

Description

Based on early consumer inputs on the cbr-service-profile, it would be desirable to create one zone per service, as opposed to grouping multiple services in one zone.

Concretely, taking the existing example at

- this results in creating one service zone with "directlink", "is" as services source. Instead, the desire is to create 2 CBR zones - one zone with is, and one zone with direct link.

fscloud: is -> cos is missing?

Error in logs:
๏ƒ˜ Failed to write Flow Log file for the past 24 hours. Dropping flow log for Virtual Server ...

Flow logs writes to COS. Suggest to try adding is-> cos flow in the rule and see if reproducable.

Expand documentation around the cbr-service-profile sub-module

Description

Pre-wired CBR configuration for fs cloud

Description

Add a submodule (under fscloud directory to follow conventions created from other module) that utilize the submodule https://github.com/terraform-ibm-modules/terraform-ibm-cbr/tree/main/cbr-service-profile to create pre-defined CBR rules needed by the services specified in the FsCloud architecture patterns :
COS -> KMS
Block storage -> KMS
ROKS -> KMS
Activity Tracker route -> COS
VPCs -> container registry
VPCs -> where clusters are deployed -> COS

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.