英文:
Secure way to use pem file on app engin
问题
我想实现一个服务,向客户端返回一个签名的URL。我正在使用这段代码作为参考signing-code-go。
我考虑将文件上传并使用app.yaml将其仅提供给应用程序,类似于以下方式:
- url: /files
static_dir: files
在服务器内部使用pem文件的最佳和安全的方式是什么?
英文:
I want to implement a service that will return a signed URL to a client
Im using this code as reference signing-code-go .
Im thinking to upload the file as use the app.yaml to serve it to the application only something like that .
- url: /files
static_dir: files
What will be the best and secure way to use the pem file inside the server?
答案1
得分: 2
“静态文件”是向用户提供的,正如https://cloud.google.com/appengine/docs/go/config/appconfig#Go_app_yaml_Static_file_handlers中所明确说明的那样。引用这个URL的话:
如果您有需要被应用程序代码读取的数据文件,那么这些数据文件必须是应用程序文件,并且不能与静态文件模式匹配。
采用这种方法,您只需将.pem
文件与应用程序的其余部分一起上传,并在代码中将其作为本地文件进行读取。
英文:
"Static files" are served to users, as https://cloud.google.com/appengine/docs/go/config/appconfig#Go_app_yaml_Static_file_handlers makes it clear. To quote from this URL:
> If you have data files that need to be read by the application code,
> the data files must be application files, and must not be matched by a
> static file pattern.
With this approach, you'll just upload the .pem
together with the rest of your application and read it from your code as a local file.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论