ai-cfia / ai-cfia/insect-project

Security Enhancement: Add Authentication to Subscription Manager

Aberta
#40 1 comentário 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Python
Estrelas
0
Forks
0
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

The subscription manager currently implements direct subscribe/unsubscribe without email confirmation due to email delivery limitations. This creates a security concern where anyone can potentially:
- Subscribe arbitrary @inspection.gc.ca email addresses
- Unsubscribe others from the mailing list

## Current Implementation

After removing email confirmation (due to SMTP constraints), the application now allows:
- Direct subscription by entering any @inspection.gc.ca email
- Direct unsubscription by entering any subscribed email
- No identity verification of the person making the request

## Security Risks

1. **Unauthorized Subscriptions**: Malicious actors could subscribe colleagues without consent
2. **Unauthorized Unsubscriptions**: Anyone could remove legitimate subscribers
3. **No Audit Trail**: Limited logging of who performed subscription actions

## Proposed Solutions (Future Enhancements)

### Option 1: CFIA Authentication Integration
- Integrate with existing CFIA authentication system (SAML/SSO)
- Verify user identity before allowing subscription changes
- Maintain audit trail of authenticated actions

### Option 2: Admin-Only Management
- Remove public subscription interface
- Implement admin panel for subscription management
- Require admin credentials for any changes

### Option 3: Enhanced Verification
- Add additional verification fields (employee ID, department)
- Implement rate limiting and IP restrictions
- Add CAPTCHA to prevent automated abuse

### Option 4: Hybrid Approach
- Allow self-subscription with enhanced verification
- Require admin approval for unsubscriptions
- Email notifications to admins for all changes

## Implementation Priority

This should be addressed before production deployment to ensure:
- User privacy protection
- Prevention of subscription abuse
- Compliance with internal security policies

## Additional Considerations

- Email normalization (convert to lowercase) has been implemented
- Redis dependency could be removed if email confirmation is not restored
- Consider implementing request logging for security auditing

Guia de contribuição

Nenhum guia de contribuição indexado para este repositório

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.