🔐 KMS SSO Manual Testing Suite

Environment Status: Local Development
Loading service status...

đŸŽ¯ OAuth2/OIDC Testing (Keycloak)

Admin Console:
Open Keycloak Admin Login: admin / admin
OAuth2 Authorization Flow:
Test OAuth2 Login
Discovery Document:
View OIDC Config

📝 SAML Testing (SimpleSAMLphp)

Admin Console:
Open SAML Admin Login: admin / secret
SAML Metadata:
View Metadata
Test Authentication:
Test SAML Login

🚀 KMS API Testing

Frontend Application:
Open KMS Frontend
API Health Check:
Check API Health
Test API with Header Auth (simulates SSO result):
curl -H "X-User-Email: admin@example.com" \
     -H "Accept: application/json" \
     http://localhost:8081/api/applications

🔍 Testing Workflows

1. OAuth2 Flow Test

  1. Click "Test OAuth2 Login" above
  2. Login with admin@example.com / admin123
  3. You'll be redirected to your callback URL with an authorization code
  4. Note: This currently shows a 404 because the callback isn't implemented yet

2. SAML Flow Test

  1. Open "SAML Admin" console
  2. Go to "Authentication" → "Test authentication"
  3. Login with user1 / user1pass
  4. View the SAML assertion that would be sent to your app

3. Permission System Test

  1. Use the API test above with different user emails
  2. Try: admin@example.com, test@example.com, limited@example.com
  3. See how responses differ based on user permissions

📊 Current Implementation Status

✅ Working:
â€ĸ Keycloak OAuth2/OIDC provider with test realm
â€ĸ SimpleSAMLphp SAML IdP with test users
â€ĸ KMS API with header authentication
â€ĸ Hierarchical permission system (25+ permissions)
â€ĸ Application and token management
â€ĸ Database with proper permission structure
❌ Missing:
â€ĸ OAuth2 callback handler in KMS API
â€ĸ SAML assertion processing in KMS API
â€ĸ Frontend SSO login integration
â€ĸ Automatic permission mapping from SSO claims
â„šī¸ Next Steps:
â€ĸ Complete OAuth2 callback implementation
â€ĸ Add SAML response handling
â€ĸ Map SSO user attributes to KMS permissions
â€ĸ Add SSO login buttons to frontend

đŸ› ī¸ Development Commands

# Start SSO services
podman-compose -f docker-compose.yml -f docker-compose.sso.yml up -d

# Run automated tests
./test/quick_sso_test.sh

# Check service logs
podman-compose logs keycloak
podman-compose logs saml-idp
podman-compose logs api-service

# Reset to header auth mode
podman-compose up -d