Skip to content
ByoungSeob Kim edited this page Jul 18, 2025 · 25 revisions

1. CB-Spider S3 Storage 개요

  • CB-Spider는 멀티 클라우드 Object Storage를 AWS S3 표준 방법 및 API를 이용하여 동일한 형상으로 관리할 수 있다.
  • 사용자는 Bucket을 생성하고, 생성한 Bucket에 Object(파일)을 유일한 Key를 부여하여 저장 및 관리할 수 있다.
  • 사용자는 여러 개의 Bucket을 생성 관리할 수 있으며, 하나의 Bucket에는 여러 개의 Key:Object를 저장 관리할 수 있다.

image

2. CB-Spider S3 Storage API 개요

  • CB-Spider S3 Storage API는 Spider Connection 설정을 이용한 인증을 제공한다.
    • 사전 설정으로 Connection 설정이 사용하는 Credential에 S3 인증 정보를 추가해야 한다.
  • CB-Spider S3 Storage는 Connection 설정을 이용하여 다음과 같이 2가지 형태의 표준 API를 제공한다.
    • AWS S3 표준 API:
    curl -X PUT "http://localhost:1024/spider-bucket-111" \
      -H "Authorization: AWS4-HMAC-SHA256 Credential=aws-config01"
    
    • CB-Spider S3 표준 API:
    curl -X PUT "http://localhost:1024/spider-bucket-112?ConnectionName=aws-config01"
    
  • API 반환 포맷
    • 현재 XML 형식 제공
    • 추후 JSON 옵션 제공 예정

3. CB-Spider S3 Storage 설정 가이드

  • 연동 대상 CSP Console에서 Object Storage 사용 enable 및 권한 설정

  • 기존 Compute Credential 정보에 다음 S3 관련 정보 추가 필요

    S3Endpoint
    S3AccessKey
    S3SecretKey
    S3UseSSL
    S3RegionRequired
    
  • 기존 Compute Credential 설정 방법 예시

    curl -X POST http://$RESTSERVER:1024/spider/credential \
        -H 'Content-Type: application/json' \
        -d '{
            "CredentialName": "aws-credential01",
            "ProviderName": "AWS",
            "KeyValueInfoList": [
                {"Key": "aws_access_key_id", "Value": "***"},
                {"Key": "aws_secret_access_key", "Value": "***"}
            ]
        }'
    
  • 신규 S3 Credential 포함한 설정 방법 예시

    curl -X POST http://$RESTSERVER:1024/spider/credential \
        -H 'Content-Type: application/json' \
        -d '{
            "CredentialName": "aws-credential01",
            "ProviderName": "AWS",
            "KeyValueInfoList": [
                {"Key": "aws_access_key_id", "Value": "***"},
                {"Key": "aws_secret_access_key", "Value": "***"},
    
                {"Key": "S3Endpoint", "Value": "s3.{region}.amazonaws.com"},
                {"Key": "S3AccessKey", "Value": "***"},
                {"Key": "S3SecretKey", "Value": "***"},
                {"Key": "S3UseSSL", "Value": "true"},
                {"Key": "S3RegionRequired", "Value": "true"}
            ]
        }'
    
  • CSP별 S3 인증 정보 참고 (별도 발급: 대상 CSP Console Object Storage에서 발급)

CSP S3Endpoint Format S3AccessKey S3SecretKey S3UseSSL S3RegionRequired
AWS s3.{region}.amazonaws.com aws_access_key_id와 동일 aws_secret_access_key와 동일 true true
GCP storage.googleapis.com 별도 발급 별도 발급 true true
Alibaba oss-{region}.aliyuncs.com ClientId와 동일 ClientSecret와 동일 true false
IBM VPC s3.{region}.cloud-object-storage.appdomain.cloud 별도 발급 별도 발급 true false
NCP VPC {region}.object.ncloudstorage.com ClientId와 동일 ClientSecret와 동일 true false
NHNCloud {region}-api-object-storage.nhncloudservice.com 별도 발급 별도 발급 true true
KTCloud VPC obj-e-1.ktcloud.com 별도 발급 별도 발급 true false
  • 참고: CSP별 S3 인증 설정시 활용 포맷
    [AWS]
        {"Key": "S3Endpoint", "Value": "s3.{region}.amazonaws.com"},
        {"Key": "S3AccessKey", "Value": "***"},  // aws_access_key_id와 동일
        {"Key": "S3SecretKey", "Value": "***"},  // aws_secret_access_key와 동일
        {"Key": "S3UseSSL", "Value": "true"},
        {"Key": "S3RegionRequired", "Value": "true"}
    
    [GCP]
        {"Key": "S3Endpoint", "Value": "storage.googleapis.com"}, 
        {"Key": "S3AccessKey", "Value": "***"},  // 별도 발급
        {"Key": "S3SecretKey", "Value": "***"},  // 별도 발급
        {"Key": "S3UseSSL", "Value": "true"}, 
        {"Key": "S3RegionRequired", "Value": "true"}
    
    [Alibaba]
        {"Key": "S3Endpoint", "Value": "oss-{region}.aliyuncs.com"}, 
        {"Key": "S3AccessKey", "Value": "***"},     // ClientId와 동일
        {"Key": "S3SecretKey", "Value": "***"},     // ClientSecret과 동일
        {"Key": "S3UseSSL", "Value": "true"}, 
        {"Key": "S3RegionRequired", "Value": "false"}
    
    [IBM VPC]
        {"Key": "S3Endpoint", "Value": "s3.{region}.cloud-object-storage.appdomain.cloud"},
        {"Key": "S3AccessKey", "Value": "***"},  // 별도 발급
        {"Key": "S3SecretKey", "Value": "***"},  // 별도 발급
        {"Key": "S3UseSSL", "Value": "true"},
        {"Key": "S3RegionRequired", "Value": "false"}]}'
    
    [NCP VPC]
        {"Key": "S3Endpoint", "Value": "{region}.object.ncloudstorage.com"},
        {"Key": "S3AccessKey", "Value": "***"}, // ClientId와 동일
        {"Key": "S3SecretKey", "Value": "***"}, // ClientSecret과 동일
        {"Key": "S3UseSSL", "Value": "true"},
        {"Key": "S3RegionRequired", "Value": "false"}
    
     [NHNCloud]
        {"Key": "S3Endpoint", "Value": "{region}-api-object-storage.nhncloudservice.com"},
        {"Key": "S3AccessKey", "Value": "***"},  // 별도 발급
        {"Key": "S3SecretKey", "Value": "***"},  // 별도 발급
        {"Key": "S3UseSSL", "Value": "true"},
        {"Key": "S3RegionRequired", "Value": "true"}
    
    [KTCloud VPC]
        {"Key": "S3Endpoint", "Value": "obj-e-1.ktcloud.com"},
        {"Key": "S3AccessKey", "Value": "***"},  // 별도 발급
        {"Key": "S3SecretKey", "Value": "***"},  // 별도 발급
        {"Key": "S3UseSSL", "Value": "true"},
        {"Key": "S3RegionRequired", "Value": "false"}
    

4. CB-Spider AdminWeb을 이용한 S3 Storage 활용 예시

  • Connection 선택
  • S3 관리 페이지로 이동
  • S3 관리 주요 기능은 다음과 같다
    • (1) Bucket 생성
    • (2) 생성한 Bucket 정보 제공 및 선택
    • (3) 선택한 Bucket에 Object 저장
    • (4) 저장한 Object 정보 제공
    • (5) 저장한 Object 다운로드
    • (6) 저장한 Object PreSigned URL 생성
    • (7) 현재 Bucket의 Object들의 Version 관리 제공 여부 선택
    • (8) Versioning 선택한 Bucket의 경우 Objecet들에 대한 Version 관리
    • (9) 현재 Bucket의 CORS 설정 및 삭제
image

5. CB-Spider S3 Storage API 활용 예시

  • Bucket 생성

    • S3 표준 방법
    curl -X PUT "http://localhost:1024/spider-bucket-111" \
      -H "Authorization: AWS4-HMAC-SHA256 Credential=aws-config01"
    
    • Spider 표준 방법
    curl -X PUT "http://localhost:1024/spider-bucket-112?ConnectionName=aws-config01"
    
  • Bucket 목록

    • S3 표준 방법
    curl -X GET "http://localhost:1024/" \
      -H "Authorization: AWS4-HMAC-SHA256 Credential=aws-config01"
    
    <?xml version="1.0" encoding="UTF-8"?>
    <ListAllMyBucketsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
      <Owner>
        <ID>aws-config01</ID>
        <DisplayName>aws-config01</DisplayName>
      </Owner>
      <Buckets>
        <Bucket>
          <Name>spider-bucket-111</Name>
          <CreationDate>2025-07-18T14:11:05Z</CreationDate>
        </Bucket>
        <Bucket>
          <Name>spider-bucket-112</Name>
          <CreationDate>2025-07-18T14:11:26Z</CreationDate>
        </Bucket>
      </Buckets>
    </ListAllMyBucketsResult>
    
    • Spider 표준 방법
    curl -X GET "http://localhost:1024?ConnectionName=aws-config01"
    
    <?xml version="1.0" encoding="UTF-8"?>
    <ListAllMyBucketsResult xmlns="http://s3.amazonaws.com/doc/2006-03-01/">
      <Owner>
        <ID>aws-config01</ID>
        <DisplayName>aws-config01</DisplayName>
      </Owner>
      <Buckets>
        <Bucket>
          <Name>spider-bucket-111</Name>
          <CreationDate>2025-07-18T14:11:05Z</CreationDate>
        </Bucket>
        <Bucket>
          <Name>spider-bucket-112</Name>
          <CreationDate>2025-07-18T14:11:26Z</CreationDate>
        </Bucket>
      </Buckets>
    </ListAllMyBucketsResult>
    

6. S3 Browser S3 탐색 도구를 이용한 CB-Spider S3 Storage 활용 예시

  • 설치 및 사용 방법 등은 S3 Browser 참고
  • CB-Spider Account 설정 방법은 다음과 같다.
    • Account: S3 Compatible Storage 선택
    • API: localhost:1024 입력
    • Access Key: connection name 입력
    • Secret Access: 아무키나 입력
    • Use secure transfer (SSL/TLS): unCheck
image

Table of contents



Clone this wiki locally