【问题标题】:Amplify config file production放大配置文件生产
【发布时间】:2020-03-05 10:07:01
【问题描述】:

我使用 Angular 和 Amplify Auth。我在 AWS 中有一个单独的 CodePipeline,我使用 GitHub。我的问题是如何加密用于生产的配置文件。

配置文件:

const awsmobile = {
  aws_project_region: "eu-central-X",
  aws_cognito_identity_pool_id:
    "eu-central-1:XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX",
  aws_cognito_region: "eu-central-X",
  aws_user_pools_id: "eu-central-X_XXXXXXXXX",
  aws_user_pools_web_client_id: "XXXXXXXXXXXXXXXXXXXXXXXXXXXX",
  oauth: {}
};

main.ts中的引用

import Amplify from "aws-amplify";
import awsmobile from "./aws-exports";
Amplify.configure(awsmobile);

我正在考虑使用 crypto.js - 或 Github 秘密。但也许有更好的解决方案。有什么想法吗?

【问题讨论】:

    标签: angular amazon-web-services github encryption aws-amplify


    【解决方案1】:

    实际上——它们都是参数,没有一个是秘密的,所以你不需要加密它们。

    即使您将加密参数,您也需要在客户端使用之前对其进行解密。这没有任何意义。

    【讨论】:

      【解决方案2】:

      据我所知,凭据已经经过前端加密。无需使用 crypto.js。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 2011-08-31
        • 1970-01-01
        • 2020-02-25
        • 2023-03-13
        • 1970-01-01
        • 2021-07-23
        • 1970-01-01
        • 2023-04-11
        相关资源
        最近更新 更多