# [Apigee](https://cloud.google.com/apigee) Google 旗下的 API 管理平台 --- ### 主要功能 - API 調用安全性 - 控制流量 - 中介消息 - 控制錯誤處理 - 內容緩存 - 開發者網站 - 分析API流量&數據 - 防範惡意攻擊 - 控制訪問 ---- ### 使用 Apigee 的主要原因 - 安全性 - API key & JWT 的派發 - HMAC (beta) - 惡意攻擊的處理中介 - API 版本控管 - v1 v2 的相容機制,使後端可以保有一個版本就好 - API 使用分析 - [安全防護](https://docs.apigee.com/api-platform/develop/comparing-quota-spike-arrest-and-concurrent-rate-limit-policies) --- # Workflow ---- ```flow st=>start: Create and design proxies on Apigee Edge UI:>https://docs.apigee.com/api-platform/get-started/get-started e=>end: Deploy via Octopus:>https://octopus.com scm=>operation: Download proxy package and commit to git:>https://docs.apigee.com/api-platform/fundamentals/download-api-proxies check=>operation: Run pipeline (lint & test):>https://dev.azure.com cond=>condition: qulity gate passed? io=>operation: Create docker images and push into GCR:>https://console.cloud.google.com st->scm->check->cond cond(yes)->io->e cond(no)->scm ``` ---- ### Repo-Structure <!-- .slide: style="font-size: 18px;" --> ``` git └───/Canal # ---- API Projects ---- ├──/inbound │ └──/v1 # ---- Version ---- │ ├── /apiproxy │ │ ├── policies │ │ ├── proxies │ │ ├── canal-v1.xml │ │ └── targets │ ├── config.json │ └── pom.xml ├──/outbound │ └──/v1 # ---- Version ---- │ ├── /apiproxy │ │ ├── policies │ │ ├── proxies │ │ ├── canal-v1.xml │ │ └── targets │ ├── config.json │ └── pom.xml └── /resources # ---- Project config ---- ├── /edge │ ├── /org │ │ ├── apiProducts.json │ │ ├── developerApps.json │ │ ├── developers.json │ │ └── kvms.json │ ├── /env │ │ ├── /dev │ │ │ ├── caches.json │ │ │ ├── kvms.json │ │ │ └── targetServers.json │ │ ├── /staging │ │ └── /prod │ └── /api │ └── canal-v1 │ ├── caches.json │ └── maskconfigs.json ├── /specs │ └── canal-v1.yaml └── pom.xml ``` ---- ### CI/CD <!-- .slide: style="font-size: 26px;" --> 1. Develop API proxies in `test` environment via Apigee Edge UI 2. Download the proxy and push to Azure Git Repo. 3. auto-trigger Azure Pipeline on `master` branch 4. Code analysis using `apigeelint` 5. `Unit Tests`: `jest` `Integration tests`: `Apickli` `Code Coverage`: `Istanbul/nyc` `Reports`: `Cobertura` 6. Using `Apigee Maven Build Plugin` to publish APIs * packaging as a docker image * push into GCR * trigger deploy task on Octopus --- ### Question - 只能使用 user:password 操作嗎? 還是有 Token 驗證的方式? - 如何設定 Proxy 所在的 Region - SNI? --- ### Thank you
{"metaMigratedAt":"2023-06-15T12:57:04.449Z","metaMigratedFrom":"YAML","title":"Apigee Intro","breaks":true,"slideOptions":"{\"transition\":\"data-transition=\\\"zoom\\\"\"}","contributors":"[{\"id\":\"a84120a4-0fcb-49da-833d-b6eec2984d1b\",\"add\":787,\"del\":463},{\"id\":\"97c4179c-c31c-436e-844d-80e1432d52b9\",\"add\":8417,\"del\":5519}]"}
    327 views
   Owned this note