Kapitoly kurzu
1. Obsahová mapa kurzu 2. Notebooky: PySpark vs Pure Python 3. Demo: Tři cesty a Mini Medallion 4. CU Costs a Capacity Metrics 5. SQL trojúhelník 6. Real-Time Intelligence: demo arc 7. Semantic modely, DAX a optimalizace 8. Security a administrace Fabricu 9. Zkouška DP-600: tipy
Runbooky — medallion
10. Mini Medallion ČHMÚ 11. Mini Medallion NYC Taxi 12. NYC Taxi třemi cestami 13. Mini Medallion OpenAQ 14. Big Medallion OpenAQ (2 roky)
Runbooky — RTI
15. RTI Library: architektura 16. A: Bicycles 60s 17. B: ČHMÚ HTTP polling 18. C: NDIC dopravní detektory 19. D: Camera ALPR simulátor 20. E: PID GTFS-RT 21. F: Activator alerty 22. KQL cheat sheet
🏠 Rozcestník kurzu
DP-600 · Kapitola 8

Security a administrace Fabricu

Třívrstvý security model, Tenant Admin Portal, kapacity, Capacity Metrics a governance
🗂 Kapitola kurzu

Cíle kapitoly

  • Vysvětlit tři vrstvy security: workspace role, item permissions, granular data access
  • Předvést řetězec Viewer + RLS a propagaci sensitivity labelu napříč Fabricem
  • Orientovat se v Tenant Admin Portalu a v high-impact tenant settings
  • Číst Capacity Metrics App do hloubky a rozumět smoothing window a throttling levels
  • Nastavit workspace governance a Deployment Pipelines
8.1

Úvod

Poznámky pro Day 4 lekce 4.2 (Secure data access) a 4.3 (Administer Fabric). Audience má SQL Server admin background — paralely tahat k tomu (rights, roles, audit).

ℹ️
Demo workspace: DP600_Demo_CHMI z Days 1-2 + DP600_Demo_RTI z Day 4 dopoledne. Tenant Admin Portal přístup nutný (lektor demo z vlastního tenantu).
8.2

Secure data access (4.2)

Mental model — 3 vrstvy security

SCHÉMA
┌─────────────────────────────────────────────────────────────┐
│ TENANT (admin.fabric.microsoft.com)                          │
│   • Tenant settings (kdo má přístup k Fabric features)       │
│   • Capacity assignment                                      │
│                                                               │
│   ┌─────────────────────────────────────────────────────┐   │
│   │ WORKSPACE                                             │   │
│   │   Layer 1: Workspace role                             │   │
│   │     Admin / Member / Contributor / Viewer             │   │
│   │                                                       │   │
│   │   ┌──────────────────────────────────────────────┐   │   │
│   │   │ ITEM (Lakehouse, Warehouse, Semantic Model)   │   │   │
│   │   │   Layer 2: Item permission                    │   │   │
│   │   │     Read, Read+ReShare, Build, Edit           │   │   │
│   │   │                                               │   │   │
│   │   │   ┌──────────────────────────────────────┐   │   │   │
│   │   │   │ DATA                                  │   │   │   │
│   │   │   │   Layer 3: Granular access            │   │   │   │
│   │   │   │     • OneLake permissions (per file)  │   │   │   │
│   │   │   │     • SQL Endpoint object perms       │   │   │   │
│   │   │   │     • RLS / OLS / CLS                 │   │   │   │
│   │   │   │     • Sensitivity labels (MIP)        │   │   │   │
│   │   │   └──────────────────────────────────────┘   │   │   │
│   │   └──────────────────────────────────────────────┘   │   │
│   └─────────────────────────────────────────────────────┘   │
└─────────────────────────────────────────────────────────────┘

Layer 1: Workspace roles

Role Co může Komu dát
Admin Vše + správa rolí + delete workspace Workspace owner, BI lead
Member Vše + share + add other Members Senior team members
Contributor Create/edit items, run queries Developers, analysts
Viewer Read-only consume reports Business users
⚠️
Hot point: Role je per-workspace, ne per-item. Pokud chceš per-item granular → use Item permissions on top.

Layer 2: Item permissions

Specifické pro každý typ artefaktu. Příklad pro Semantic Model:

Permission Implication
Read Konzumovat reporty postavené na modelu
Read + Reshare Read + share s dalšími lidmi
Build Read + create vlastní reporty na top of model
Write/Edit Modify model definition

Layer 3: Granular data access

A. OneLake permissions

  • Per-folder/per-file permissions v Lakehouse Files/ nebo Tables/
  • Set via OneLake security wizard (Lakehouse → Manage OneLake permissions)
  • Inheritance: workspace role → folder → file
  • Use case: Lakehouse má mix public + sensitive data. Workspace Viewers vidí public/, jen Members vidí sensitive/.

B. SQL Endpoint object-level permissions

  • Lakehouse SQL Endpoint = read-only
  • Object permissions přes T-SQL: GRANT SELECT ON dbo.gold_fact_kvalita TO [user@firma.cz]
  • Kombinuje s workspace role: workspace Viewer + GRANT SELECT = může query specifický table

C. Warehouse object permissions

  • Plný T-SQL DCL: GRANT/DENY/REVOKE
  • Schemas, tables, columns, rows přes views
  • Funguje stejně jako Azure SQL DB / SQL Server

D. RLS / OLS / CLS v semantic modelu

E. Sensitivity labels (MIP)

  • Microsoft Information Protection labels (Public, Internal, Confidential, ...)
  • Aplikované na Lakehouse / Warehouse / Semantic model
  • Propagace: label set na upstream Lakehouse → auto-inherited na downstream Semantic Model → na PBI report
  • Auto-classification přes Purview scan (sensitive data discovery)

Demo arc 4.2

Demo 1: Workspace role + RLS chain

  1. Vytvoř test user tester@firma.cz
  2. Add jako Viewer do DP600_Demo_CHMI
  3. Open Semantic Model → Manage roles → Add Kraj_PHA: [kraj_kod] = "PHA"
  4. Sign-in jako tester → vidí jen Praha data
  5. Demo: change role assignment → tester vidí vše
  6. Klíčový takeaway: Viewer + RLS = production pattern pro consumers

Demo 2: Sensitivity label propagation

  1. Lakehouse lh_chmi_demo → Settings → Sensitivity → set "Internal"
  2. Open semantic model na top → label auto-inherited (visible v top bar)
  3. Build report → label propagated
  4. Export to Excel → Excel file má MIP watermark
  5. Klíčový takeaway: label "follows" data napříč Fabric stack

Demo 3: OneLake permissions

  • Show OneLake security wizard
  • Difference: workspace role = "kdo vidí workspace", OneLake = "kdo vidí konkrétní složku"
8.3

Administer Fabric (4.3)

Tenant Admin Portal — what's there

URL: app.fabric.microsoft.com/admin-portal Required: Fabric Administrator role v Microsoft 365 (Global admin nebo dedicated)

Top sections

Section Co tam je Typický use case
Tenant settings Per-feature on/off, allow/deny lists per AAD group „Kdo může vytvářet Lakehouses?" — typicky restrict na DEV team
Capacity settings F-SKU management, autoscale, throttling Approve/reject capacity scaling requests
Workspaces All workspaces in tenant, capacity assignment Audit kdo vlastní co
Users License assignment (Pro, PPU, Fabric) Bulk operations
Audit logs Activity log (Power BI activity API 30 dní; M365 audit log 180 dní ve výchozím stavu) — export do M365 / SIEM Compliance reporting
Premium per user PPU subs management –
Embed codes Public PBI embeds Bezpečnostní audit občas
Visuals Custom visual whitelist Restrict na approved certified visuals

Tenant settings — high-impact toggles

Doporučené review nastavení:

Setting Default Recommendation
Allow Azure AD guest users to access Fabric ON OFF nebo per-group restriction
Fabric for everyone (auto-create workspace) ON OFF — chceš controlled provisioning
Service principals can use Fabric APIs OFF ON pro CI/CD scénáře, restrict na security group
Users can create new workspaces ON restrict na Power BI Admin AAD group
Allow connections to Snowflake/Databricks/... per-source enable per-need
Sensitivity labels enforce OFF ON (důrazně)
Public sharing allowed ON OFF for production tenant

Capacity admin

F-SKU sizing rule of thumb

F-SKU Capacity Units Roughly equivalent... Cena (PAYG, hour)
F2 2 ~1 small dev $0.36/h ≈ $260/mo
F4 4 ~5 power users $0.72/h ≈ $520/mo
F8 8 ~25 users $1.44/h ≈ $1,050/mo
F16 16 small team prod $2.88/h ≈ $2,100/mo
F32 32 medium team $5.76/h ≈ $4,200/mo
F64 64 enterprise (= P1 ekvivalent, free PBI Pro pro consumers) $11.52/h ≈ $8,400/mo
F128, F256, F512 … very large …
F1024, F2048 … hyperscale …
💡
Klíčový bod: F64+ je inflection point — Power BI Pro license pro consumers free. Pro org s 50+ consumers ekonomicky vyhrává F64 nad Pro $14 × 50.

Smoothing window

  • F-SKU spotřeba je smoothed přes 24h window
  • Dva F2 nejsou ekvivalent F4 — F2 má 2 CU peak, F4 má 4 CU peak
  • Burst over capacity OK pro krátkou dobu (smoothing absorbing), sustained → throttling

Throttling levels

  1. Interactive Delay — query čeká pár sekund
  2. Interactive Rejection — query odmítnuta
  3. Background Rejection — refresh / pipeline odmítnut

Capacity Metrics App ukazuje aktuální throttling status per workspace.

Autoscale / Pause-Resume

  • Autoscale Billing for Spark = Spark se účtuje serverless mimo kapacitu (GA); pro ostatní workloady platí smoothing + burst — aktuální stav ověřte
  • Pause/Resume = manuálně pause cíleně mimo pracovní hodiny → ušetříš 70%
  • F-SKU reserved = roční commit, ~40% sleva oproti PAYG

Capacity Metrics App — deep dive

Install z AppSource (free, oficiální Microsoft). 3 hlavní reporty:

Report 1: Compute

  • CU spotřeba per workspace, per item, per operation
  • Drill: workspace → item → user → operation
  • Use case: kdo žere capacity? Pohledem vidíš že 80% žere 1 Power BI report → optimize ten report.

Report 2: Storage

  • OneLake size per workspace
  • Tracked: Lakehouse files, Warehouse data, Delta versions
  • Use case: identifikace bloated workspaces, plán cleanup

Report 3: Throttling & Smoothing

  • Throttling events historicky (kdy a koho)
  • Smoothing window utilization graph
  • Use case: pre-emptivně upgrade kapacity před tím, než dojde k throttling
⚠️
Hot point pro audience: Capacity Metrics App je prerekvizita pro každého Fabric admin. Bez ní letíš naslepo.

Audit logs

  • Activity log: kdo, kdy, co dělal ve Fabricu — Power BI activity API drží 30 dní, M365 audit log 180 dní (výchozí; ověřte podle licence)
  • Export: M365 Compliance Center → Search → Audit log search → Filter Fabric activities
  • Pro long-term: integrate with Sentinel nebo SIEM via M365 Defender connector
  • API: Power BI Admin REST API /admin/activityevents

Workspace governance patterns

Pattern 1: DEV / TEST / PROD

3 workspaces per project, 3 different capacities (F4 / F8 / F32). Deployment Pipelines (built-in Fabric feature) automatizují propagaci.

Pattern 2: Per-domain workspaces

Sales / Marketing / Finance / Operations — každý vlastní workspace, vlastní data domain. Fabric Domains (preview) přidává meta-vrstvu pro klasifikaci.

Pattern 3: Personal sandboxes + central PROD

Každý analytik má vlastní personal workspace (Pro license sufficient), produkce workspace je central s Deployment Pipelines.

Demo arc 4.3

Demo 1: Tenant Admin Portal walkthrough

Live click-through:

  1. Tenant settings — show 3-4 high-impact toggles
  2. Capacity assignment — assign demo workspace
  3. Audit log — search "view report" za posledních 7 dní

Demo 2: Capacity Metrics App deep-dive

  1. Install z AppSource
  2. Connect na lektorovu kapacitu
  3. Show Compute report — drill: workspace → item → operation
  4. Show Throttling tab — historic events
  5. Story: „Tady vidíte, že DAX query na visual X tahá 0.5 CU/s sustained. To je 25% kapacity F2. Optimalizujte."

Demo 3: Deployment Pipeline

  1. New Deployment Pipeline → 3 stages (DEV/TEST/PROD)
  2. Assign workspaces
  3. Compare DEV vs TEST → vidíš diff (visual change, measure change)
  4. Deploy DEV → TEST → PROD with rules (parameter overrides per stage)
8.4

Day 4 troubleshooting

Problem Fix
User nevidí workspace Workspace role missing, OR tenant setting "users can create" je OFF a user není v admin group
Sensitivity label nepropaguje Label policy v M365 Compliance Center není published na Fabric scope
Capacity throttling po každém PBI refresh Smoothing window full → upgrade SKU nebo schedule refresh mimo peak
Audit log neukazuje recent activity Sync delay (15-60 min), check za hodinu
OneLake permissions nedávají per-folder access Workspace role overrides — Viewer nemůže být per-folder Admin
Deployment Pipeline fails s "schema mismatch" Target workspace má jiný schema → manual reconcile přes ALM Toolkit
8.5

Day 4 hands-on labs (konsolidovaný blok)

Lab Cíl
Lab 9: Configure security in Fabric RLS + sensitivity labels
Lab 10: Monitor a Fabric workspace Capacity Metrics App
Lab 11: Implement deployment pipeline DEV/TEST/PROD flow
Bonus: zkusit RTI Library demos C/D/E Self-paced exploration