Tctone
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.

      Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

      Explore these features while you wait
      Complete general settings
      Bookmark and like published notes
      Write a few more notes
      Complete general settings
      Write a few more notes
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note No publishing access yet

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.

    Your account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Your team account was recently created. Publishing will be available soon, allowing you to share notes on your public page and in search results.

    Explore these features while you wait
    Complete general settings
    Bookmark and like published notes
    Write a few more notes
    Complete general settings
    Write a few more notes
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    # Google Cloud Computing Foundations: Infrastructure in Google Cloud --- 此筆記參考的課程內容來自**Google數位人才探索計畫**上的[Google Cloud](https://growonairtw.withgoogle.com/events/digitaleducation) 此堂課由**Google**所開設,其宗旨如下: > 針對不同背景的台灣人才,提供免費的數位技能培訓,涵蓋行銷及雲端工程兩大領域,並且包含 AI 應用及開發課程。透過完整學習路徑規劃,無論你是學生、即將進入職場的應屆畢業生或考慮轉換跑道的求職者,都能在短時間內具備相關知識! 本課程有**兩大主題**,**「生成式 AI 開發者入門課程」以及「Google Cloud Computing Foundations」**,此堂課為**Google Cloud Computing Foundations**的課程:**Cloud Computing Fundamentals** 本課程系列適合**雲端新手**,提供基礎觀念與實作能力,涵蓋 Cloud、Big Data、Machine Learning 等主題,並說明 Google Cloud 的定位與應用,課程順序建議: 1. **Cloud Computing Fundamentals**:了解雲端運算概念、Google Cloud 的使用方式及運算選項。 2. **Infrastructure in Google Cloud**:探討 GCP 的基礎設施與虛擬機、儲存系統等資源。 3. **Networking and Security in Google Cloud**:學習 GCP 中的網路架構與資安機制。 4. **Data, ML, and AI in Google Cloud**:簡介資料處理與 GCP 上的機器學習、AI 工具。 ## Store the stuff ### 01 Storage option available in Google Cloud Google Cloud 提供的儲存與資料庫服務包括: 1. **物件儲存(Object Storage)**:Cloud Storage 2. **關聯式資料庫(Relational)**:Cloud SQL、Spanner 3. **非關聯式資料庫(Non-relational / NoSQL)**:Firestore、Bigtable * 選擇儲存方式的**關鍵依據**: * **資料類型(如圖片、影片、感測器資料)** * **商業需求(分析速度、存取頻率、可用性等)** 📌 這些服務具備高可**擴展性、可靠性,並且由 Google 管理,易於操作**。 #### 三大宗使用情境 1. **內容儲存與傳遞(Content Storage & Delivery)** * 例:網站圖片、影片串流 * 使用 Google 全球網路可提供快速且穩定的用戶體驗。 2. **資料分析與運算儲存(Analytics & Compute Storage)** * 可與 Google Cloud 的分析工具整合 * 例:IoT 資料分析、基因定序(Genomic sequencing) 3. 備份與歸檔(Backup & Archival) * 長期儲存、不常存取的資料可轉移至低成本方案 * 作為本地資料遺失時的災難備援(Disaster Recovery) #### 資料庫搬遷上雲 **第一步:資料庫搬遷上雲** * **典型例子:從本地 MySQL / PostgreSQL 遷移至 Cloud SQL** **第二步:雲端原生創新** * **支援行動應用(mobile apps)、快速擴展、未來擴充性設計** ### 02 Structured and unstructure data storage :::spoiler **☁️ Google Cloud 的儲存選項總覽** * Cloud Storage:適合存放非結構化資料(如圖片、影片、文件) * Cloud SQL:關聯式資料庫(支援 MySQL、PostgreSQL) * Spanner:全球可擴展的關聯式資料庫 * Firestore:NoSQL 文件導向資料庫,適合交易性資料但不使用 SQL * Bigtable:NoSQL 資料庫,適合高頻、低延遲的分析型應用 * BigQuery:分析型資料倉儲,支援 SQL,適合處理 PB 等級資料集 ::: 資料儲存三大常見用途包括 * **內容儲存與分發**:如影片、圖片;須低延遲、高效能 * **資料分析與運算支援**:如基因分析、IoT 資料處理 * **備份與歸檔**:降低儲存成本、支援災難復原 #### 資料類型的比較 | 分類 | 特徵 | 常見儲存選項 | | ------ | ------------------------------------- | ------------------- | | 非結構化資料 | - 沒有固定格式(如圖片、影片、文件)<br>- 難以使用傳統方法處理分析 | Cloud Storage | | 結構化資料 | - 表格形式(行、列)<br>- 容易存取、分析 | Cloud SQL、Spanner 等 | #### 結構化資料的分類 1. **交易性工作負載(OLTP)** * **快速寫入與更新(如訂單系統)** * **查詢標準、影響資料筆數少** * **適合使用**:Cloud SQL(區域性可擴展)、Spanner(全球可擴展)、Firestore(若不使用 SQL) 2. **分析型工作負載(OLAP)** * 需**讀取整體資料集**,包含**複雜查詢**(如總和、平均) * **適合使用**:BigQuery(使用 SQL)、Bigtable(即時、高頻率非 SQL 分析) ### 03 Unstructured storage using Cloud Storage **Cloud Storage 是 Google 提供的全託管、可擴展的物件儲存服務**。適用於**儲存非結構化資料**,如圖片、影片、備份檔案、中間處理結果等,且**支援大容量二進位檔案(BLOB)儲存與下載**。 #### Object Storage 資料以**「物件」形式儲存,而非檔案系統(file/folder)或區塊(block)形式**,且每個物件包含:**資料本身(binary)、、Metadata(建立時間、作者、類型、權限等)、全球唯一的識別碼(通常是 URL)** #### 四種儲存等級 | 儲存類型 | 適用情境 | 存取頻率建議 | 成本 | | -------- | --------------- | --------- | ---------- | | Standard | 熱資料(頻繁存取) | 常用或短期儲存 | 高 | | Nearline | 每月存取一次的冷資料 | 備份、歸檔資料 | 中 | | Coldline | 每 90 天存取一次的極冷資料 | 備份、災難備援 | 較低 | | Archive | 幾乎不存取(每年不到一次) | 歷史資料、長期歸檔 | 最低(但存取成本高) | :::info 通用特色(不分等級) * **無儲存上限,無最小檔案大小限制。** * **全球可用、低延遲、高耐久性。** * **支援安全控制、API、工具整合。** * **支援地理冗餘(multi-region/dual-region)來防災與負載平衡。** ::: #### Bucket 資料被儲存在稱為 **bucket 的容器**中,且**每個 bucket**:**必須有全域唯一名稱**與**指定儲存地點(建議選用靠近用戶的地區以降低延遲)。** #### Immutable & Versioning(不可變性與版本控制) Cloud Storage 的物件為**不可變(immutable)**,每次更動會建立新版本。 可啟用 **「版本控制」** 功能以保留歷史版本: * **可列出、還原、刪除指定版本**。 * 若未啟用版本控制,預設為覆蓋舊版本。 #### Lifecycle Management(生命週期管理) 可設定自動規則來清理資料,例如: * 刪除超過 365 天的物件。 * 刪除某特定日期前建立的物件。 * 僅保留最近 3 個版本。 ### 04 SQL managed services 雲端運算與基礎架構建置包括: 1. **雲端運算角色**:提供**可擴展、彈性的資源** 2. **虛擬機(VM)**:使用 **Compute Engine 建立與管理 VM** 3. **自動擴展應用程式**:利用**autoscaling 建立彈性應用服務**。 #### SQL管理型服務 其定義為有**組織**的資訊集合,可供**應用快速查詢/儲存**。 * **使用情境**:查詢使用者名稱、顯示產品價格、排行分析、廣告推播等。 * **關聯式資料庫(RDBMS / SQL DB)**: * 適合結構明確、需交易處理與表格關聯的應用。 * 使用 SQL 語法查詢。 * Google Cloud 提供的兩種管理型 SQL 服務: * **Cloud SQL**:傳統關聯式資料庫(如 MySQL, PostgreSQL)。 * **Spanner**:全球一致性、可擴展的 SQL 資料庫。 ### 05 Exploring Cloud SQL Cloud SQL 是 Google Cloud 提供的**完全託管式關聯式資料庫服務**。支援**常見的 SQL 資料庫引擎:MySQL、PostgreSQL、SQL Server** #### 特點 1. **自動化管理功能**使 Cloud SQL 卸下使用者的管理負擔,將以下任務交由 Google 處理: * **自動修補程式和更新** * **備份管理與還原** * **資料庫複寫設定** 2. **可擴展性** 3. **複寫與備份** 4. **資安與加密** ### 05 Spanner as a managed service Spanner 是 Google Cloud 提供的**全託管式關聯式資料庫服務**,支援**水平擴展(horizontal scaling)及SQL 查詢語言**,且保證**強一致性(strong consistency)** :::info 🆚 垂直與水平擴展比較 * **垂直擴展(Vertical Scaling)**:增加單一實例的資源(如 CPU、RAM) * **水平擴展(Horizontal Scaling)**:透過 增加伺服器數量 來擴充資料庫容量與效能(Spanner 的強項) ::: Spanner 特別適合**需要高可用性與大規模處理的產業**,如:**廣告技術(AdTech)、金融服務(FinTech)、行銷科技(MarTech)** #### 🌍 跨區域同步與容錯 * 使用**同步複寫(synchronous replication)**: * 資料會**即時被複製到不同地區** * 查詢在**任一區域執行時都會得到一致、有序的結果** * **地區性容錯**:若某區域下線,資料仍可由其他區域提供服務 ### 06 NoSQL managed service options | 項目 | **Firestore** | **Bigtable** | | -------- | --------------------- | ---------------------- | | **資料模型** | 文件型(Document Store) | 廣欄式(Wide-Column Store) | | **用途定位** | 應用程式後端、即時應用 | 大數據分析、高頻寫入 | | **管理模式** | 完全託管、無伺服器(Serverless) | 託管但需手動設定叢集數量 | | **交易支援** | ✅ 支援 **ACID 交易** | ❌ 不支援 ACID | | **資料規模** | 適中(中小型應用) | 大規模(數 PB 級別) | | **延遲** | 低 | **極低寫入延遲**(非常快速) | | **主要優勢** | 易於使用、整合 Firebase 生態系 | 適合海量數據、水平擴展能力強 | | **使用情境** | 聊天室、待辦清單、即時協作 | IoT 數據流、高速感測資料、時序資料 | ### 07 Firestore, a NoSQL document store 是一種 **完全託管(fully managed)**、**可擴展(scalable)**、**無伺服器(serverless)** 的 **NoSQL 文件型資料庫**。專為 **行動應用、網頁應用** 及 **伺服器端開發** 而設計。 --- #### 📦資料結構 * 資料儲存在 **文件(documents)** 中,文件由 **集合(collections)** 組織。 * 每個文件可包含: * 基本資料欄位 * 巢狀物件(nested objects) * **子集合(subcollections)** --- #### 🔍查詢能力 * 支援靈活的 **NoSQL 查詢語法** * 多重條件(chained filters) * 結合排序(filtering + sorting) * 查詢 **預設自動建立索引**,所以查詢效能與結果數量成正比,**而非資料總量**。 --- #### 即時同步與離線支援 * 資料會在裝置間 **自動同步(data synchronization)**。 * 支援 **離線模式(offline support)**: * 應用可在裝置離線時仍然寫入、讀取、監聽與查詢資料。 * 回到線上時,Firestore 會將本地變更自動同步上雲端。 ### 08 Bigtable as a NoSQL option 以下是你提供的四段影片內容的**核心重點整理**: --- #### 🔷 1. **Spanner:全球一致性的 SQL 資料庫** * **定位**:Google 提供的**全代管(Managed)、水平擴展、高一致性的關聯式資料庫服務**。 * **特點**: * 支援 SQL、JOIN、Secondary Index。 * 水平擴展能力強(適合大量 I/O 操作,如每秒數萬次讀寫)。 * 提供高可用性與強一致性(全球同步複製)。 * 採用同步複製與跨區域備援,即使某區域宕機資料仍可存取。 * **適用領域**:廣告、金融、MarTech 等需要管理終端用戶 metadata 的產業。 * **使用場景**:需要 RDBMS 特性但又需要可擴展性與高一致性的應用。 --- #### 🔷 2. **NoSQL 選項總覽** * **Google Cloud 提供兩種 NoSQL 選項**: 1. **Firestore**:文件型 NoSQL,支援 ACID 交易,適合 App 開發。 2. **Bigtable**:寬表(Wide-column)型 NoSQL,處理 PB 等級數據,寫入延遲極低,適合大數據與實時分析。 --- #### 🔷 3. **Firestore:適合 App 的文件型 NoSQL 資料庫** * **結構**:資料以 **文件(document)** 儲存,文件組成 **集合(collection)**。 * **特性**: * 支援巢狀物件與子集合。 * 預設索引支援複合查詢(可鏈結多條件與排序)。 * 查詢效率與結果集大小成正比(非總資料集)。 * **自動同步資料**:跨設備同步,支援離線緩存與資料同步回傳。 * 支援原子操作、ACID 交易、強一致性、跨區域備援。 * **用途**:App、行動裝置、Web 應用即時資料同步與儲存。 --- #### 🔷 4. **Bigtable:高吞吐量的大數據 NoSQL 資料庫** * **定位**:Google 內部核心服務(如 Gmail、Search)使用的 NoSQL 引擎。 * **特點**: * 處理 TB / PB 級數據,支援低延遲寫入與高吞吐量。 * 適合 **操作型** 或 **分析型** 大數據應用。 * 支援 NoSQL 格式(非關聯式,無需交易語義)。 * 適合時間序列資料或有明確排序語義的資料。 * **適用場景**: * IoT、金融資料分析、使用者行為分析。 * 運行即時串流處理(Dataflow、Spark Streaming 等)或批次處理(MapReduce 等)。 * 機器學習演算法的大數據儲存與處理。 * **整合性**:可透過 REST、HBase client、Managed VM 等 API 存取;結果常回寫至 Bigtable 或其他下游資料庫。 * **BigQuery**:雖未詳談,但強調它用於互動式查詢,不純為資料儲存用途。 ## An API for that 本單元介紹了如何利用 Google Cloud 的受管服務來建構應用程式,重點包括:了解 API 的用途與優點,比較 Cloud Endpoints 與 Apigee 兩種 API 管理工具,以及學習 Pub/Sub 這套可支援大規模分散式訊息架構的系統,幫助開發者更有效率地打造可擴展、模組化的雲端應用程式。 ### 01 The purpose of APIs **API(應用程式介面)** 能提供清楚、穩定的介面,隱藏實作細節,讓軟體模組能穩定互動。即使**內部程式變更,只要 API 介面不變,其他程式仍可正常運作**。 #### REST架構 * REST(Representational State Transfer) 是目前最常見的 API 架構。 * 使用 HTTP 動作(GET, POST, PUT, DELETE) 進行操作。 * 適合雲端與行動裝置,因為其 無狀態性 能提升擴展性與效率。 ### 02 Apigee API Management Apigee 是 **Google Cloud 提供的 API 管理平台**,專注於**商業層面的 API 管理**。 :::info ✅ 與 Cloud Endpoints 不同之處: 強調處理 配額(quotas)、流量限制(rate limiting)、使用分析(analytics) 等企業級需求。 ::: 常用於為**其他公司提供軟體服務**的情境,適合用來**拆解傳統大型應用程式(legacy apps)**。可逐步用**微服務(microservices)**取代舊系統功能,直到整個舊系統退役。 ### 03 Pub/Sub 🌐 **Google Cloud Pub/Sub 又稱為分散式非同步訊息服務**。**Pub/Sub** 是 **Publisher/Subscriber** 的縮寫。用於 **非同步消息傳遞**,支援大規模、分散式的資料流處理。適用於 IoT、遊戲事件、應用程式日誌等**高頻率事件來源**。 #### 📥 資料擷取與挑戰(Data Ingestion) Pub/Sub 解決資料擷取過程中的四大挑戰: 1. 資料來源多樣且彼此不相容,可能延遲或錯誤。 2. 難以將訊息正確分發給訂閱者。 3. 高速、大量資料進入時的可擴展性。 4. 系統必須可靠、安全,效能穩定。 --- #### 🧱 架構與流程 1. **Publisher** 發布訊息至「**Topic**」(訊息主題)。 2. **Pub/Sub** 讀取、儲存並廣播訊息。 3. **Subscriber**(例如 Dataflow)接收並處理訊息,將結果傳入 BigQuery。 4. 可串接 Looker、Vertex AI 進行分析與視覺化。 --- #### 📡 Topic 運作概念 * 類似「**電台頻道**」:不管是否有聽眾,訊號依然存在。 * **發佈者與訂閱者是完全解耦的**:可獨立運作、互不影響。 * 可有 **0 個或多個發佈者/訂閱者**。 --- #### 👥 範例應用:HR 系統 * 不同系統(如正式員工與外包)各自發布訊息至 HR 主題。 * 多個應用(如門禁系統、帳號建立等)根據訊息獨立處理後續操作。 --- #### ✅ Pub/Sub 優點 * 自動擴展、無需配置。 * 全球分佈、端到端加密。 * 適合建構 **鬆耦合、彈性高** 的系統架構。 * 支援**話題鏈接(topic chaining)**,訊息可由一個 topic 傳至另一個。 --- ## Secure the cloud 本模組介紹了 Google Cloud 的雲端安全最佳實踐,涵蓋共享責任模型、資料加密、IAM 身份與存取管理、以及 Identity-Aware Proxy(IAP)的應用,幫助學員理解並實作安全的驗證與授權機制,確保雲端環境中的資源受到妥善保護。 ### 01 Security in the cloud **🔐 Google Cloud 的具有五層安全防護架構:** #### 1️⃣ **硬體基礎設施層(Hardware Infrastructure)** * **硬體設計自主**:Google 自行設計伺服器與網路設備,包含專屬安全晶片。 * **安全開機機制**:使用加密簽章確保 BIOS、開機載入器、核心及作業系統完整性。 * **實體安全**:自建資料中心具多層物理保護,第三方機房也加設 Google 自控安全層級。 --- #### 2️⃣ **服務部署層(Service Deployment)** * **服務間加密通訊**:所有資料中心間的 RPC 皆預設自動加密,並導入硬體加速器強化加密效能。 * **用戶身份驗證強化**: * 使用風險因素判斷額外驗證需求。 * 支援 U2F(二次驗證)標準,提高登入安全性。 --- #### 3️⃣ **儲存服務層(Storage Services)** * **靜態資料加密(Encryption at Rest)**:所有存取儲存資源的資料自動經由儲存服務層進行加密,並支援硬碟/SSD 硬體加密。 --- #### 4️⃣ **網路通訊層(Internet Communication)** * **Google Front End(GFE)**: * 管理 TLS 連線,使用憑證與公開金鑰進行加密。 * 支援 Perfect Forward Secrecy(完全前向保密)。 * **DoS 保護**:基於 Google 規模可吸收多數攻擊,並有多層防禦架構應對。 --- #### 5️⃣ **營運安全層(Operational Security)** * **入侵偵測**:使用規則與機器學習偵測異常行為。 * **紅隊演練**:定期進行滲透測試以改進防禦與應變能力。 * **內部風險控制**:限制管理權限員工的操作,並進行監控。 * **U2F 安全鎖**:內部員工強制使用硬體金鑰防釣魚。 * **安全開發流程**: * 使用版本控制與雙人審查機制。 * 提供安全程式庫避免常見漏洞。 * 推動「漏洞獎勵計畫」,鼓勵通報系統弱點。 ### 02 The shared security model **🌩️ Google Cloud 的共享責任安全模型(Shared Responsibility Model)** #### 🛡️ Google Cloud 的責任: * 管理**基礎設施層級**的安全性: * 實體硬體與場所安全 * 磁碟加密(Encryption at Rest) * 網路通訊完整性與加密(如 TLS) #### 🔐 客戶的責任: * 管理**應用層級與資料層級**的安全性: * 資料存取控制(Data access) * 應用程式內容保護 * 設定與管理使用者權限 #### 🧰 Google 提供的工具(由客戶使用): * **資源層級架構(Resource Hierarchy)** * **身份與存取管理(IAM)** * 控制「誰」或「什麼」可以存取資料 * 工具強大但需妥善設定才能真正保護資料 ### Encytion keys #### ✅ 預設加密(Default Encryption) * **Google 自動處理** * 傳輸中使用 **TLS** * 靜態資料使用 **AES-256** * 無需使用者操作 --- #### 🔑 客戶管理加密金鑰(CMEK) * 使用 **Cloud KMS** 管理金鑰 * 支援: * **對稱 / 非對稱加密** * **簽章與驗證** * **金鑰輪替**(可手動或自動) * 金鑰留在雲端,由客戶擁有控制權,但簡化管理 --- #### 🧷 客戶提供加密金鑰(CSEK) * 使用者自行產生 **AES-256 金鑰** * 需: * 負責金鑰的產生、儲存與提供 * 在 API 請求中附上金鑰 * 金鑰只存在記憶體中,使用後即被刪除 * 適用於如 Persistent Disk 等資源 --- #### 💻 用戶端加密(Client-side Encryption) * 使用者在本地端加密資料再上傳 * **純文字與解密金鑰不會離開本機** * 控制權最完整,但管理複雜度最高 ### 03 Authentication and Authorization with IAM 這段講述了 **如何使用 IAM(Identity and Access Management)強化 Google Cloud 基礎架構的安全性**。以下是核心重點總結(HackMD 格式): * **IAM 定義:** 透過政策(Policy)管理「誰」可以對「哪些資源」做「哪些操作」。 * **政策元素:** * **身份(Who):** Google 帳戶、群組、服務帳戶、Cloud Identity。 * **角色(Can do what):** 權限的集合。 * **資源(On which resource):** 政策會套用至該資源及其下層資源。 * **角色種類:** * **基本角色(Basic):** owner, editor, viewer, billing admin,範圍較廣。 * **預先定義角色(Predefined):** 針對特定服務如 Compute Engine 設計的專屬角色(例:instanceAdmin)。 * **自訂角色(Custom):** 精細化權限管理,適用於最小權限原則,但需自行維護權限集。 * **拒絕政策(Deny Policies):** * 可定義「不允許」的行為,即使有角色授權也無效。 * 拒絕政策會優先於允許政策。 * **身份與組織管理:** * 初期用 Gmail 和群組管理簡便,但不利於長期控管。 * 可透過 Cloud Identity 統一管理身份,整合 Active Directory / LDAP。 * **服務帳戶(Service Accounts):** * 提供 VM 或應用程式對其他資源的授權方式。 * 以加密金鑰取代密碼,具備身份與資源的雙重性質。 * 可對服務帳戶本身設定 IAM 政策,例如 Alice 可編輯,Bob 只能查看。 ### 04 IAM authorization best practice #### ✅ 一般 IAM 管理建議 * **使用資源階層**:利用專案(Project)區分資源與信任邊界。 * **理解政策繼承**:資源的權限會從上層繼承,注意角色授予位置。 * **最小權限原則**:只賦予完成任務所需的最低權限。 * **審核 IAM 政策與群組成員**:使用 Cloud Audit Logs 稽核資源與群組。 #### 👥 建議使用群組授權 * 將角色賦予 **群組而非個人**,便於維護與人員異動。 * 使用多個群組細分權限(例如:read\_write、read\_only)。 * 控制群組的管理者,確保群組成員的正確性。 #### 🤖 服務帳戶最佳實踐 * **小心使用 Service Account User 角色**:它會授與使用該帳戶的完整存取權。 * **明確命名服務帳戶**:使用顯示名稱辨識用途,配合組織命名慣例。 * **建立金鑰輪替政策與方法**:避免長期使用單一金鑰,提升安全性。

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password
    or
    Sign in via Google Sign in via Facebook Sign in via X(Twitter) Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    By signing in, you agree to our terms of service.

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully