Media Vault
    • PDF

    Media Vault

    • PDF

    Article Summary

    Classic/VPC 환경에서 이용 가능합니다.

    Media Vault

    Query Based 인증

    인증에 필요한 token을 쿼리스트링에 사용하는 인증 방식을 설명합니다.

    • URL Format
      http://<published-url>?s=<start-time>&e=<end-time>&p=<length>&ip=<supported-IP-format>&h=<hash>
      
    • 쿼리스트링 파라미터
      파라미터유형설명
      sstart-time인증 유효 시작 시간
      (Unix epoch time)
      eend-time인증 유료 종료 시간
      (Unix epoch time)
      plengthhash에 사용할 URL prefix 길이
      ipIPIPv4 주소
      hhashMD5 hash
      (h v파라미터를 마지막으로 사용

    인증 URL 생성 예시

    • secret: 인증 생성을 위한 Secret Key => navercloud
    • start-time: 1669281713
    • end-time: 1669282013 // +300초
    • 대상 URL: http://edge-auth.edge.naverncp.com/app/stream/playlist.m3u8

    Full URL 인증 생성 예시

    • Target URL: URL에 인증 조건 (ip 포함) 을 쿼리스트링으로 지정
      • http://edge-auth.edge.naverncp.com/app/stream/playlist.m3u8?s=1669281713&e=1669282013&ip=192.168.200.0/24
    • MD5 생성: md5(secret key + target URL)
      • md5(navercloudhttp://edge-auth.edge.naverncp.com/path-and-cookie/app/stream/playlist.m3u8?s=1669281713&e=1669282013&ip=192.168.200.0/24)
      • => e35a703178d35420c89cd92b45e00287
    • Secure URL: Target URL에 md5 값을 h 파라미터로 추가
      • http://edge-auth.edge.naverncp.com/app/stream/playlist.m3u8?s=1669281713&e=1669282013&ip=192.168.200.0/24&h=e35a703178d35420c89cd92b45e00287

    Directory 인증 생성 (for HLS) 예시

    • Path URL: HLS 서비스를 위해 마지막 디렉토리 까지만 인증
      • http://edge-auth.naverncp.com/app/stream/
    • Path URL의 length를 구함
      • p=39
    • Target URL: Path URL에 인증 조건 (ip 포함) 을 쿼리스트링으로 지정
      • http://edge-auth.naverncp.com/app/stream/?s=1669281713&e=1669282013&p=39&ip=192.168.200.0/24
    • MD5 생성: md5(secretkey + target URL)
      • md5(navercloudhttp://edge-auth.naverncp.com/app/stream/?s=1669281713&e=1669282013&p=39&ip=192.168.200.0/24)
      • => 0b6c21513cf209d8168015e69ff13789
    • Secure URL: Target URL에 md5 값을 h 파라미터로 추가
      • http://edge-auth.naverncp.com/app/stream/playlist.m3u8?s=1669281713&e=1669282013&p=39&ip=192.168.200.0/24&h=0b6c21513cf209d8168015e69ff13789

    Path Based 인증

    인증에 필요한 token을 URL Path 사용하는 인증 방식을 설명합니다.

    • path delim: 파라미터 구분자, ~ (기본값)
    • path token: 토큰 구분자, token= (기본값)
    • URL Format
      http://<published-url-path>/token=s=<start-time>~e=<end-time>~p=<length>~ip=<supported-IP-format>~h=<hash>/<filename>
      
    • Path 파라미터
      • Query Based에 사용하는 파라미터와 동일

    Directory 인증 생성 (for HLS) 예시

    • Path URL : HLS 서비스를 위해 마지막 디렉토리 까지만 인증
      • http://edge-auth.naverncp.com/app/stream/
    • Path URL의 length를 구함
      • p=39
    • Target URL : Path URL에 인증 조건 (ip 포함) 을 쿼리스트링으로 지정
      • http://edge-auth.naverncp.com/app/stream/?s=1669281713&e=1669282013&p=39&ip=192.168.200.0/24
    • MD5 생성 : md5(secretkey + target URL)
      • md5(navercloudhttp://edge-auth.naverncp.com/app/stream/?s=1669281713&e=1669282013&p=39&ip=192.168.200.0/24)
      • => 0b6c21513cf209d8168015e69ff13789
    • Secure Token: token= 다음에 인증조건과 md5 값을 사용
      • token=s=1669281713&e=1669282013&p=39&ip=192.168.200.0/24&h=0b6c21513cf209d8168015e69ff13789
      • & 는 ~ 로 치환
      • / 는 %2F 로 치환
      • => token=s=1632727222~e=1632727522~p=39~ip=192.168.200.0%2F24~h=0b6c21513cf209d8168015e69ff13789
    • Secure URL: Path URL에 Secure Token를 사용
      • http://edge-auth.edge.naverncp.com/app/stream/token=s=1632727222~e=1632727522~p=39~ip=192.168.200.0/24~h=0b6c21513cf209d8168015e69ff13789/playlist.m3u8

    이 문서가 도움이 되었습니까?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.