0

動画を保存する Web アプリがあります。ユーザー名とパスワードを検証する Java サーブレット (https 経由) を使用しています。詳細が確認されたら、AWS S3 に保存されているビデオにユーザーをリダイレクトします。S3 がどのように機能するかを知らない人のために説明すると、S3 は単なるオブジェクトを格納する Web サービスです (基本的にはファイルを格納するものと考えてください)。また、https を使用します。明らかにこれを機能させるために、s3 オブジェクト (ファイル) はパブリックです。数字と文字でいっぱいのランダムな名前を付けました。

したがって、サーブレットは基本的に次のようになります。

void doGet(request, response){
   if (authenticateUser(request.getParameter("Username"), request.getParameter("Password")){
      response.sendRedirect("https://s3.amazonaws.com/myBucket/xyz1234567.mp4");
   }
}

これは明らかに単純化されていますが、要点はわかります。ここに非常に明白なセキュリティ上の欠陥はありますか? ビデオ タグには、明らかにhttps://www.mysite.com/getVideo?Username= "Me"&Password="randomletters"のようなソースがあります。最初は、AWS s3 にあるファイル名に十分にランダムな名前を付けたと仮定すると、他の何よりも安全であるように思えますか?

4

2 に答える 2

3

明らかなセキュリティ上の欠陥は、認証サーブレットがリダイレクトする URL を誰でも検出でき、この URL をすべての友人と共有できるため、認証サーブレットを経由せずにリソースに直接アクセスできることです。

残念ながら、私は S3 についてまったく知らないので、セキュリティの問題に対する修正をお勧めできません。

于 2013-04-05T17:34:50.710 に答える
0

All this mechanism does is provide a very limited obfuscation - using developer tools in most modern browsers (or a proxy such as Fiddler) a user will be able to watch the URL of the video that's being loaded and, if it's in a Public S3 bucket, then simply share the link.

With S3 your only real solution would be to secure the bucket and then either require that the user is logging in or use the temporary tokens for access [http://docs.aws.amazon.com/AmazonS3/latest/dev/RESTAuthentication.html] ... though this does complicate your solution

I would also mention that including the password and username in plaintext on the link to the video asset (from the question above) is very insecure

于 2013-04-07T15:08:07.370 に答える