Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
232 views
in Technique[技术] by (71.8m points)

How to use Google Speech-to-Text API secure?

I want to create an app using Google Speech-to-Text API.
And this app will use StreamingRecognize.
https://cloud.google.com/speech-to-text/docs/reference/rpc/google.cloud.speech.v1#google.cloud.speech.v1.Speech.StreamingRecognize

But I'm worried about cost overruns by some attacks.
e.g.) stolen api key, over execution ..etc

Suppose, if meeting these requirements, there is no problem.

  1. StreamingRecognize cannot be called without some billing by the user
  2. One user can have only one connection with StreamingRecognize

Could you tell me how to use this API secure?


App spec

Language: Flutter (Dart)


More Info:

Once I considered about this Android/iOS apps restriction,
https://cloud.google.com/docs/authentication/api-keys?visit_id=637405639528794487-3748827222&rd=1#api_key_restrictions

But I could not understand why it can be restricted.

  • If an api key sets in app, this key can be stolen.
  • Even if information is encrypted in client side, however, I think this information can be created by other client system
  • If api key can be used outside app, there is no meaning restricting in app or billing system

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...