Giter Site home page Giter Site logo

cspm-engine's Introduction

프로젝트 소개

CSPM 이란?

CSPM은 Cloud Security Posture Management의 약자로 클라우드에서 존재하는 설정 값, 구성요소와 같은 상태에서 발생할 수 있는 보안적 위험사항들을 자동으로 찾아내고 관리해주는 시스템을 말합니다.

이러한 시스템은 아래와 같은 기업에서 이용할 수 있습니다.

  1. 온프레미스 환경에서 운영중인 서비스를 클라우드 환경으로 마이그레이션하려고 하는 기업.
  2. 기존에 클라우드 환경에서 운영중인 서비스의 인프라에 대해 보안성 점검 및 관리를 하고자 하는 기업.

기본적인 시스템의 구조는 아래 이미지와 같습니다.

1

이 프로젝트는 위 구조도에서 Engine Server에 해당합니다.

Engine Server

API List

Engine Server는 다음과 같은 API 항목을 제공합니다. (Swagger)

2 위 사진은 서버를 올린 http://[Engine-Server-IP]/swagger-ui/index.html 에서 확인 가능합니다.

GET /assessment-results

History Id, Resource Id, Result(Y, N, ?) 를 통해 점검 결과를 읽어옵니다.
(모든 파라미터는 생략할 수 있고, 추가된 파라미터를 조합해 필터링한 결과를 )

Request : [GET] http://127.0.0.1:10831/assessment-results/?historyId=ch4njun&result=Y
Response : [ { "accessKey": "string", "id": 0, "resourceId": "string", "resourceName": "string", "resourceType": "string", "service": "string", "tag": "string" } ]

GET /assessment-results/{id}

Id(Primary Key) 를 통해 하나의 점검 결과를 읽어옵니다.

Request : [GET] http://127.0.0.1:10831/assessment-results/12
Response : { "accessKey": "string", "id": 0, "resourceId": "string", "resourceName": "string", "resourceType": "string", "service": "string", "tag": "string" }

POST /assessment-results

Request Body를 통해 History Id, Access Key, Secret Key, Region, Services 를 전달해 해당 계정에 대한 클라우드 점검 스크립트를 동작시킵니다.

엔진 서버의 파일 시스템에 포함되어 있는 점검 스크립트를 동작시키며 점검 결과는 연결되어있는 Database에 저장합니다.

Request : [POST] http://127.0.0.1:10831/assessment-results
Request Body : { "accessKey": "string", "regionName": "string", "secretKey": "string" }
Response : { "accessKey": "string", "id": 0, "resourceId": "string", "resourceName": "string", "resourceType": "string", "service": "string", "tag": "string" }

PUT /assessment-results

이미 점검이 완료된 결과를 수정합니다. 인터뷰 항목에 대해서 사용자가 코멘트와 함께 수정할 때 해당 API를 이용해 Database에 있는 값을 수정할 수 있습니다.

Request : [POST] http://127.0.0.1:10831/assessment-results
Request Body : { "interview": true, "interviewContent": "string", "result": "string" }
Response : { "accessKey": "string", "id": 0, "resourceId": "string", "resourceName": "string", "resourceType": "string", "service": "string", "tag": "string" }

GET /histories/{historyId}

History Id를 통해 하나의 History 정보를 읽어옵니다.

Request : [GET] http://127.0.0.1:10831/histories/ch4njun
Response : { "historyId": "string", "status": "string" }

DELETE /histories

Request Body에 전달되는 History Id들을 삭제합니다. History Id를 삭제할 경우 해당 Id에 대한 점검결과(AssessmentResult)도 함께 삭제됩니다.

Request : [DELETE] http://127.0.0.1:10831/histories
Request Body : { "accessKeys": [ "string" ] }
Response : 200 OK

GET /resources

파라미터로 전달되는 AccessKey, Service(IAM, EC2, ...) 를 통해 리소스 목록을 읽어옵니다.
(파라미터 Service는 생략할 수 있습니다.)

Request : [GET] http://127.0.0.1:10831/resources?accessKey=ABCDEFG
Response : [ { "accessKey": "string", "id": 0, "resourceId": "string", "resourceName": "string", "resourceType": "string", "service": "string", "tag": "string" } ]

GET /resources/{id}

Id(Primary Key)를 통해 하나의 Resource 목록을 읽어옵니다.

Request : [GET] http://127.0.0.1:10831/resources/12
Response : { "accessKey": "string", "id": 0, "resourceId": "string", "resourceName": "string", "resourceType": "string", "service": "string", "tag": "string" }

POST /resources

Request Body를 통해 Access Key, Secret Key, Region 를 전달해 해당 계정에 대한 리소스 목록을 수집합니다.

엔진 서버의 파일 시스템에 포함되어 있는 리소스 스크립트를 동작시키며 수집한 리소스 목록은 연결되어있는 Database에 저장합니다.

Request : [POST] http://127.0.0.1:10831/resources
Request Body : { "accessKey": "string", "regionName": "string", "secretKey": "string" }
Response : { "message": "string", "output": "string" }

DELETE /resources

Request Body에 전달되는 AccessKey들의 리소스 목록을 삭제합니다.

Request : [DELETE] http://127.0.0.1:10831/resources
Request Body : { "accessKeys": [ "string" ] }
Response : 200 OK

cspm-engine's People

Contributors

slolee avatar

Stargazers

WonCheolHwang avatar

Watchers

 avatar

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.