You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: site/sigmaguides/src/security_oauth_pkce_secure_integration/security_oauth_pkce_secure_integration.md
+47-14Lines changed: 47 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -85,6 +85,30 @@ Here's how OAuth 2.0 works when a user accesses embedded Sigma content:
85
85
<strong>KEY BENEFIT:</strong><br> OAuth 2.0 separates authentication from authorization, allowing fine-grained access control without sharing credentials.
86
86
</aside>
87
87
88
+
### Connection-Level vs Organization-Level OAuth
89
+
90
+
When implementing OAuth with Sigma, you have two primary approaches for managing authentication:
91
+
92
+
**Connection-Level OAuth:**
93
+
- Each user authenticates individually with the data platform (Databricks, Snowflake, etc.)
94
+
- Tokens are scoped to specific connections
95
+
-**Supports PKCE for enhanced security** (this is the key advantage)
96
+
- Ideal for embedded scenarios where user identity and individual permissions matter
97
+
- Each query runs with the authenticated user's credentials
98
+
- Provides the strongest audit trail and access control
99
+
100
+
**Organization-Level OAuth:**
101
+
- Uses a single service account or shared credentials for all users
102
+
- All users query through the same organizational identity
103
+
- Does not support PKCE
104
+
- Simpler initial setup but less granular access control
105
+
- Better for scenarios where all users have identical data permissions
106
+
- Requires implementing Row-Level Security (RLS) separately if user-specific data access is needed
107
+
108
+
<asideclass="positive">
109
+
<strong>IMPORTANT:</strong><br> Sigma supports PKCE exclusively for connection-level OAuth. This is a key reason to choose connection-level authentication when implementing embedded analytics with user-specific data access requirements and enhanced security needs.
110
+
</aside>
111
+
88
112
### Why OAuth 2.0 for Sigma Deployments?
89
113
90
114
**Security:**<br>
@@ -186,12 +210,14 @@ Consider an enterprise scenario where you want to embed Sigma dashboards into yo
186
210
- Used for API requests
187
211
- Included in request headers
188
212
- Should never be logged or stored long-term
213
+
-**Sigma Storage:** Access tokens are stored in buffer and encrypted using envelope encryption with AES256
189
214
190
215
**Refresh Tokens**
191
-
- Longer-lived (days to months)
216
+
- Longer-lived (up to 90 days)
192
217
- Used to obtain new access tokens
193
218
- Must be stored securely
194
219
- Can be revoked by authorization server
220
+
-**Sigma Storage:** Refresh tokens are stored in MySQL, encrypted using unique keys per customer. Encryption keys are housed in a separate key store for enhanced security
195
221
196
222
**Token Expiration Flow in Sigma**
197
223
1. User views embedded Sigma dashboard, Sigma queries data with access token
@@ -256,29 +282,35 @@ OAuth 2.0 uses "scopes" to define what access a token grants. When Sigma integra
256
282
## Integration Architecture Patterns
257
283
Duration: 10
258
284
259
-
### Pattern 1: Direct User Authentication
285
+
### Pattern 1: Connection-Level OAuth with PKCE (Direct User Authentication)
260
286
261
-
**Scenario:** Users authenticate directly with data platform before accessing Sigma
287
+
**Scenario:** Users authenticate directly with data platform before accessing Sigma using connection-level OAuth with PKCE
262
288
263
289
**Flow:**
264
290
1. User accesses embedded Sigma dashboard in your application
265
-
2. Application redirects to Databricks OAuth login page
266
-
3. User logs in with their Databricks credentials
267
-
4.Databricks issues access token to your application
268
-
5. Application passes token to Sigma via embed API
269
-
6. Sigma queries Databricks using user's individual token and permissions
291
+
2. Application generates PKCE code challenge and redirects to data platform OAuth login (e.g., Databricks)
292
+
3. User logs in with their data platform credentials
293
+
4.Data platform issues access token to your application after validating PKCE verifier
294
+
5. Application passes encrypted token to Sigma via embed API
295
+
6. Sigma queries data platform using user's individual token and permissions
270
296
271
297
**Pros:**
298
+
-**Supports PKCE for enhanced security** - protects against authorization code interception
272
299
- True user-level access control in Sigma - each user sees only their authorized data
273
300
- Complete audit trail showing exactly which user ran which Sigma queries
274
301
- No credential management in your application or Sigma connections
- Strongest security posture for embedded analytics
276
304
277
305
**Cons:**
278
-
- Requires all users to have individual Databricks accounts (licensing cost)
306
+
- Requires all users to have individual data platform accounts (licensing cost)
279
307
- Additional login step interrupts embedded Sigma user experience
280
308
- More complex token management logic in your application
281
309
310
+
<asideclass="positive">
311
+
<strong>RECOMMENDED FOR:</strong><br> Connection-level OAuth with PKCE is the preferred approach when security, auditability, and user-specific data access are primary requirements. This is the only pattern that supports PKCE in Sigma.
312
+
</aside>
313
+
282
314
### Pattern 2: Service Account with Row-Level Security
283
315
284
316
**Scenario:** Sigma connects using shared service account, data filtered by user attributes
@@ -326,12 +358,13 @@ Duration: 10
326
358
327
359
### Choosing the Right Pattern for Sigma
328
360
329
-
**Use Direct Authentication when:**
330
-
- You need strongest security and auditability for Sigma usage
331
-
- Users already have individual data platform accounts
361
+
**Use Connection-Level OAuth with PKCE (Pattern 1) when:**
362
+
- You need the strongest security posture with PKCE protection
332
363
- Regulatory compliance requires tracking which user ran which Sigma query
364
+
- Users already have individual data platform accounts
333
365
- Data sensitivity is very high (healthcare, financial)
334
366
- You want to leverage platform-native permissions in Sigma dashboards
367
+
- Enhanced security against authorization code interception is required
335
368
336
369
**Use Service Account with RLS when:**
337
370
- Embedding Sigma for external customers who don't have platform accounts
@@ -499,4 +532,4 @@ Be sure to check out all the latest developments at [Sigma's First Friday Featur
0 commit comments