Environment Configuration
Configuration Overview
To ensure Pulsar operates correctly for your infrastructure, you must configure the environment settings within the Django framework. The primary configuration file is located at portal/portal/settings.py.
Email Notifications
Pulsar supports automated email notifications for scan updates and scheduling. These settings must be configured in portal/portal/settings.py before the initial installation if you want notifications enabled from the start.
Modify the EMAIL_BACKEND and associated variables:
# portal/portal/settings.py
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_HOST = 'smtp.your-provider.com'
EMAIL_PORT = 587
EMAIL_USE_TLS = True
EMAIL_HOST_USER = 'your-email@example.com'
EMAIL_HOST_PASSWORD = 'your-password'
DEFAULT_FROM_EMAIL = 'Pulsar Scanner <your-email@example.com>'
External API Integrations
While Pulsar is designed to function without requiring paid API keys, it integrates with several external services to enrich data visualization and discovery.
| Service | Purpose | Requirement | | :--- | :--- | :--- | | RIPEstat API | IP and ASN data enrichment | No key required (Default) | | NVD Data Feed | Vulnerability scoring and CVE data | Automatic sync | | OWASP Amass | Advanced subdomain discovery | Optional API keys |
To provide API keys for integrated tools like Amass, you should configure them within the scan_settings module or via environment variables (depending on your deployment method). Using external APIs significantly increases the depth of the discovery phase.
Scan Policies and Optimization
Pulsar allows you to define scan policies to balance thoroughness with execution speed. These settings influence how integrated tools like Nmap, ZMap, and WhatWeb interact with target assets.
Custom Scanner Extensions
If you are developing custom scanner extensions, ensure they are registered in the modules/scanner_utils.py. The platform uses a Sandbox environment to execute these extensions safely.
Setting Up OAuth
For collaboration and team environments, Pulsar supports OAuth integration. This is configured in the AUTHENTICATION_BACKENDS section of settings.py.
# Example OAuth Configuration structure
SOCIAL_AUTH_GITHUB_KEY = 'your-github-client-id'
SOCIAL_AUTH_GITHUB_SECRET = 'your-github-client-secret'
REST API Configuration
Pulsar exposes a REST API for integration with other tools or custom CLI clients. The API supports several authentication methods:
- Token Authentication: Ideal for script-based access.
- Session Authentication: Used for web-based interaction.
- Basic Authentication: Standard username/password (recommended only for development).
API Explorer
You can interact with the API schema directly through the built-in explorer. The frontend uses coreapi to map the available endpoints. If you need to programmatically access the API, headers should be formatted as follows:
Authorization: Token <your_api_token>
Content-Type: application/json
Data Persistence & Celery
Since Pulsar is not built for immediate results, it relies heavily on Celery for asynchronous task management. Ensure your Redis or RabbitMQ broker is correctly configured in settings.py to prevent scan data loss during long-running discovery tasks.