Cloudfront private distribution 개요

  • Published on
    09-Jul-2015

  • View
    161

  • Download
    8

Embed Size (px)

DESCRIPTION

Cloudfront private distribution Introduction

Transcript

  • CloudFront Private Distribution

    BDWise

  • CloudFront Private Distribution

    , IP CDN

    SignedURLAccess

  • ()Step1. S3 Bucket

    () Step2. CF Origin Access Identity

    () Step3. CF Distribution

    () Step4. CF Key Pair

    () Step5. DER

    () Step6. Signed URL

  • Step1. S3 Bucket

    Owner Bucket ()

  • Step2. CF Origin Access Identity

    CF Origin( S3) ID

  • Step3. CF Distribution

    Distribution Step2.OAI S3 Bucket Policy

    -Signature URL-Owner Private Key

    Signature

  • S3 URL CDN URL

  • Step4. CF Key Pair

    CF Signed URL Key-Pair

  • Step5. Step5. DER

    openssl pkcs8 -topk8 -nocrypt -in $private_key-inform PEM -out mykey.der -outform DER

    Private Key(openssl)

  • Step6. Signed URL private static String DistributionDomain = .cloudfront.net";

    private static String KeyPairId = .";

    public static void main(String[] args)

    throws CloudFrontServiceException, ParseException, FileNotFoundException, IOException {

    Security.addProvider(new org.bouncycastle.jce.provider.BouncyCastleProvider());

    byte[] derPrivateKey = IOUtils.toByteArray(new FileInputStream("./mykey.der"));

    String s3ObjectKey = "a.pdf";

    String signedUrlCanned = CloudFrontService.signUrlCanned(

    "http://"+ DistributionDomain + "/" + s3ObjectKey, KeyPairId,

    derPrivateKey,

    ServiceUtils.parseIso8601Date("2014-03-13T16:00:00.000Z+09"));

    System.out.println(signedUrlCanned);

    }Signed Url

  • Signed Url