Save 37% off PRO during our Black Friday Sale! »

Melody by Me and File Privacy Management

Melody by Me and File Privacy Management

B29f42636a5f1249b640473d49aa4514?s=128

LINE Developers Thailand

October 16, 2021
Tweet

Transcript

  1. None
  2. MELODY BY ME AND FILE PRIVACY MANAGEMENT

  3. • LINE MELODY and Melody by Me • Files management

    overview • File privacy with presigned url • Want to make it more secure? AGENDA
  4. LINE MELODY

  5. มี user กี ่ คนแ ล้ ว, 1505636 (22/07/21) 1.5M

    LINE Melody Users
  6. มี user กี ่ คนแ ล้ ว, 1505636 (22/07/21) 30K

    LINE Melody Musics
  7. None
  8. MELODY BY ME

  9. None
  10. MELODY FILE MANAGEMENT OVERVIEW

  11. File Types by Usage • Real File • Ringtone •

    Ringback tone • Preview File
  12. Cloud Service Platform

  13. Verda Object Storage - VOS Bucket Object

  14. Music Normal melody

  15. Music ADMIN WEB MELODY WEB PREVIEW FOLDER REAL FILES FOLDER

    RT/RBT SETTING SERVICE
  16. Music PREVIEW FOLDER REAL FILE FOLDER Private Public

  17. Music ADMIN WEB MELODY WEB PREVIEW FOLDER REAL FILES FOLDER

    RT/RBT SETTING SERVICE
  18. มี user กี ่ คนแ ล้ ว, 1505636 (22/07/21) Voice

    Melody by me
  19. Voice MELODY WEB PRIVATE FOLDER RT/RBT SETTING SERVICE MELODY WEB

  20. FILES PRIVACY WITH PRESIGNED URL

  21. มี user กี ่ คนแ ล้ ว, 1505636 (22/07/21) Presigned

    url
  22. Voice PRIVATE DIRECTORY MELODY WEB RT/RBT SETTING SERVICE Generate PRESIGNED

    URL
  23. import { S3 } from ‘aws-sdk’; const s3Con fi g

    = { endpoint: ‘HOST’, accessKeyId: ‘ACCESS_KEY’, secretAccessKey: ‘SECRET_KEY’, }; const client = new S3(s3Con fi g); const params = { Bucket: ‘melody’, Key: ‘private/folder_name/ fi le_name.m4a’, }; const previewUrl = client.getSignedUrl(‘getObject’, params); Presigned URL Implementation
  24. https://DOMAIN/private/folder_name/ fi le_name.m4a? AWSAccessKeyId=S3_ACCESS_KEY&Signature=sNTwfp %2BEcf8kq32K464%2Bee1bO8Q%3D Presigned URL Example

  25. • AWSAccessKeyId=S3_ACCESS_KEY • Signature=sNTwfp%2BEcf8kq32K464%2Bee1bO8Q%3D Presigned URL Query String

  26. WANT TO MAKE IT MORE SECURE ?

  27. const params = { Bucket: ‘melody’, Key: ‘private/folder_name/ fi le_name.m4a’,

    Expires: 60, // seconds }; const previewUrl = client.getSignedUrl(‘getObject’, params); Set Expires
  28. https://DOMAIN/private/folder_name/ fi le_name.m4a? AWSAccessKeyId=S3_ACCESS_KEY&Expires=16308416 66&Signature=SL8XYVRoVLrB1xx2AaE28lQS18w%3D Set Expires

  29. • AWSAccessKeyId=S3_ACCESS_KEY • Signature=SL8XYVRoVLrB1xx2AaE28lQS18w%3D • Expires=1630841666 Set Expires

  30. Renew Keys Generate PRESIGNED URL NEW

  31. import { S3 } from ‘aws-sdk’; const s3Con fi g

    = { endpoint: ‘HOST’, accessKeyId: env.S3_ACCESS_KEY, secretAccessKey: env.S3_SECRET_KEY, }; const client = new S3(s3Con fi g); Rotate Keys
  32. MELODY BY ME AND FILE PRIVACY MANAGEMENT

  33. https://melody.line.me/ https://melody.line.me/voice-record