11# Apache Superset with SAML Authentication 🚀
22
3- ** Version 1.0.0** - Enhanced Apache Superset setup with dual authentication support (SAML + Database) and complete enterprise integration.
3+ <!-- Version Management: Update version file and docker-compose.yml image tag when releasing -->
4+ ** Current Version: 1.0.1** - Enhanced Apache Superset setup with dual authentication support (SAML + Database) and complete enterprise integration.
5+
6+ > 📝 ** Version Management** : The current version is dynamically managed through the [ ` version ` ] ( version ) file. Update this file and corresponding Docker image tags when releasing new versions.
47
58![ Docker Pulls] ( https://img.shields.io/docker/pulls/jawadrafique/superset?style=flat-square )
6- ![ Docker Image Version] ( https://img.shields.io/docker/v/jawadrafique/superset/latest ?style=flat-square )
7- ![ Docker Image Size] ( https://img.shields.io/docker/image-size/jawadrafique/superset/latest ?style=flat-square )
9+ ![ Docker Image Version] ( https://img.shields.io/docker/v/jawadrafique/superset/1.0.1 ?style=flat-square )
10+ ![ Docker Image Size] ( https://img.shields.io/docker/image-size/jawadrafique/superset/1.0.1 ?style=flat-square )
811![ License] ( https://img.shields.io/badge/license-MIT-blue?style=flat-square )
912
10- ## ✨ Features (v1.0.0 )
13+ ## ✨ Features (Latest Version )
1114
1215### 🔐 Dual Authentication System
1316- ** SAML SSO Integration** with Azure AD/ADFS
1417- ** Database Authentication** fallback
1518- ** Seamless user experience** with unified login page
1619- ** Enterprise-ready security** with X.509 certificates
20+ - ** Smart Logout Management** with cache clearing and multi-tab coordination
1721
1822### 🎯 Core Capabilities
1923- ** Auto-initialization** with admin user creation
2024- ** MySQL database integration** with optimized connection pooling
2125- ** Environment-based configuration** for easy deployment
2226- ** Custom Docker image** with pre-installed SAML libraries
2327- ** Helm chart support** for Kubernetes deployment
28+ - ** Advanced session management** with comprehensive cache clearing
29+
30+ ## 🆕 What's New in v1.0.1
2431
25- ## 🆕 What's New in v1.0.0
32+ ### 🚪 Enhanced Logout & Session Management (v1.0.1)
33+ - ** Smart logout options** with local vs full SAML logout
34+ - ** Multi-tab coordination** prevents 403 Forbidden errors
35+ - ** Comprehensive cache clearing** eliminates manual site data clearing
36+ - ** Real-time session monitoring** across browser tabs
37+ - ** SAML authentication fix** for Azure AD method conflicts (AADSTS75011)
2638
27- ### 🎥 SAML Authentication Demo
39+ ### 🎥 SAML Authentication Demo (v1.0.0)
2840** [ Watch the SAML Demo Video] ( https://youtu.be/eUC1EElVgTo ) ** - See complete SAML authentication flow with Azure AD integration!
2941
3042### Production-Ready SAML Support
4658- ** Configurable SAML validation** (strict/relaxed modes)
4759- ** Debug mode** for troubleshooting SAML issues
4860- ** Secure environment variable** configuration
61+ - ** Advanced logout management** with comprehensive cache clearing
62+ - ** Multi-tab session coordination** to prevent authentication errors
63+
64+ ### 🚪 Advanced Logout & Session Management
65+ - ** Smart logout options** - Local logout (preserves Azure AD) or Full SAML logout
66+ - ** Comprehensive cache clearing** - localStorage, sessionStorage, IndexedDB, cookies
67+ - ** Multi-tab coordination** - Automatic logout across all browser tabs
68+ - ** Session monitoring** - Prevents 403 Forbidden errors in multiple tabs
69+ - ** Client-side cleanup** - Removes all cached authentication data
4970
5071## 🚀 Quick Start
5172
@@ -144,7 +165,7 @@ SAML_SP_PRIVATE_KEY="$(cat saml_sp.key | tr -d '\n')"
144165### 4. Build Custom Image
145166
146167``` bash
147- docker build . -t superset:1.0.0
168+ docker build . -t superset:1.0.1
148169```
149170
150171### 5. Start Superset
@@ -191,28 +212,91 @@ Check logs for SAML authentication issues:
191212docker-compose logs superset | grep -i saml
192213```
193214
194- ## 📁 Project Structure
215+ ## � Logout & Session Management
216+
217+ ### Smart Logout Options
218+
219+ The enhanced logout system provides two modes to handle different security requirements:
220+
221+ #### ** Local Logout (Default - Recommended)**
222+ ``` bash
223+ SAML_FORCE_LOCAL_LOGOUT=true # Default setting
224+ ```
225+ - ** Logs out from Superset only** - preserves Azure AD session
226+ - ** Ideal for shared workstations** - users remain logged in to Office 365, Teams, etc.
227+ - ** Convenient re-login** - quick SAML authentication without re-entering credentials
228+ - ** Enhanced security** - comprehensive client-side cache clearing
229+
230+ #### ** Full SAML Logout (Optional)**
231+ ``` bash
232+ SAML_FORCE_LOCAL_LOGOUT=false # For high-security environments
233+ ```
234+ - ** Global logout** - logs out from both Superset AND Azure AD
235+ - ** Complete session termination** - ends all SAML-connected applications
236+ - ** Maximum security** - ensures no residual sessions
237+
238+ ### Multi-Tab Session Coordination
239+
240+ ** Problem Solved** : No more "403 Forbidden" errors when logging out with multiple Superset tabs open.
241+
242+ ** Features** :
243+ - ** Automatic coordination** across all browser tabs
244+ - ** Real-time notifications** using BroadcastChannel API
245+ - ** Comprehensive cache clearing** - localStorage, sessionStorage, IndexedDB, cookies
246+ - ** Session monitoring** - detects expired sessions and auto-redirects
247+ - ** Fallback mechanisms** - localStorage events for older browsers
248+
249+ ** User Experience** :
250+ 1 . User logs out from any Superset tab
251+ 2 . ** All other tabs automatically redirect** to login page
252+ 3 . ** No manual cache clearing** required
253+ 4 . ** Seamless experience** across all browser tabs
254+
255+ ### Cache & Storage Clearing
256+
257+ The logout process comprehensively clears:
258+ - ** Server-side** : Flask sessions, authentication cookies, SAML session data
259+ - ** Client-side** : localStorage, sessionStorage, IndexedDB, browser cache
260+ - ** Cross-tab** : Notifications to all open tabs via BroadcastChannel
261+ - ** Security headers** : No-cache directives to prevent authentication caching
262+
263+ ## �📁 Project Structure
195264
196265```
197- ├── docker-compose.yml # Service orchestration (v1.0.0 )
266+ ├── docker-compose.yml # Service orchestration (current version )
198267├── Dockerfile # Custom image with SAML + MySQL support
199268├── entrypoint.sh # Auto-initialization script
200269├── superset_config.py # Configuration with SAML integration
201- ├── auth_saml.py # Custom SAML security manager (v1.0.0)
270+ ├── auth_saml.py # Custom SAML security manager (v1.0.0+ )
202271├── templates/ # Custom templates for dual authentication
203272│ └── appbuilder/general/security/
204- │ └── login_db.html # Dual authentication login page
205- ├── helm/ # Kubernetes deployment (v1.0.0)
206- │ ├── microservice-superset.yaml # Helm template with SAML support
273+ │ ├── login_db.html # Dual authentication login page
274+ │ └── logout.html # Enhanced logout with cache clearing (v1.0.1+)
275+ ├── helm/ # Kubernetes deployment (v1.0.0+)
276+ ├── microservice-superset.yaml # Helm template with SAML support
207277│ └── values.yaml # Configuration values
208278├── .env.example # Environment variables template
209279├── .env # Your local configuration (git-ignored)
210- ├── version # Version 1.0.0
280+ ├── version # Current Version: 1.0.1
211281├── volumes/ # Persistent data storage
212282│ └── superset/ # Superset application data
213283└── README.md # This documentation
214284```
215285
286+ ## 🏷️ Version Management
287+
288+ This project uses semantic versioning managed through the [ ` version ` ] ( version ) file:
289+
290+ - ** Current Version** : ` 1.0.1 `
291+ - ** Docker Image Tag** : ` superset:1.0.1 ` (in docker-compose.yml)
292+ - ** Release Notes** : See [ What's New] ( #-whats-new-in-v101 ) sections for version history
293+
294+ ** To release a new version:**
295+ 1 . Update the [ ` version ` ] ( version ) file
296+ 2 . Update image tag in [ ` docker-compose.yml ` ] ( docker-compose.yml )
297+ 3 . Update any version references in documentation
298+ 4 . Build and tag Docker image: ` docker build -t superset:$(cat version) . `
299+
216300## 🔧 Configuration Files
217301
218302### Key Files (v1.0.0)
@@ -261,7 +345,7 @@ The enhanced entrypoint script automatically:
261345
262346``` bash
263347# Rebuild with SAML support
264- docker build --no-cache . -t superset:1.0.0
348+ docker build --no-cache . -t superset:1.0.1
265349docker-compose up -d
266350
267351# View logs with SAML debug info
@@ -280,7 +364,7 @@ Update `docker-compose.yml` with production settings:
280364version : ' 3.8'
281365services :
282366 superset :
283- image : superset:1.0.0
367+ image : superset:1.0.1
284368 environment :
285369 - ENABLE_SAML_AUTH=true
286370 - SAML_SP_ENTITY_ID=https://superset.yourcompany.com
@@ -292,7 +376,7 @@ Use the included Helm templates in the `k8s/` directory:
292376
293377` ` ` bash
294378helm install superset ./k8s/superset-helm \
295- --set image.tag=1.0.0 \
379+ --set image.tag=1.0.1 \
296380 --set saml.enabled=true \
297381 --set saml.idpEntityId=https://sts.windows.net/your-tenant/
298382` ` `
@@ -339,6 +423,36 @@ docker-compose logs superset | grep -i saml
339423docker exec superset cat /app/superset_config.py | grep -A 20 "SAML"
340424` ` `
341425
426+ # ## Logout & Session Issues
427+
428+ **403 Forbidden Errors in Multiple Tabs (SOLVED):**
429+ - ✅ **Fixed in v1.0.1** - Enhanced logout automatically coordinates all tabs
430+ - ✅ **No manual cache clearing** required anymore
431+ - ✅ **All tabs redirect automatically** when user logs out
432+
433+ **Logout Not Working Properly:**
434+ 1. Check logout configuration : ` SAML_FORCE_LOCAL_LOGOUT=true` (recommended)
435+ 2. Verify browser supports BroadcastChannel (modern browsers do)
436+ 3. Check browser console for logout coordination logs
437+ 4. Test with different logout modes :
438+ ` ` ` bash
439+ # Local logout (preserves Azure AD session)
440+ SAML_FORCE_LOCAL_LOGOUT=true
441+
442+ # Full SAML logout (logs out from Azure AD too)
443+ SAML_FORCE_LOCAL_LOGOUT=false
444+ ` ` `
445+
446+ **Cache/Session Issues:**
447+ ` ` ` bash
448+ # Check if comprehensive cache clearing is working
449+ # 1. Login to Superset
450+ # 2. Open browser DevTools > Application > Storage
451+ # 3. Note localStorage, sessionStorage, cookies
452+ # 4. Logout from Superset
453+ # 5. Check that all auth-related storage is cleared
454+ ` ` `
455+
342456**User Provisioning Issues:**
343457- Check `SAML_DEFAULT_ROLE` setting
344458- Verify user email format from Azure AD
0 commit comments