【问题标题】:Secured connection between app and server应用程序和服务器之间的安全连接
【发布时间】:2020-04-10 14:51:42
【问题描述】:

我尝试使用这些代码将我的 ionic 应用程序连接到 apiserver (get)

    import { Injectable } from '@angular/core';
    import { HttpClient } from '@angular/common/http';
    import { Observable } from 'rxjs';
    import { map } from 'rxjs/operators';

    @Injectable({
      providedIn: 'root'
    })
    export class EncryptionService {

      url = 'https://api.am....com';
      api-key='......'

      constructor(private http: HttpClient) { }

      newcheck(checkid: string ,cost: string,toname: string,tocode: string,passcode: string,date: string,checkfor: string,back: string): {
          return this.http.get(`${this.url}?key=${this.api-key}&checkid=${encodeURI(checkid)}`);
      }
    }

我的 API 有 API 密钥并在 URL 中获取数据

  1. 如何以安全的方式执行这些操作? 例如防止有人监听和监控应用和服务器之间传输的数据?
  2. 防止某人分散注意力并通过应用伪造接收到的数据?
  3. 或者,任何使此连接安全的方法

【问题讨论】:

    标签: javascript angular security ionic-framework penetration-testing


    【解决方案1】:

    您似乎已经在使用已加密的 https。 由于浏览器会自动验证证书链,因此默认情况下应阻止中间人攻击。

    我建议阅读 this guide 关于 https。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2014-04-13
      • 1970-01-01
      • 1970-01-01
      • 2010-12-25
      • 1970-01-01
      • 2010-12-06
      • 1970-01-01
      相关资源
      最近更新 更多