Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Security Group] No Source Address configuration makes security rules to VMs #355

Closed
powerkimhub opened this issue Apr 29, 2021 · 9 comments
Assignees
Labels
CloudDriver enhancement New feature or request

Comments

@powerkimhub
Copy link
Member

What would you like to be enhanced

  • Access control of Security Group about VM

Why is this needed

  • issued by @cloud-barista/cb-tumblebug-maintainer
  • Can not setup accessible source or destination address to the VMs

Proposed solution

  • Add source or destination address CIDR features to Security Rules.
@powerkimhub powerkimhub added the enhancement New feature or request label Apr 29, 2021
@powerkimhub powerkimhub self-assigned this Apr 29, 2021
@powerkimhub
Copy link
Member Author

[Plan]

  • Add a address CIDR attributes of SecurityRules in SecurityHandler
  • Task Scope: Driver Common Interface, All Drivers, API, CLI, AdminWeb, ...

@powerkimhub
Copy link
Member Author

powerkimhub commented May 17, 2021

@dev4unet @hyokyungk @innodreamer @jmleefree

개요

  • 부득이 전체 port 개방으로 VM 운영 중 이상한 process가 실행된 사례가 있음

  • 24H, WIP 환경 등에서 개방된 API를 통한 무차별 공격 가능성에 불안함

  • 해결 방안 중 하나는 Inbound source로 허용 IP 및 대역을 설정하는 것임.

  • 그러나, 현재 Spider는 source 설정을 제공하지 않음.

  • 이에 시급히 Inbonud의 source, Outbound의 destination 정보 설정을 제공하고자 합니다.

  • 대상: 전체 Cloud Driver

  • 설정 정보: IP CIDR Block

  • 설정 값 예시)

    • IPv4 설정: 0.0.0.0/0, 0.0.0.0/8, 0.0.0.0/16, 0.0.0.0/24, 0.0.0.0/32
    • IPv6 설정: ::/0, ::/8, ::/16, ::/24, ::/32

개발 가이드

  • SecurityHandler.go의 SecurityRuleInfo 구조체를 다음과 같이 개선하였습니다.
  • 추가되는 API는 없습니다.
  • Inbound Source 및 Outbound Destination에 대한 CIDR 설정을 내려 보내주시기 바랍니다.
  • 각 Cloud Driver SecurityHandler 반영 부탁드립니다.

[AS-IS]

type SecurityRuleInfo struct {
          FromPort   string
          ToPort     string
          IPProtocol string
          Direction  string
}

[TO-BE]

type SecurityRuleInfo struct {
          FromPort   string
          ToPort     string
          IPProtocol string
          Direction  string
          CIDR  string
}

working process

1. add to driver interface
2. add to all drivers
3. add to common service function
4. add to REST API and WebAdmin Tool
5. add to gRPC API
6. add to CLI
7. test


=============== 현황 분석: AWS / Azure / GCP / Alibaba, 그 외 CSP 분석 생략

AWS

image

  • 참고: Console

image

image

Azure

  • Inboud, Outboud 둘다 Source, Destination을 설정

image

  • Inbound Source 설정 선택: CIDR 블록, Service Tag, Application security group

image

image

image

image

  • Inbound Destination 설정 선택: CIDR, virtualNetwork, Application security group

image

image

image

image

  • Outbound Source 설정 선택: CIDR, virtualNetwork, Application security group
  • Outboud Destination 설정 선택: CIDR, Service Tab, Application security group

GCP

  • Inboud source 설정 선택: CIDR 블록, 소스 태그
  • Outboud: destination 설정 선택: CIDR 블록
  • Inbound Source

image

image

image

  • Outbound Destination

image

image

Alibaba

  • Inboud source 설정 선택: CIDR 블록, Security Groups
  • Outboud destination 설정 성택: CIDR 블록, Security Groups
  • Inbound Source

image

  • Outbound Destination

image

@powerkimhub
Copy link
Member Author

  • 이미지가 잘 안보이는 게 있네요.
  • 원본을 첨부하오니 필요시 참고하시기 바랍니다.

CSP별-SG설정정보-2021.04.22.docx

@powerkimhub
Copy link
Member Author

ref) #372

working process

1. add to driver interface
2. add to all drivers
3. add to common service function
4. add to REST API and WebAdmin Tool
5. add to gRPC API
6. add to CLI
7. test

  • Mock Driver: Pass

@powerkimhub
Copy link
Member Author

Cloud Driver Status

@innodreamer
Copy link
Member

innodreamer commented May 27, 2021

NCP driver에도 CIDR field가 반영되었습니다.
: https://github.com/cloud-barista/ncp/pull/29

@powerkimhub
Copy link
Member Author

v0.3.14 시험 결과 참고

@powerkimhub
Copy link
Member Author

@powerkimhub
Copy link
Member Author

  • CloudIt fixed: 8a9cb54
  • All Drivers Completed

@powerkimhub powerkimhub unpinned this issue Jun 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CloudDriver enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants